Skip to content

Don't embed $OUT_DIR in proc macros - #15149

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-macro
Nov 4, 2026
Merged

alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-macro

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This is the equivalent of bytecodealliance/wit-bindgen#1778 over here in the Wasmtime repository. In short by embedding $OUT_DIR in the proc macro it makes the build unreproducible and can reduce cache hits in larger build systems. Keep Wasmtime's debugging-only feature in parity with wit-bindgen's feature here by shuffling around how this works.

This additionally deletes the include_generated_code_from_file macro option as that's basically subsumed by debug which is a bit of a clearer name.

This is the equivalent of bytecodealliance/wit-bindgen#1778 over here in
the Wasmtime repository. In short by embedding `$OUT_DIR` in the proc
macro it makes the build unreproducible and can reduce cache hits in
larger build systems. Keep Wasmtime's debugging-only feature in parity
with `wit-bindgen`'s feature here by shuffling around how this works.

This additionally deletes the `include_generated_code_from_file` macro
option as that's basically subsumed by `debug` which is a bit of a
clearer name.
@alexcrichton
alexcrichton requested a review from a team as a code owner November 4, 2026 18:49
@alexcrichton
alexcrichton requested review from pchickey and removed request for a team November 4, 2026 18:49

@pchickey pchickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent stuff

@alexcrichton
alexcrichton added this pull request to the merge queue Nov 4, 2026
Merged via the queue into bytecodealliance:main with commit 1c8a1fa Nov 4, 2026
52 checks passed
@alexcrichton
alexcrichton deleted the refactor-macro branch November 4, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants