Skip to content

Commit 18aff9a

Browse files
authored
Integrate wizer into this repository (#11805)
* Remove misc wizer-related files * Integrate the Wizer manifest with this repo's workspace * Enable some more wasmtime features * Get wizer tests passing in-repo * Remove duplicate dummy wizer module * Integer `wasmtime wizer` subcommand into the CLI * Fully integrate wizer into `wasmtime` CLI * Split `wasmtime run` into helper functions * Split `Wizer::run` into helper functions * Weave the two together in `wasmtime wizer` The end goal is to have all CLI options in `wasmtime run` applicable for `wasmtime wizer` as well with some light edits between the two. Overall though we shouldn't have to proactively support commands in one or the other and everything ideally should "just work". * Fix clippy warnings and bench compiles * Fix benchmarks * Create a store-per-iteration * Use the right wasms in the regex benchmark * Get wizer fuzzer building again * Get CLI working again * Run rustfmt * Remove precompiled wasms from the tree 35M for some wasms is a bit heavy so instead build them from source. * Update vet configuration for fuzzers/tests * Update publish script with wasmtime-wizer * Fix clippy lint * Some docs and more clippy lints prtest:full * Relax version requirement * Try to fix asan build * Remove rustflags too * Un-exclude wizer * Adjust publish script * Update lock file after rebase * Integrate bytecodealliance/wizer#139 Use deterministic results for relaxed simd operations by default. * Handle preloads in wizer * Appease clippy * Use deterministic relaxed simd in wizer tests
1 parent 7f8607e commit 18aff9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+768
-6304
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ jobs:
623623
- run: cargo fuzz build --dev --fuzz-dir ./cranelift/isle/fuzz
624624
- run: cargo fuzz build --dev --fuzz-dir ./crates/environ/fuzz --features component-model
625625
- run: cargo fuzz build --dev --fuzz-dir ./cranelift/assembler-x64/fuzz
626+
- run: cargo fuzz build --dev --fuzz-dir ./crates/wizer/fuzz
626627

627628
# Perform all tests of the c-api
628629
test_capi:

Cargo.lock

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ wasmtime-wasi-keyvalue = { workspace = true, optional = true }
5959
wasmtime-wasi-threads = { workspace = true, optional = true }
6060
wasmtime-wasi-http = { workspace = true, optional = true }
6161
wasmtime-unwinder = { workspace = true }
62+
wasmtime-wizer = { workspace = true, optional = true, features = ['clap'] }
6263
clap = { workspace = true }
6364
clap_complete = { workspace = true, optional = true }
6465
anyhow = { workspace = true, features = ['std'] }
@@ -160,6 +161,10 @@ members = [
160161
"crates/wasi-preview1-component-adapter",
161162
"crates/wasi-preview1-component-adapter/verify",
162163
"crates/wasi-tls-nativetls",
164+
"crates/wizer/fuzz",
165+
"crates/wizer/tests/regex-test",
166+
"crates/wizer/benches/regex-bench",
167+
"crates/wizer/benches/uap-bench",
163168
"examples/fib-debug/wasm",
164169
"examples/wasm",
165170
"examples/tokio/wasm",
@@ -172,7 +177,6 @@ members = [
172177
]
173178
exclude = [
174179
'docs/rust_wasi_markdown_parser',
175-
'crates/wizer',
176180
]
177181

178182
[workspace.package]
@@ -266,6 +270,7 @@ wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version
266270
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=39.0.0", package = 'wasmtime-internal-wit-bindgen' }
267271
wasmtime-math = { path = "crates/math", version = "=39.0.0", package = 'wasmtime-internal-math' }
268272
wasmtime-unwinder = { path = "crates/unwinder", version = "=39.0.0", package = 'wasmtime-internal-unwinder' }
273+
wasmtime-wizer = { path = "crates/wizer", version = "39.0.0" }
269274

270275
# Miscellaneous crates without a `wasmtime-*` prefix in their name but still
271276
# used in the `wasmtime-*` family of crates depending on various features/etc.
@@ -415,6 +420,8 @@ termcolor = "1.4.1"
415420
flate2 = "1.1.4"
416421
tokio-util = "0.7.16"
417422
arbtest = "0.3.2"
423+
rayon = "1.5.3"
424+
regex = "1.9.1"
418425

419426
# =============================================================================
420427
#
@@ -441,6 +448,7 @@ default = [
441448
"config",
442449
"completion",
443450
"objdump",
451+
"wizer",
444452

445453
# On-by-default WASI features
446454
"wasi-nn",
@@ -565,6 +573,12 @@ objdump = [
565573
'dep:gimli',
566574
'pulley-interpreter/disas',
567575
]
576+
wizer = [
577+
"wasmtime-wizer",
578+
"dep:wasmtime-wasi",
579+
"dep:wasi-common",
580+
"dep:tokio",
581+
]
568582

569583
[[test]]
570584
name = "disas"

crates/wasmtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ serde_json = { workspace = true, optional = true }
4747
postcard = { workspace = true }
4848
indexmap = { workspace = true }
4949
once_cell = { version = "1.12.0", optional = true }
50-
rayon = { version = "1.0", optional = true }
50+
rayon = { workspace = true, optional = true }
5151
object = { workspace = true, features = ['unaligned'] }
5252
async-trait = { workspace = true, optional = true }
5353
encoding_rs = { version = "0.8.31", optional = true }

crates/wasmtime/src/runtime/component/func/options.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ pub struct LiftContext<'a> {
479479

480480
calls: &'a mut CallContexts,
481481

482-
#[cfg_attr(not(feature = "component-model-async"), allow(unused))]
482+
#[cfg_attr(
483+
not(feature = "component-model-async"),
484+
allow(unused, reason = "easier to not #[cfg] away")
485+
)]
483486
concurrent_state: &'a mut ConcurrentState,
484487
}
485488

crates/wizer/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

crates/wizer/CONTRIBUTING.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)