ruby-prism-sys already supports wasm32-wasip1 through the WASI SDK. I would also like to target freestanding WebAssembly (wasm32-unknown-unknown), where the application provides its own minimal sysroot.
This can currently be configured through CFLAGS_<target> and BINDGEN_EXTRA_CLANG_ARGS_<target>, but those variables affect every C and bindgen dependency in the same Cargo build. Vendoring ruby-prism-sys solely to pass additional compiler arguments also creates unnecessary maintenance work.
Would you accept a crate-scoped RUBY_PRISM_CFLAGS option whose arguments are applied consistently to both cc::Build and bindgen::Builder?
This would allow freestanding builds to provide options such as:
--sysroot=/path/to/sysroot
- additional include paths with
-I
- Prism configuration macros such as
-DPRISM_HAS_NO_FILESYSTEM=1
without affecting unrelated C or bindgen dependencies.
I would be happy to submit a PR.
ruby-prism-sysalready supportswasm32-wasip1through the WASI SDK. I would also like to target freestanding WebAssembly (wasm32-unknown-unknown), where the application provides its own minimal sysroot.This can currently be configured through
CFLAGS_<target>andBINDGEN_EXTRA_CLANG_ARGS_<target>, but those variables affect every C and bindgen dependency in the same Cargo build. Vendoringruby-prism-syssolely to pass additional compiler arguments also creates unnecessary maintenance work.Would you accept a crate-scoped
RUBY_PRISM_CFLAGSoption whose arguments are applied consistently to bothcc::Buildandbindgen::Builder?This would allow freestanding builds to provide options such as:
--sysroot=/path/to/sysroot-I-DPRISM_HAS_NO_FILESYSTEM=1without affecting unrelated C or bindgen dependencies.
I would be happy to submit a PR.