Skip to content

Commit

Permalink
chore: remove use of nightly features in Cargo.toml (#62)
Browse files Browse the repository at this point in the history
* chore: remove use of nightly features in Cargo.toml

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.

* doc: Remove note about nightly in README
  • Loading branch information
kateinoigakukun authored Jun 5, 2024
1 parent 7a1d14c commit b2581ff
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 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
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ Using WASI Virt, those specific file paths can be mounted and virtualized into t

## Basic Usage

Note: This project requires [Cargo nightly](./rust-toolchain.toml).

Then:

```sh
cargo install --git https://github.com/bytecodealliance/wasi-virt
```
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 b2581ff

Please sign in to comment.