Skip to content

Commit

Permalink
Update MSRV to 1.81.0 (#9692)
Browse files Browse the repository at this point in the history
* Update MSRV to 1.81.0

Coupled with today's release of Rust 1.83 this bumps our MSRV on
Wasmtime to 1.81. This also updates the nightly used for testing too.

prtest:full

* Propagate some necessary features through Winch

* Remove std feature from adapter configuration

Looks to be historical at this point and is no longer needed
  • Loading branch information
alexcrichton authored Nov 30, 2024
1 parent 6691006 commit 1f958b6
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
elif [ "${{ inputs.toolchain }}" = "msrv" ]; then
echo "version=1.$msrv.0" >> "$GITHUB_OUTPUT"
elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then
echo "version=nightly-2024-10-22" >> "$GITHUB_OUTPUT"
echo "version=nightly-2024-11-28" >> "$GITHUB_OUTPUT"
else
echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT"
fi
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ authors = ["The Wasmtime Project Developers"]
edition = "2021"
# Wasmtime's current policy is that this number can be no larger than the
# current stable release of Rust minus 2.
rust-version = "1.80.0"
rust-version = "1.81.0"

[workspace.lints.rust]
# Turn on some lints which are otherwise allow-by-default in rustc.
Expand Down
3 changes: 0 additions & 3 deletions crates/wasi-preview1-component-adapter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pub mod bindings {
wit_bindgen_rust_macro::generate!({
path: "../wasi/wit",
world: "wasi:cli/command",
std_feature,
raw_strings,
runtime_path: "crate::bindings::wit_bindgen_rt_shim",
// Automatically generated bindings for these functions will allocate
Expand All @@ -70,7 +69,6 @@ pub mod bindings {
wit_bindgen_rust_macro::generate!({
path: "../wasi/wit",
world: "wasi:cli/imports",
std_feature,
raw_strings,
runtime_path: "crate::bindings::wit_bindgen_rt_shim",
// Automatically generated bindings for these functions will allocate
Expand Down Expand Up @@ -100,7 +98,6 @@ pub mod bindings {
}
"#,
world: "wasmtime:adapter/adapter",
std_feature,
raw_strings,
runtime_path: "crate::bindings::wit_bindgen_rt_shim",
skip: ["poll"],
Expand Down
17 changes: 15 additions & 2 deletions crates/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ component-model = [
wmemcheck = [
"dep:wasmtime-wmemcheck",
"wasmtime-cranelift?/wmemcheck",
"wasmtime-winch?/wmemcheck",
"wasmtime-environ/wmemcheck",
"std",
]
Expand Down Expand Up @@ -270,18 +271,30 @@ runtime = [
gc = [
"wasmtime-environ/gc",
"wasmtime-cranelift?/gc",
"wasmtime-winch?/gc",
"signals-based-traps", # not ported to non-mmap schemes yet
]

# Enable the deferred reference counting garbage collector.
gc-drc = ["gc", "wasmtime-environ/gc-drc", "wasmtime-cranelift?/gc-drc"]
gc-drc = [
"gc",
"wasmtime-environ/gc-drc",
"wasmtime-cranelift?/gc-drc",
"wasmtime-winch?/gc-drc",
]

# Enable the null garbage collector.
gc-null = ["gc", "wasmtime-environ/gc-null", "wasmtime-cranelift?/gc-null"]
gc-null = [
"gc",
"wasmtime-environ/gc-null",
"wasmtime-cranelift?/gc-null",
"wasmtime-winch?/gc-null",
]

# Enable runtime support for the WebAssembly threads proposal.
threads = [
"wasmtime-cranelift?/threads",
"wasmtime-winch?/threads",
"std",
"signals-based-traps",
]
Expand Down
5 changes: 5 additions & 0 deletions crates/winch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ component-model = [
"wasmtime-cranelift/component-model",
]
all-arch = ["winch-codegen/all-arch"]
gc = ['winch-codegen/gc']
gc-drc = ['winch-codegen/gc-drc']
gc-null = ['winch-codegen/gc-null']
threads = ['winch-codegen/threads']
wmemcheck = ['winch-codegen/wmemcheck']
2 changes: 1 addition & 1 deletion examples/min-platform/embedding/src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ unsafe impl dlmalloc::Allocator for MyAllocator {
(ptr::null_mut(), 0, 0)
} else {
INITIAL_HEAP_ALLOCATED = true;
(INITIAL_HEAP.as_mut_ptr(), INITIAL_HEAP_SIZE, 0)
(ptr::addr_of_mut!(INITIAL_HEAP).cast(), INITIAL_HEAP_SIZE, 0)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions winch/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ all-arch = [
"x64",
"arm64",
]
gc = ['wasmtime-environ/gc']
gc-drc = ['wasmtime-environ/gc-drc']
gc-null = ['wasmtime-environ/gc-null']
threads = ['wasmtime-environ/threads']
wmemcheck = ['wasmtime-environ/wmemcheck']

0 comments on commit 1f958b6

Please sign in to comment.