-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[20.0.0] More backports of fixes, mostly c-api related #8368
Merged
fitzgen
merged 11 commits into
bytecodealliance:release-20.0.0
from
alexcrichton:more-backports
Apr 15, 2024
Merged
[20.0.0] More backports of fixes, mostly c-api related #8368
fitzgen
merged 11 commits into
bytecodealliance:release-20.0.0
from
alexcrichton:more-backports
Apr 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ytecodealliance#8344) This renames some types and adds some type aliases to help us better distinguish between `wasm.h` APIs and `wasmtime.h` APIs, primarily for `Store`-related types. In general, `WasmFoo` is related to `wasm.h` and `WasmtimeFoo` is related to `wasmtime.h`. * `StoreRef` -> `WasmStoreRef` * Introduce the `WasmStore[Data]` and `WasmStoreContext[Mut]` aliases * `StoreData` -> `WasmtimeStoreData` * `CStoreContext[Mut]` -> `WasmtimeStoreContext[Mut]` * Introduce the `Wasmtime{Store,Caller}` aliases
…Is (bytecodealliance#8345) * c-api: Better differentiate between `wasm.h` and `wasmtime.h` APIs This renames some types and adds some type aliases to help us better distinguish between `wasm.h` APIs and `wasmtime.h` APIs, primarily for `Store`-related types. In general, `WasmFoo` is related to `wasm.h` and `WasmtimeFoo` is related to `wasmtime.h`. * `StoreRef` -> `WasmStoreRef` * Introduce the `WasmStore[Data]` and `WasmStoreContext[Mut]` aliases * `StoreData` -> `WasmtimeStoreData` * `CStoreContext[Mut]` -> `WasmtimeStoreContext[Mut]` * Introduce the `Wasmtime{Store,Caller}` aliases * c-api: Improve non-support of GC references in `wasm.h` APIs A couple small tweaks: error message improvements, exhaustive matching, etc...
* Fix running wasi-common tests on CI Turns out we haven't been running wasi-common tests for some time in CI and they've started failing. Force enable the test at all times and then fix the test failures. The test failures here were introduced in bytecodealliance#8277 and weren't caught due to the test not running and the fix was to relax the implementation of `fd_pread` to avoid taking multiple mutable borrows. * Fix CI
A busy release!
Match the Wasmtime crate in this respect
…ytecodealliance#8346) Restores support for `externref` in `wasmtime_val_t`, methods for manipulating them and getting their wrapped host data, and examples/tests for these things. Additionally adds support for `anyref` in `wasmtime_val_t`, clone/delete methods similar to those for `externref`, and a few `i31ref`-specific methods. Also adds C and Rust example / test for working with `anyref`.
* Fix calculation of gc refs in functions In addition to excluding i31 also exclude funcrefs. * Review comments
) This was removed in bytecodealliance#8066
* Tidy up some headers related to shared memory * Don't declare an anonymous `struct wasmtime_sharedmemory`, instead `#include` the actual definition. * Fix an issue where a header in `sharedmemory.h` referred to a type in `extern.h` which wasn't `#include`'d. This function, `wasmtime_sharedmemory_into_extern`, additionally isn't necessary as it's no different than manually constructing it. Fix this by removing this function. * Run clang-format
* c-api: Fix alignment of `wasmtime_val_*` This commit fixes an issue where `wasmtime_val_raw_t` had an incorrect alignment. In Rust `ValRaw` contains a `u128` which has an alignment of 16 but in C the representation had a smaller alignment meaning that the alignment of the two structures was different. This was seen to cause alignment faults when structure were passed from C++ to Rust, for example. This commit changes the Rust representation of `ValRaw`'s `v128` field to do the same as C which is to use `[u8; 16]`. This avoids the need to raise the alignment in C which appears to be nontrivial. Cranelift is appropriately adjusted to understand that loads/stores from `ValRaw` are no longer aligned. Technically this only applies to the `v128` field but it's not too bad to apply it to the other fields as well. * Try alternate syntax for alignof
github-actions
bot
added
wasi
Issues pertaining to WASI
wasmtime:c-api
Issues pertaining to the C API.
wasmtime:docs
Issues related to Wasmtime's documentation
labels
Apr 15, 2024
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasi", "wasmtime:c-api", "wasmtime:docs"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Apr 15, 2024
The documentation referring to this example was removed in bytecodealliance#6994 and that forgot to remove this as well. This example is building without a lock file which is causing issues in bytecodealliance#8368.
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this pull request
Apr 15, 2024
The documentation referring to this example was removed in bytecodealliance#6994 and that forgot to remove this as well. This example is building without a lock file which is causing issues in bytecodealliance#8368.
…xample (bytecodealliance#8369) * Use `--locked` on all `cargo install` in CI Prevents any updates to rustc or crates from accidentally causing issues by ensuring that the same set of deps is used over time. * Remove rust/WASI markdown parser example The documentation referring to this example was removed in bytecodealliance#6994 and that forgot to remove this as well. This example is building without a lock file which is causing issues in bytecodealliance#8368.
alexcrichton
force-pushed
the
more-backports
branch
from
April 15, 2024 15:10
7b5fb55
to
ebbe7a7
Compare
This now additionally includes #8369 to fix CI |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 15, 2024
…xample (#8369) * Use `--locked` on all `cargo install` in CI Prevents any updates to rustc or crates from accidentally causing issues by ensuring that the same set of deps is used over time. * Remove rust/WASI markdown parser example The documentation referring to this example was removed in #6994 and that forgot to remove this as well. This example is building without a lock file which is causing issues in #8368.
fitzgen
approved these changes
Apr 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
wasi
Issues pertaining to WASI
wasmtime:c-api
Issues pertaining to the C API.
wasmtime:docs
Issues related to Wasmtime's documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wasmtime-c-api
: Better differentiate betweenwasm.h
andwasmtime.h
APIs #8344 - needed for later cherry-pickswasmtime-c-api
: Improve non-support of GC references inwasm.h
APIs #8345 - needed for smoother externref c-api changeswasmtime-c-api
: Add support for GC references inwasmtime.h
APIs #8346 - preserve externref support in the c-apiwasi_config_preopen_socket
from C header #8364 - bugfixwasmtime_val_*
#8363 - bugfix for wasmtime-cpp (and others)