Track SPACEWASM_CONFIG changes in the c_api build script - #152
Merged
Kronos3 merged 1 commit intoAug 1, 2026
Merged
Conversation
build.rs reads SPACEWASM_CONFIG but never emitted cargo:rerun-if-env-changed for it, so changing the variable did not trigger a rebuild and the previous configuration stayed compiled in. This broke the workflow documented in spacewasm_c_example/README.md. Also fix the doc comment above generate_header(), which named a generate-header feature; the cfg gate and Cargo.toml both use codegen.
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly |
CoreMark Benchmark ResultsCurrent Score: 251.193 |
Code Coverage ReportCurrent Coverage: 95.29% |
Kronos3
approved these changes
Aug 1, 2026
Kronos3
left a comment
Contributor
There was a problem hiding this comment.
Nice catch, thanks for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build.rsreadsSPACEWASM_CONFIGbut never emitscargo:rerun-if-env-changedfor it, so cargo does not rebuild when the variable changes — the previous configuration stays compiled in.This breaks the workflow
crates/spacewasm_c_example/README.mddocuments:Reproduction
On
23a1db2, point the variable at a file that is not valid Rust:exit 101— the file is readexit 0— build succeeds, cargo reportsFreshA build that must fail passes, and
target/debug/build/spacewasm_c_api-*/outputstill records the old path. SoMAX_CONTROL_FRAMES,MAX_STACK_DEPTH,GLOBAL_ALLOCATOR_MAX_PAGESandGLOBAL_ALLOCATOR_PAGE_SIZEcan silently keep the previous build's values.Fix
One line. Editing the config file's contents is already tracked through
include!dep-info, sorerun-if-changedis not needed:rerun-if-env-changedonlyAlso corrects the doc comment above
generate_header(), which names agenerate-headerfeature; thecfggate andCargo.tomlboth usecodegen.Checks
Debian bookworm, rustc 1.97.1:
cargo fmt --all -- --check,cargo clippy -p spacewasm_c_api --all-targets -- -D warnings,cargo test -p spacewasm_c_api(35 passed),cargo test -p spacewasm_c_example(2 passed).AI-assisted (Claude Code) per
AI_POLICY.md; I ran every command above myself.