Skip to content

Conversation

@Arshia001
Copy link
Contributor

@Arshia001 Arshia001 commented Aug 15, 2025

Hi!

This PR adds support for the WASM_DYLINK_RUNTIME_PATH subsection. wasm-ld 21 already supports generating this subsection via the -rpath arg, so I feel it's important for wasm-tools to support the subsection as well.

I don't know of any tools that generate the subsection in WAT format yet, but judging by the information in https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md#text-format-of-dylink0, the correct format should be (runtime-path "a" "b"); please correct me if I'm wrong.

I believe this is a breaking change to wasmparser, in the sense that adding a new case to Dylink0Subsection breaks existing code that does exhaustive matching on it; however, I don't know if there's a better way to handle this.

@Arshia001 Arshia001 requested a review from a team as a code owner August 15, 2025 14:12
@Arshia001 Arshia001 requested review from alexcrichton and removed request for a team August 15, 2025 14:12
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks! And no worries about the breaking change, it's expected that this crate has breaking changes over time as wasm evolves.

@alexcrichton alexcrichton added this pull request to the merge queue Aug 15, 2025
Merged via the queue into bytecodealliance:main with commit f696728 Aug 15, 2025
34 checks passed
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