History log of /wasmtime-44.0.1/crates/test-programs/artifacts/build.rs (Results 1 – 25 of 32)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7
# 694e553b 30-Mar-2026 Dave Bakker <[email protected]>

feat(p3): implement wasi:tls (#12834)

* Split off p2-specific bits into submodule

* Vendor the 0.3.0-draft WIT files

* Host traits scaffolding

* Rename p2 test

* Work around bug in `tokio-native

feat(p3): implement wasi:tls (#12834)

* Split off p2-specific bits into submodule

* Vendor the 0.3.0-draft WIT files

* Host traits scaffolding

* Rename p2 test

* Work around bug in `tokio-native-tls`

* Create error type

* Implement p3

Co-authored-by: Roman Volosatovs <[email protected]>

* Fix test on Windows' SChannel

Same reason as described in https://github.com/bytecodealliance/wasmtime/pull/11064

* Satisfy clippy

* Fix typo

---------

Co-authored-by: Roman Volosatovs <[email protected]>

show more ...


# 856fb272 27-Mar-2026 Chris Fallin <[email protected]>

Debugging: add integration test with LLDB and some minor tweaks. (#12856)

This PR adds:

- An integration-test that runs LLDB against the Wasmtime CLI to
verify basic debugging functionality, simi

Debugging: add integration test with LLDB and some minor tweaks. (#12856)

This PR adds:

- An integration-test that runs LLDB against the Wasmtime CLI to
verify basic debugging functionality, similar to the existing
native-debug tests.

- A CI job that runs the above in CI.

- Some minor tweaks to the gdbstub debugger design:
- Rather than the initial single-step to get to the first Wasm
instruction where module(s) will be instantiated into the store
and visible to the debugger, we pre-register modules with the
store eagerly. This avoids the slightly hacky flow and also is a
preparation step for `wasmtime serve` debugging, where we can't
single-step into execution eagerly (because execution doesn't
start at all until an HTTP request arrives).
- Add a separate message-printing path for "debugger info messages",
allowing us to print the "debugger is listening on <PORT>" message
without inheriting stderr for the whole debugger component
environment. This message is necessary for the above integration
test (it parses the message to determine when the debuggee is ready).

show more ...


Revision tags: v43.0.0
# 133a0ef4 13-Mar-2026 Chris Fallin <[email protected]>

Debugging: add the debug-main world. (#12756)

* Debugging: add the debug-main world.

This PR "draws the rest of the owl" for the debug-main
world (bytecodealliance/rfcs#45). This includes a WIT wor

Debugging: add the debug-main world. (#12756)

* Debugging: add the debug-main world.

This PR "draws the rest of the owl" for the debug-main
world (bytecodealliance/rfcs#45). This includes a WIT world that hosts
debug components that have access to "host debug powers" via a
debugging API, and the ability to load such a debug-component and give
it control of the main program as a debuggee when using `wasmtime
run`.

The WIT is namespaced to `bytecodealliance:wasmtime` and is slightly
aspirational in places: for example, the host does not yet implement
injection of early return values or exception-throws. I intend to fill
out a series of TODO issues once this all lands to track followup
("post-MVP") work.

This PR does not include any debug components. I separately have a
gdbstub component, with which I tested and co-developed this host-side
implementation. My plan is to land it in a followup PR as a component
that will be embedded in/shipped with the Wasmtime CLI and available
under an easy-to-use CLI option. Once we have that gdbstub component,
we can also implement end-to-end integration tests that boot up LLDB
and run through an expected interaction. (Separately, those
integration tests will require a release of wasi-sdk to ship an LLDB
binary that we can use.) As such, there are no real tests in this PR:
interesting behaviors only really occur with a full end-to-end flow.

The integration with the CLI is a little awkward (we internally build
another `wasmtime run` command that invokes the debug component, and
tie it together with the debuggee via a special `invoke_debugger` API;
this seemed less bad than reworking all of the WASI setup to be more
reusable). Happy to take more ideas here.

* Review feedback.

* Review feedback.

* Review feedback: update vendor-wit.sh.

* Review feedback: -Ddebugger-arg= -> -Darg=.

* Review feedback.

* Review feedback.

* Review feedback: factor host.rs into several submodules.

* Review feedback: rename Debugger to Debuggee on host side.

* Review feedback: split inherit_stdin_stdout, and add corresponding options for the debug component.

* Review feedback.

* Review feedback.

* Add simple debug-component tests.

* Add wasm32-wasip2 target in a few places in CI

* Cargo vets for wstd dependency.

* Add wasm32-wasip2 in more places

* fix debug-component test dependence on componentization byte offsets

* Review feedback.

* Fix cancel-safety of EventFuture.

* Fix: Interrupted events should only occur after interrupt(), not on every epoch yield.

* Review feedback.

* Review feedback: strip down WASI imports in debugger world.

* fold debugger test component back into wasip1 + adapter test artifact compilation flow

show more ...


Revision tags: v42.0.1
# 301dc716 24-Feb-2026 Alex Crichton <[email protected]>

Fix two security advisories. (#12652)

* Fix two security advisories.

This commit contains merged fixes for two security advisories in
Wasmtime:

* GHSA-852m-cvvp-9p4w
* GHSA-243v-98vx-264h

This in

Fix two security advisories. (#12652)

* Fix two security advisories.

This commit contains merged fixes for two security advisories in
Wasmtime:

* GHSA-852m-cvvp-9p4w
* GHSA-243v-98vx-264h

This introduces new knobs to Wasmtime to limit the scope of resources
that WASI implementations will allocate on behalf of guests. Unlike
backports to 41.0.x-and-prior these knobs all have default values which
are considered reasonable for hosts if they don't further tune them. The
following CLI knobs have been added:

* `-Smax-resources` - limits the total component-model resources a guest
can allocate in a table
* `-Shostcall-fuel` - a broad limit which enforces that at most this
amount of data will be copied from the guest to the host in any one
API call (e.g. `string` values can't be too big, `list<string>` can't
be quadratic, etc). This fuel is reset on each host function call.
* `-Smax-random-size` - the maximal size of the return value of the
`get-random-bytes` and `get-insecure-random-bytes` WASI functions.
* `-Smax-http-fields-size` - a limit on the size of `wasi:http` `fields`
values to avoid infinitely buffering data within the host.

The `http` crate has additionally been updated to avoid a panic when
adding too many headers to a `fields` object.

Co-authored-by: Mark Bundschuh <[email protected]>
Co-authored-by: Pat Hickey <[email protected]>
Co-authored-by: Joel Dice <[email protected]>

* CI fixes

* Run rustfmt
* Fix wasi-common build

* Fix tests on 32-bit

* Fix nightly test expectations

prtest:full

---------

Co-authored-by: Mark Bundschuh <[email protected]>
Co-authored-by: Pat Hickey <[email protected]>
Co-authored-by: Joel Dice <[email protected]>

show more ...


Revision tags: v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3
# e472f50c 23-Jan-2026 Alex Crichton <[email protected]>

Fix component-async fuzzer on OSS-Fuzz (#12400)

On OSS-Fuzz the fuzzers are built in one place and run in another, so
`include_bytes!` is needed to get the wasm into the final binary. This
is done w

Fix component-async fuzzer on OSS-Fuzz (#12400)

On OSS-Fuzz the fuzzers are built in one place and run in another, so
`include_bytes!` is needed to get the wasm into the final binary. This
is done with a layer of macros to avoid an `include_bytes!` for all wasm
programs which would make the generated Rust metadata a bit... large.

show more ...


Revision tags: v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0
# fee9be21 09-Dec-2025 Alex Crichton <[email protected]>

Add a new fuzzer focused on component-model-async events (#12119)

* Add a new fuzzer focused on component-model-async events

This commit adds a new fuzzer mode to the `misc` fuzzer of Wasmtime
whic

Add a new fuzzer focused on component-model-async events (#12119)

* Add a new fuzzer focused on component-model-async events

This commit adds a new fuzzer mode to the `misc` fuzzer of Wasmtime
which is focused on async events and interleavings of components using
the component-model-async proposal. This fuzzer works by having a
precompiled guest program which serves as the component to run. This
precompiled component has a custom `fuzz.wit` which is used to interface
with the fuzzer itself. The fuzzer is then a fuzz-generated sequence of
commands to send to the component which verifies that everything
executes correctly, has no panics, etc.

This fuzzer intends to stress async communication and task
infrastructure with component-model-async. Notably this does not stress
lifting/lowering or arbitrary type signatures. This does, however,
permute all of the following:

* Guest/host interactions (also guest/guest, host/host, etc).
* Async functions, both ready and pending.
* Future operations: reads, writes, cancellation, transfers, etc.
* Stream operations: reads, writes, cancellation, transfers, etc.

This is all throwing into a large "soup" and then asserted to work
correctly. There's a few gotchas here and there for how this fuzzer is
designed, such as some events requiring "yield N times to await this
event happening". This is required because Wasmtime is allowed to
non-deterministically select between a number of "ready events" and what
to dispatch.

This is not intended to be a one-size-fits-all fuzzer for
component-model-async. The recent enhancements to the `component_api`
fuzzer are intended to complement this fuzzer in terms of what's
stressed where internally.

* Review comments

show more ...


Revision tags: v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1
# 33224b22 17-Oct-2025 Alex Crichton <[email protected]>

Use the same `cc` extension for C++ files (#11881)

* Use the same `cc` extension for C++ files

Rename a few stragglers using `*.cpp` to `*.cc` to have consistent
syntax throughout the repository.

Use the same `cc` extension for C++ files (#11881)

* Use the same `cc` extension for C++ files

Rename a few stragglers using `*.cpp` to `*.cc` to have consistent
syntax throughout the repository.

* Fix another reference

* Rename more extensions

show more ...


# b315a0a8 14-Oct-2025 Yosh <[email protected]>

Rename test programs (#11828)

* exclude DS_Store files from git diffs

* "preview" -> "p" prefix in test programs

* fix test building

* prefix http tests as p2_http

* rename more tests

* rename

Rename test programs (#11828)

* exclude DS_Store files from git diffs

* "preview" -> "p" prefix in test programs

* fix test building

* prefix http tests as p2_http

* rename more tests

* rename another file

* get more tests to pass

* fix build.rs

* finish renaming tests

* undo DS_Store addition

* fix remaining naming issues

* debug print on failing test

* debug again

* again

* remove debug annotations

* prefix cli_serve_sleep

* final touches

show more ...


Revision tags: v37.0.2, v37.0.1, v37.0.0
# 1df12556 02-Sep-2025 Alex Crichton <[email protected]>

Update and refactor how wasi-testsuite is run (#11560)

* Update and refactor how wasi-testsuite is run

This commit updates the `WebAssembly/wasi-testuite` submodule in this
repository which hasn't

Update and refactor how wasi-testsuite is run (#11560)

* Update and refactor how wasi-testsuite is run

This commit updates the `WebAssembly/wasi-testuite` submodule in this
repository which hasn't been updated once in the past 2 years. This then
additionally refactors how tests are run:

* A new top-level test is added at `tests/wasi.rs` similar to
`tests/wast.rs`.
* The top-level test uses `libtest_mimic` to enable running tests in
parallel.
* Using `libtest_mimic` enables running a test-at-a-time.
* Using `libtest_mimic` enables seeing a list of failures instead of
just the first failure.
* Component versions of tests are run in addition to core wasm versions
of tests.
* Minor updates are made to the adapter and wasmtime-wasi to get some
tests passing.
* The list of allowed failures is updated with a `FIXME`-per-test of
what's remaining.

prtest:full

* Fix in-tree tests with new behavior

* Add Windows exemptions

* Fix tests with wasi-common

show more ...


Revision tags: v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2
# d34bc530 16-Jul-2025 Roman Volosatovs <[email protected]>

feat: begin wasip3 implementation (#11221)

* ci: add subdir support

Signed-off-by: Roman Volosatovs <[email protected]>

* feat: extract common `WasiCtxBuilder`

Signed-off-by: Roman Volosatov

feat: begin wasip3 implementation (#11221)

* ci: add subdir support

Signed-off-by: Roman Volosatovs <[email protected]>

* feat: extract common `WasiCtxBuilder`

Signed-off-by: Roman Volosatovs <[email protected]>

* chore: vendor p3 WIT

Signed-off-by: Roman Volosatovs <[email protected]>

* feat: begin wasip3 implementation

Signed-off-by: Roman Volosatovs <[email protected]>

* chore(wasip3): remove now-redundant async stubs

Signed-off-by: Roman Volosatovs <[email protected]>

* test(wasip3): link wasip2

Signed-off-by: Roman Volosatovs <[email protected]>

* refactor: `allow` -> `expect`

Signed-off-by: Roman Volosatovs <[email protected]>

* chore: add bindgen `tracing` issue ref

ref https://github.com/bytecodealliance/wasmtime/issues/11245

Signed-off-by: Roman Volosatovs <[email protected]>

* chore: adapt to `Accessor` API changes

- hide `CommandPre`, since it is currently unusable
https://github.com/bytecodealliance/wasmtime/issues/11249
- use `Command::new` directly in examples, since `instantiate_async`
does not provide a way to call an export

Signed-off-by: Roman Volosatovs <[email protected]>

* doc: add a link to p3 `add_to_linker`

Signed-off-by: Roman Volosatovs <[email protected]>

---------

Signed-off-by: Roman Volosatovs <[email protected]>

show more ...


# 804060c8 11-Jul-2025 Joel Dice <[email protected]>

add Component Model async ABI tests (#11136)

* add Component Model async ABI tests

This pulls in the tests from the `wasip3-prototyping` repo, minus the ones
requiring WASIp3 support in `wasmtime-w

add Component Model async ABI tests (#11136)

* add Component Model async ABI tests

This pulls in the tests from the `wasip3-prototyping` repo, minus the ones
requiring WASIp3 support in `wasmtime-wasi[-http]`, which will be PR'd
separately.

* add audits and exemptions for new `component-async-tests` deps

In order to convince `cargo vet` that we only needed these deps to be
`safe-to-run` (not necessarily `safe-to-deploy`, since it's test code), I've
moved the `wasm-compose` dep to the `dev-dependencies` section of the
`Cargo.toml` file, which required rearranging some code.

I've exempted `wasm-compose` since it's a BA project, and also exempted all but
one of the remaining new deps since they each get well over 10,000 downloads per
day from crates.io. I've audited and certified the remaining dep, `im-rc`,
which came in a bit shy of the 10,000-per-day mark.

Signed-off-by: Joel Dice <[email protected]>

* simplify `component_async_tests::util::sleep`

Signed-off-by: Joel Dice <[email protected]>

---------

Signed-off-by: Joel Dice <[email protected]>

show more ...


Revision tags: v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0
# a7d9f3e1 20-Jun-2025 Philip Craig <[email protected]>

Avoid running wasm-opt when compiling test programs (#11075)

wasm-opt will strip DWARF debug info, which causes a test failure for
debug::lldb::dwarf_codegen_optimized_wasm_optimized.

clang automat

Avoid running wasm-opt when compiling test programs (#11075)

wasm-opt will strip DWARF debug info, which causes a test failure for
debug::lldb::dwarf_codegen_optimized_wasm_optimized.

clang automatically runs wasm-opt if it is found in PATH and if optimization
is enabled. clang-20 has a --no-wasm-opt option, but that doesn't work
for wasi-sdk-25.

show more ...


Revision tags: v33.0.0
# 99507c2c 24-Apr-2025 Alex Crichton <[email protected]>

Consolidate building guest programs for tests (#10654)

* Consolidate building guest programs for tests

This commit folds all C/C++ tests for debuginfo into the same location
as Rust programs compil

Consolidate building guest programs for tests (#10654)

* Consolidate building guest programs for tests

This commit folds all C/C++ tests for debuginfo into the same location
as Rust programs compiled to wasm. That means that all of
`tests/all/debug/testsuite/*` is moved to
`crates/test-programs/src/bin/*`. Additionally the hardcoded per-test
configuration in `crates/test-programs/artifacts/build.rs` was removed
in favor of in-test configuration at the top of the file. This means
that all precompiled binaries are removed from the tree for DWARF
testing.

Various offsets were updated, a test was dropped as it wasn't used, and
some commands/directives were updated to account for this adjustment.

prtest:debug

* Adjust a lint setting

show more ...


Revision tags: v32.0.0
# 5b63c874 15-Apr-2025 SingleAccretion <[email protected]>

[DI] Fix live range tracking off-by-one confusions (#10570)

* Dump blocks in the VL table

* Add a test

* Work around #10572 in tests

* [DI] Fix live range tracking off-by-one confusions

How thin

[DI] Fix live range tracking off-by-one confusions (#10570)

* Dump blocks in the VL table

* Add a test

* Work around #10572 in tests

* [DI] Fix live range tracking off-by-one confusions

How things used to work w.r.t. instruction indices (IIs):
1) In lowering:
- Reversed order: IIs represented "before IP"s.
- Block args were defined one instruction too late,
but this issue was masked due to how RA allocates,
at least in simple examples.
- Execution order: IIs represented "after IP"s.
2) In RA:
- IIs represented "before IP"s.
- Notice the mismatch.
3) In emit:
- RA directions w.r.t. the explicit ProgPoint
positions were not respected and always treated
as "after".

How things work after this change:
1) In lowering:
- Reversed order: IIs represent "after IP"s.
- Execution order: IIs represent "before IP"s.
2) In RA:
- No change; mismatch fixed.
3) In emit:
- ProgPoint positions now respected.

This fixes various "silent bad debug info" issues.

show more ...


Revision tags: v31.0.0
# 8e883429 20-Mar-2025 Alex Crichton <[email protected]>

Update some dependencies on their major version tracks (#10425)

* Update rustix to 1.0.x

* Bump itertools to its latest version

* Update base64 to its latest version

* Update wit-bindgen to its l

Update some dependencies on their major version tracks (#10425)

* Update rustix to 1.0.x

* Bump itertools to its latest version

* Update base64 to its latest version

* Update wit-bindgen to its latest version

* Update v8 to its latest version on crates.io

Just keeping up-to-date

* Update capstone dependency to its latest version

* Update libtest-mimic to its latest version

* Update cargo-metadata dependency

* Update thiserror dependency to latest

* Update bytesize dependency

* Drop getrandom dependency from test-programs

Favor using `wasi::random_get` instead for now.

* Fix deny.toml syntax

* Fix merge conflict

* Downgrade v8 to respect MSRV

* Fix compile on windows

show more ...


# d2c9d2a2 17-Mar-2025 SingleAccretion <[email protected]>

[DWARF] Fix the loclist to exprloc optimization (#10400)

* Add a test

* Fix the loclist -> exprloc optimization

The expression must be valid over the entire parent scope.


# e8d5e3ae 07-Mar-2025 James Sturtevant <[email protected]>

Initial implementation of Wasi-tls (Transport Layer Security) (#10249)

* Initial implementation of wasi-tls

This crate provides the Wasmtime host implementation for the [wasi-tls] API.
The [wasi-t

Initial implementation of Wasi-tls (Transport Layer Security) (#10249)

* Initial implementation of wasi-tls

This crate provides the Wasmtime host implementation for the [wasi-tls] API.
The [wasi-tls] world allows WebAssembly modules to perform SSL/TLS operations,
such as establishing secure connections to servers. TLS often relies on other wasi networking systems
to provide the stream so it will be common to enable the [wasi:cli] world as well with the networking features enabled.

The initial implemntation is using rustls.

Signed-off-by: James Sturtevant <[email protected]>

* Remove configuration object for now

Signed-off-by: James Sturtevant <[email protected]>

* Update cargo patch to use temp branch

Signed-off-by: James Sturtevant <[email protected]>

* Rename tcp streams to wasistreams to be more generic

Signed-off-by: James Sturtevant <[email protected]>

* gate the wasi-tls ctx behind a feature

Signed-off-by: James Sturtevant <[email protected]>

* cleanup and clippy fixes

Signed-off-by: James Sturtevant <[email protected]>

* Fix issue when another pollable cancels

Signed-off-by: James Sturtevant <[email protected]>

* prtest:full

Signed-off-by: James Sturtevant <[email protected]>

* Skip test on riscv64/s390x

Signed-off-by: James Sturtevant <[email protected]>

* Drop debug info to support tests on pulley based platforms

Signed-off-by: James Sturtevant <[email protected]>

* Update signature of `close-notify`

* Use draft version

Signed-off-by: James Sturtevant <[email protected]>

* Remove patches

Signed-off-by: James Sturtevant <[email protected]>

* Ungate tls on riscv64 and s390x

* Un-gate wais-http on riscv64/s390x as well

* Add wasmtime-wasi-tls to publish list

* Add wasmtime-wasi-tls to public API crate list

* Revert some changes to Cargo.lock

---------

Signed-off-by: James Sturtevant <[email protected]>
Signed-off-by: James Sturtevant <[email protected]>
Co-authored-by: badeend <[email protected]>
Co-authored-by: Alex Crichton <[email protected]>

show more ...


# a2975d7b 06-Mar-2025 SingleAccretion <[email protected]>

[DWARF] Basic infrastructure for compiling test assets from source (#10193)

* CI

* Source

* Remove generic.wasm from source control


# 3e0393c5 27-Feb-2025 Alex Crichton <[email protected]>

Improve rebuild detection of test-programs (#10303)

This commit improves the logic of detecting when to rebuild the
`test-programs` artifacts used during test by parsing the `*.d` files
that Cargo e

Improve rebuild detection of test-programs (#10303)

This commit improves the logic of detecting when to rebuild the
`test-programs` artifacts used during test by parsing the `*.d` files
that Cargo emits as part of its compilation and using that as the
`cargo:rerun-if-changed` directive. This not only includes what was
previously depended on but additionally includes features such as `path`
dependencies which might temporarily be used during development.

show more ...


Revision tags: v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1, v28.0.0, v27.0.0, v26.0.1, v25.0.3, v24.0.2, v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1
# b483708c 09-Oct-2024 Xinzhao Xu <[email protected]>

Rename wasi-runtime-config to wasi-config (#9404)

* Rename wasi-runtime-config to wasi-config

* Remove audit-as-cratesio entry

This crate no longer exists on crates.io so cargo-vet is failing

---

Rename wasi-runtime-config to wasi-config (#9404)

* Rename wasi-runtime-config to wasi-config

* Remove audit-as-cratesio entry

This crate no longer exists on crates.io so cargo-vet is failing

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v25.0.1, v25.0.0, v24.0.0, v23.0.2
# dfc4358d 26-Jul-2024 Xinzhao Xu <[email protected]>

Implement wasi-keyvalue (#8983)

* Implement wasi-keyvalue

* Allow preset data for In-Memory provider, rename allow_hosts to allow_redis_hosts

* Add vets

---------

Co-authored-by: Alex Crichton <

Implement wasi-keyvalue (#8983)

* Implement wasi-keyvalue

* Allow preset data for In-Memory provider, rename allow_hosts to allow_redis_hosts

* Add vets

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


# 05095c18 25-Jul-2024 Alex Crichton <[email protected]>

Rename the `wasm32-wasi` target to `wasm32-wasip1` (#8867)

This rename is happening in upstream Rust and should be in enough places
now.

prtest:full


Revision tags: v23.0.1, v23.0.0
# 0a296b3e 17-Jul-2024 Xinzhao Xu <[email protected]>

Implement wasi-runtime-config (#8950)

* Implement wasi-runtime-config

* Avoid clone the WasiRuntimeConfig every time


# 0f4ae88a 27-Jun-2024 Andrew Brown <[email protected]>

wasi-nn: use resources (#8873)

* wasi-nn: use resources

Recent discussion in the wasi-nn proposal (see [wasi-nn#59], e.g.) has
concluded that the right approach for representing wasi-nn "things"
(t

wasi-nn: use resources (#8873)

* wasi-nn: use resources

Recent discussion in the wasi-nn proposal (see [wasi-nn#59], e.g.) has
concluded that the right approach for representing wasi-nn "things"
(tensors, graph, etc.) is with a component model _resource_. This
sweeping change brings Wasmtime's implementation in line with that
decision.

Initially I had structured this PR to remove all of the WITX-based
implementation (#8530). But, after consulting in a Zulip [thread] on
what other WASI proposals aim to do, this PR pivoted to support _both_`
the WITX-based and WIT-based ABIs (e.g., preview1 era versus preview2,
component model era). What is clear is that the WITX-based specification
will remain "frozen in time" while the WIT-based implementation moves
forward.

What that means for this PR is a "split world" paradigm. In many places,
we have to distinguish between the `wit` and `witx` versions of the same
thing. This change isn't the end state yet: it's a big step forward
towards bringing Wasmtime back in line with the WIT spec but, despite my
best efforts, doesn't fully fix all the TODOs left behind over several
years of development. I have, however, taken the liberty to refactor and
fix various parts as I came across them (e.g., the ONNX backend). I plan
to continue working on this in future PRs to figure out a good error
paradigm (the current one is too wordy) and device residence.

[wasi-nn#59]: https://github.com/WebAssembly/wasi-nn/pull/59
[thread]: https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/wasi-nn's.20preview1.20vs.20preview2.20timeline

prtest:full

* vet: audit `ort`-related crate updates

* Simplify `WasiNnView`

With @alexcrichton's help, this change removes the `trait WasiNnView`
and `struct WasiNnImpl` wrapping that the WIT-based implementation used
for accessing the host context. Instead, `WasiNnView` is now a `struct`
containing the mutable references it needs to make things work. This
unwraps one complex layer of abstraction, though it does have the
downside that it complicates CLI code to split borrows of `Host`.

* Temporarily disable WIT check

* Refactor errors to use `trappable_error_type`

This change simplifies the return types of the host implementations of
the WIT-based wasi-nn. There is more work to be done with errors, e.g.,
to catch up with the upstream decision to return errors as resources.
But this is better than the previous mess.

show more ...


# 00c15df9 21-Jun-2024 Alex Crichton <[email protected]>

Revert "wasi-adapter: Implement provider crate that embeds the adapter binaries (#8792)" (#8856)

* Revert "wasi-adapter: Implement provider crate that embeds the adapter binaries (#8792)"

This reve

Revert "wasi-adapter: Implement provider crate that embeds the adapter binaries (#8792)" (#8856)

* Revert "wasi-adapter: Implement provider crate that embeds the adapter binaries (#8792)"

This reverts commit 2dbf8f15b3c07b51d090782d9be7172358799563.

* Enable requisite feature for cranelift-frontend testing

show more ...


12