Fixes for cargo publish (#1416)
* Publishing fixes. * Make WASI a symlink. * More fixes. * Cargo doesn't allow dev-dependencies to have optional features. * Remove the symlink. * Add WASI as another git submodule.
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -202,7 +202,7 @@ jobs:
|
||||
- run: cargo run -p run-examples
|
||||
|
||||
# Build and test all features except for lightbeam
|
||||
- run: cargo test --features test_programs --all --exclude lightbeam --exclude wasmtime-c-api -- --nocapture
|
||||
- run: cargo test --features test-programs/test_programs --all --exclude lightbeam --exclude wasmtime-c-api -- --nocapture
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
RUSTFLAGS: "-D warnings"
|
||||
@@ -381,7 +381,7 @@ jobs:
|
||||
- run: $CENTOS cargo build --release --manifest-path crates/c-api/Cargo.toml
|
||||
shell: bash
|
||||
# Test what we just built
|
||||
- run: $CENTOS cargo test --features test_programs --release --all --exclude lightbeam --exclude wasmtime --exclude wasmtime-c-api --exclude wasmtime-fuzzing
|
||||
- run: $CENTOS cargo test --features test-programs/test_programs --release --all --exclude lightbeam --exclude wasmtime --exclude wasmtime-c-api --exclude wasmtime-fuzzing
|
||||
shell: bash
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -7,3 +7,6 @@
|
||||
[submodule "crates/wasi-common/WASI"]
|
||||
path = crates/wasi-common/wig/WASI
|
||||
url = https://github.com/WebAssembly/WASI
|
||||
[submodule "WASI"]
|
||||
path = crates/wasi-common/WASI
|
||||
url = https://github.com/WebAssembly/WASI
|
||||
|
||||
@@ -43,9 +43,6 @@ rayon = "1.2.1"
|
||||
[dev-dependencies]
|
||||
wasmtime-runtime = { path = "crates/runtime", version = "0.13.0" }
|
||||
more-asserts = "0.2.1"
|
||||
# This feature requires the wasm32-wasi target be installed. It enables
|
||||
# wasm32-wasi integration tests. To enable, run
|
||||
# `cargo test --features test-programs`.
|
||||
test-programs = { path = "crates/test-programs" }
|
||||
tempfile = "3.1.0"
|
||||
filecheck = "0.5.0"
|
||||
@@ -79,7 +76,6 @@ lightbeam = [
|
||||
"wasmtime/lightbeam",
|
||||
]
|
||||
jitdump = ["wasmtime/jitdump"]
|
||||
test_programs = ["test-programs/test_programs"]
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
@@ -9,6 +9,7 @@ keywords = ["webassembly", "wasm"]
|
||||
repository = "https://github.com/bytecodealliance/wasmtime"
|
||||
readme = "README.md"
|
||||
edition = "2018"
|
||||
include = ["src/**/*", "LICENSE", "WASI/phases"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
|
||||
@@ -60,10 +60,10 @@ rustup target add wasm32-wasi
|
||||
[rustup]: https://rustup.rs
|
||||
|
||||
Now, you should be able to run the integration testsuite by running `cargo test` on the
|
||||
`test-programs` package with `test_programs` feature enabled:
|
||||
`test-programs` package with `test-programs/test_programs` feature enabled:
|
||||
|
||||
```
|
||||
cargo test --features test_programs --package test-programs
|
||||
cargo test --features test-programs/test_programs --package test-programs
|
||||
```
|
||||
|
||||
## Third-Party Code
|
||||
|
||||
1
crates/wasi-common/WASI
Submodule
1
crates/wasi-common/WASI
Submodule
Submodule crates/wasi-common/WASI added at 068b282abf
@@ -4,7 +4,7 @@
|
||||
use crate::WasiCtx;
|
||||
|
||||
wiggle::from_witx!({
|
||||
witx: ["wig/WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
||||
witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
||||
ctx: WasiCtx,
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ rustup target add wasm32-wasi
|
||||
Next, to run all tests including the WASI integration tests, execute this command:
|
||||
|
||||
```shell
|
||||
cargo test --features test_programs --all
|
||||
cargo test --features test-programs/test_programs --all
|
||||
```
|
||||
|
||||
You can also exclude a particular crate from testing with `--exclude`. For
|
||||
@@ -78,7 +78,7 @@ can be useful when working on the `wasi-common` crate. This can be done by
|
||||
executing this command:
|
||||
|
||||
```shell
|
||||
cargo test --features test_programs -p test-programs
|
||||
cargo test --features test-programs/test_programs -p test-programs
|
||||
```
|
||||
|
||||
## Adding New Tests
|
||||
|
||||
@@ -36,7 +36,7 @@ do
|
||||
|
||||
# Sleep for a few seconds to allow the server to update the index.
|
||||
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
|
||||
echo sleep 10
|
||||
echo sleep 20
|
||||
done
|
||||
|
||||
echo git tag cranelift-v$(grep version cranelift/Cargo.toml | head -n 1 | cut -d '"' -f 2)
|
||||
|
||||
@@ -11,7 +11,7 @@ topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
# Publishing Wasmtime requires publishing any local Cranelift changes.
|
||||
./publish-cranelift.sh
|
||||
scripts/publish-cranelift.sh
|
||||
|
||||
# Commands needed to publish.
|
||||
#
|
||||
@@ -21,12 +21,16 @@ for cargo_toml in \
|
||||
crates/wasi-common/winx/Cargo.toml \
|
||||
crates/wasi-common/yanix/Cargo.toml \
|
||||
crates/wasi-common/wig/Cargo.toml \
|
||||
crates/wiggle/crates/runtime/Cargo.toml \
|
||||
crates/wiggle/crates/generate/Cargo.toml \
|
||||
crates/wiggle/crates/test/Cargo.toml \
|
||||
crates/wiggle/Cargo.toml \
|
||||
crates/wasi-common/Cargo.toml \
|
||||
crates/lightbeam/Cargo.toml \
|
||||
crates/profiling/Cargo.toml \
|
||||
crates/environ/Cargo.toml \
|
||||
crates/obj/Cargo.toml \
|
||||
crates/runtime/Cargo.toml \
|
||||
crates/profiling/Cargo.toml \
|
||||
crates/debug/Cargo.toml \
|
||||
crates/jit/Cargo.toml \
|
||||
crates/api/Cargo.toml \
|
||||
@@ -47,7 +51,7 @@ for cargo_toml in \
|
||||
|
||||
# Sleep for a few seconds to allow the server to update the index.
|
||||
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
|
||||
echo sleep 10
|
||||
echo sleep 20
|
||||
done
|
||||
|
||||
echo echo git tag v$(grep "version =" Cargo.toml | head -n 1 | cut -d '"' -f 2)
|
||||
|
||||
Reference in New Issue
Block a user