Skip to content

Commit

Permalink
chore: remove use of nightly features in Cargo.toml
Browse files Browse the repository at this point in the history
The use of `profile-rustflags` is mainly to minimize the size of
virtual-adapter, but it's declared in the root Cargo.toml since it's
only allowed in the workspace root even though it's not used when
building wasi-virt crate.

The use of the nightly feature requires projects depending on wasi-virt
crate to also use nightly, which complicates the build process
(especially building native extensions of Ruby..)

This commit moves the `rustflags` setting from the Cargo.toml to the
RUSTFLAGS env var in build-adapter.sh.
  • Loading branch information
kateinoigakukun committed Jun 5, 2024
1 parent 6585bdf commit 73d2945
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["profile-rustflags"]

[package]
name = "wasi-virt"
version = "0.1.0"
Expand All @@ -26,7 +24,6 @@ opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
rustflags = ["-Zoom=panic"]

[dependencies]
anyhow = "1"
Expand Down
1 change: 1 addition & 0 deletions build-adapter.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Useful for debugging:
# export CARGO_PROFILE_RELEASE_DEBUG=2
# export WIT_BINDGEN_DEBUG=1
export RUSTFLAGS="-Zoom=panic"

wasm-tools component wit --wasm wit -o lib/package.wasm

Expand Down
Binary file modified lib/virtual_adapter.debug.wasm
Binary file not shown.
Binary file modified lib/virtual_adapter.wasm
Binary file not shown.

0 comments on commit 73d2945

Please sign in to comment.