Browse Source

Use a more targeted means of specifying link flags (#71)

* Use a more targeted means of specifying link flags

I had forgotten earlier that this could be done with build scripts so do
that in the adapter's build script rather than as auxiliary rust flags.

* Remove `.cargo/config.toml` file

This now only serves the purpose to enable bulk-memory which is
relatively minor. This removes the file for now and wasm features can
always be reenabled at a later date if file size is truly an issue.
pull/6374/head
Alex Crichton 2 years ago
committed by GitHub
parent
commit
556cea39e6
  1. 7
      build.rs

7
build.rs

@ -13,6 +13,13 @@ fn main() {
"cargo:rustc-link-search=native={}",
out_dir.to_str().unwrap()
);
// Some specific flags to `wasm-ld` to inform the shape of this adapter.
// Notably we're importing memory from the main module and additionally our
// own module has no stack at all since it's specifically allocated at
// startup.
println!("cargo:rustc-link-arg=--import-memory");
println!("cargo:rustc-link-arg=-zstack-size=0");
}
/// This function will produce a wasm module which is itself an object file

Loading…
Cancel
Save