I'm looking to get the Wasm version (e.g. wasm32), WASI version (e.g. 0.2), and WASI SDK version (e.g. 29) at compile time for some C code (specifically CPython). Neither https://github.com/WebAssembly/wasi-sdk nor https://github.com/WebAssembly/wasi-libc list any predefined macros in any docs that I can find (e.g. __WASI_VERSION__ or something). Do such macros exist?
wasm32/wasm64 is __wasm32__ and __wasm64__ I believe, but the libc/sdk versions aren't present in macros -- would be reasonable to add though!
The reason I ask is I will need to embed that data in Python wheels and it probably wouldn't hurt to expose it in Python itself.
Where should I open an issue? WASI SDK or wasi-libc?
wasi-libc is probably the best spot since that's where the headers will be located and #defines and such
and definitely agree it'd be good to have these
https://github.com/WebAssembly/wasi-libc/issues/688
Last updated: Dec 06 2025 at 06:05 UTC