Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
33c1002
Fix missing libcalls with simd float rounding (#10699)
alexcrichton May 5, 2025
1761bc3
x64: convert some `psub*` instructions (#10732)
abrown May 5, 2025
5ded0f4
Refactor call ABI implementation (#10722)
uweigand May 6, 2025
402a6a5
Fix another libcall popping up with simd (#10735)
alexcrichton May 6, 2025
02d1624
x64: convert `phadd` instructions (#10734)
abrown May 6, 2025
6ad17f1
Fix a typo: `see41` -> `sse41` (#10736)
abrown May 6, 2025
303b836
Update to wit-bindgen 0.42 (#10737)
alexcrichton May 6, 2025
1c940b7
Inline assembler-x64 `generated_files` in `main.rs` (#10739)
adambratschikaye May 7, 2025
29d04b1
Move the `GetHost` trait used in `bindgen!` into Wasmtime (#10746)
alexcrichton May 7, 2025
6cd9b4a
Cranelift: update to regalloc2 0.12.2; support many return values. (#…
cfallin May 7, 2025
19000ee
asm: refactor how REX prefixes are emitted (#10745)
abrown May 7, 2025
c213302
asm: refactor how REX suffixes are emitted (#10749)
abrown May 8, 2025
0e05566
x64: convert scalar negation instructions (#10752)
abrown May 8, 2025
7a27724
x64: convert more logical operations (#10753)
abrown May 8, 2025
35053d6
winch(aarch64): Run wast test in CI (#10750)
saulecabrera May 9, 2025
d9468c6
asm: implement write-only operands (#10759)
abrown May 9, 2025
9d40c6e
Publicly expose `wasmtime::component::Instance::instance_pre` (#10761)
alexcrichton May 9, 2025
f81c0dc
Add `T: 'static` to `Store<T>` (#10760)
alexcrichton May 13, 2025
f6775a3
Replace `GetHost` with a function pointer, add `HasData` (#10770)
alexcrichton May 13, 2025
55e56c1
[s390x] Use VCodeConstant literal pool (#10756)
uweigand May 13, 2025
a66afef
Add a regression test for issue #10772 (#10773)
fitzgen May 14, 2025
6456114
mpk: fix example CLI argument (#10777)
abrown May 14, 2025
ef48aec
Fix name qualification in the `entity_impl` macro. (#10776)
sunfishcode May 14, 2025
0ca5cc7
asm: fix typo (#10778)
abrown May 14, 2025
8d853cc
x64: convert some SSE shift instructions (#10762)
abrown May 15, 2025
23e27ba
c-api: new wasmtime_trap_new_code function (#10765)
dotcarmen May 15, 2025
3f876fe
winch: Implement check_stack for aarch64 (#10763)
graydon May 15, 2025
8dbd5db
winch: Fine-tune assertions for branch emission (#10781)
saulecabrera May 15, 2025
2c70b3f
Migrate run-tests.sh to Python (#10790)
alexcrichton May 18, 2025
1101a94
Classify Winch with Tier 1 support (#10755)
alexcrichton May 18, 2025
ad06523
Update cc crate dependency (#10787)
alexcrichton May 18, 2025
54b0c57
x64: convert some SSE `cvt*` instructions (#10779)
abrown May 18, 2025
61ba09f
Update MSRV to 1.85.0 (#10785)
alexcrichton May 19, 2025
16a836e
fix typos (#10805)
ShoosounS47 May 19, 2025
90ac295
Update Wasmtime to the 2024 Rust Edition (#10806)
alexcrichton May 19, 2025
eb3ac99
Merge remote-tracking branch 'upstream/main'
alexcrichton May 19, 2025
ed1eb52
Revert Cargo.lock to upstream
alexcrichton May 19, 2025
e33cc3c
Fixup more merge issues
alexcrichton May 19, 2025
e6a88ad
Revert reduction of MSRV window
alexcrichton May 19, 2025
cf09146
Revert disabling mingw
alexcrichton May 19, 2025
fd3c9e0
Update expanded expectations
alexcrichton May 19, 2025
a7ac064
Run rustfmt
alexcrichton May 19, 2025
fd13c65
Minor updates to reduce the diff with `main`
alexcrichton May 19, 2025
5f26832
Run rustfmt
alexcrichton May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
msrv_range:
description: 'Versions later-than-latest-Rust the MSRV supports'
required: false
default: '1'
default: '2'

runs:
using: composite
Expand All @@ -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-2025-04-03" >> "$GITHUB_OUTPUT"
echo "version=nightly-2025-05-16" >> "$GITHUB_OUTPUT"
else
echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT"
fi
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,15 @@ jobs:
if: matrix.filter == 'linux-x64' && contains(matrix.bucket, 'wasmtime-cli')
uses: abrown/install-vtune-action@v1

# Build and test all features
- run: ./ci/run-tests.sh --locked ${{ matrix.bucket }}
# Build and test all features.
#
# Note that this uses a different shell, notably not `bash` on Windows. In
# the past `bash` would add more items to `PATH` on Windows which would
# interfere and cause the `gcc.exe` executable to fail and exit with 1 and
# no output. It's believed that `bash` adds things like `/usr/bin` to PATH
# which is the wrong DLL or something like that.
- run: python3 ./ci/run-tests.py --locked ${{ matrix.bucket }}
shell: pwsh

# common logic to cancel the entire run if this job fails
- uses: ./.github/actions/cancel-on-failure
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 3 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ exclude = [
[workspace.package]
version = "34.0.0"
authors = ["The Wasmtime Project Developers"]
edition = "2021"
edition = "2024"
# Wasmtime's current policy is that this number can be no larger than the
# current stable release of Rust minus 2.
rust-version = "1.85.0"
Expand All @@ -187,19 +187,6 @@ unused_import_braces = 'warn'
unused-lifetimes = 'warn'
unused-macro-rules = 'warn'

# Lints that are part of the `rust-2024-compatibility` group. This group is a
# bit too noisy to enable wholesale but some selective items are ones we want to
# opt-in to.
keyword_idents_2024 = 'warn'
unsafe-attr-outside-unsafe = 'warn'
deprecated-safe-2024 = 'warn'
rust-2024-guarded-string-incompatible-syntax = 'warn'
rust-2024-prelude-collisions = 'warn'
rust-2024-incompatible-pat = 'warn'
missing-unsafe-on-extern = 'warn'
impl-trait-overcaptures = 'warn'
unsafe-op-in-unsafe-fn = 'warn'

# Don't warn about unknown cfgs for pulley
[workspace.lints.rust.unexpected_cfgs]
level = "warn"
Expand Down Expand Up @@ -292,7 +279,7 @@ byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-arra

# Bytecode Alliance maintained dependencies:
# ---------------------------
regalloc2 = "0.12.1"
regalloc2 = "0.12.2"

# cap-std family:
target-lexicon = "0.13.0"
Expand All @@ -309,8 +296,8 @@ io-extras = "0.18.1"
rustix = "1.0.3"
# wit-bindgen:
wit-bindgen = { version = "0.42.1", default-features = false }
wit-bindgen-rust-macro = { version = "0.42.1", default-features = false }
wit-bindgen-rt = { version = "0.42.1", default-features = false }
wit-bindgen-rust-macro = { version = "0.42.1", default-features = false }

# wasm-tools family:
wasmparser = { version = "0.230.0", default-features = false, features = ['simd'] }
Expand Down
2 changes: 1 addition & 1 deletion benches/call.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use criterion::measurement::WallTime;
use criterion::{criterion_group, criterion_main, BenchmarkGroup, Criterion};
use criterion::{BenchmarkGroup, Criterion, criterion_group, criterion_main};
use std::fmt::Debug;
use std::future::Future;
use std::pin::Pin;
Expand Down
6 changes: 3 additions & 3 deletions benches/instantiation.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use anyhow::Result;
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
use std::cell::LazyCell;
use std::path::Path;
use std::process::Command;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst};
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst};
use std::thread;
use wasi_common::{sync::WasiCtxBuilder, WasiCtx};
use wasi_common::{WasiCtx, sync::WasiCtxBuilder};
use wasmtime::*;

fn store(engine: &Engine) -> Store<WasiCtx> {
Expand Down
2 changes: 1 addition & 1 deletion benches/thread_eager_init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{Criterion, criterion_group, criterion_main};
use std::thread;
use std::time::{Duration, Instant};
use wasmtime::*;
Expand Down
4 changes: 2 additions & 2 deletions benches/wasi.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Measure some common WASI call scenarios.

use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{Criterion, criterion_group, criterion_main};
use std::{fs::File, path::Path, time::Instant};
use wasi_common::{sync::WasiCtxBuilder, WasiCtx};
use wasi_common::{WasiCtx, sync::WasiCtxBuilder};
use wasmtime::{Engine, Linker, Module, Store, TypedFunc};

criterion_group!(benches, bench_wasi);
Expand Down
14 changes: 6 additions & 8 deletions ci/build-test-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ const FULL_MATRIX = [
"name": "Test Windows MSVC x86_64",
"filter": "windows-x64",
},
// FIXME: As of this writing, some of the GitHub images have a broken MinGW,
// leading CI to fail nondeterministically.
// {
// "os": windows,
// "target": "x86_64-pc-windows-gnu",
// "name": "Test Windows MinGW x86_64",
// "filter": "mingw-x64"
// },
{
"os": windows,
"target": "x86_64-pc-windows-gnu",
"name": "Test Windows MinGW x86_64",
"filter": "mingw-x64"
},
{
"os": ubuntu + '-arm',
"target": "aarch64-unknown-linux-gnu",
Expand Down
24 changes: 14 additions & 10 deletions ci/run-tests.sh → ci/run-tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env python3

# Excludes:
#
Expand All @@ -15,12 +15,16 @@
#
# - veri_engine: requires an SMT solver (z3)

cargo test \
--workspace \
--all-features \
--exclude test-programs \
--exclude wasmtime-wasi-nn \
--exclude wasmtime-fuzzing \
--exclude wasm-spec-interpreter \
--exclude veri_engine \
$@
import subprocess
import sys

args = ['cargo', 'test', '--workspace', '--all-features']
args.append('--exclude=test-programs')
args.append('--exclude=wasmtime-wasi-nn')
args.append('--exclude=wasmtime-fuzzing')
args.append('--exclude=wasm-spec-interpreter')
args.append('--exclude=veri_engine')
args.extend(sys.argv[1:])

result = subprocess.run(args)
sys.exit(result.returncode)
2 changes: 1 addition & 1 deletion cranelift/assembler-x64/fuzz/fuzz_targets/roundtrip.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![no_main]

use cranelift_assembler_x64::{fuzz, Inst};
use cranelift_assembler_x64::{Inst, fuzz};
use libfuzzer_sys::fuzz_target;

fuzz_target!(|inst: Inst<fuzz::FuzzRegs>| {
Expand Down
5 changes: 0 additions & 5 deletions cranelift/assembler-x64/meta/.rustfmt.toml

This file was deleted.

21 changes: 16 additions & 5 deletions cranelift/assembler-x64/meta/src/dsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ mod encoding;
mod features;
pub mod format;

pub use encoding::{
Encoding, Group1Prefix, Group2Prefix, Group3Prefix, Group4Prefix, Opcodes, Prefixes, Rex,
};
pub use encoding::{rex, vex};
pub use encoding::{Encoding, Group1Prefix, Group2Prefix, Group3Prefix, Group4Prefix, Opcodes, Prefixes, Rex};
pub use features::{Feature, Features, ALL_FEATURES};
pub use format::{align, fmt, r, rw, sxl, sxq, sxw};
pub use features::{ALL_FEATURES, Feature, Features};
pub use format::{Extension, Format, Location, Mutability, Operand, OperandKind};
pub use format::{align, fmt, r, rw, sxl, sxq, sxw, w};

/// Abbreviated constructor for an x64 instruction.
pub fn inst(
Expand Down Expand Up @@ -69,13 +71,22 @@ impl Inst {
/// the format name (e.g., `sx*`) to keep this unique.
#[must_use]
pub fn name(&self) -> String {
format!("{}_{}", self.mnemonic.to_lowercase(), self.format.name.to_lowercase())
format!(
"{}_{}",
self.mnemonic.to_lowercase(),
self.format.name.to_lowercase()
)
}
}

impl core::fmt::Display for Inst {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
let Inst { mnemonic: name, format, encoding, features } = self;
let Inst {
mnemonic: name,
format,
encoding,
features,
} = self;
write!(f, "{name}: {format} => {encoding}")?;
if !features.is_empty() {
write!(f, " [{features}]")?;
Expand Down
51 changes: 38 additions & 13 deletions cranelift/assembler-x64/meta/src/dsl/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ impl Rex {
#[must_use]
pub fn digit(self, digit: u8) -> Self {
assert!(digit <= 0b111, "must fit in 3 bits");
Self { digit: Some(digit), ..self }
Self {
digit: Some(digit),
..self
}
}

/// Append a byte-sized immediate operand (8-bit); equivalent to `ib` in the
Expand All @@ -136,7 +139,10 @@ impl Rex {
#[must_use]
pub fn ib(self) -> Self {
assert_eq!(self.imm, Imm::None);
Self { imm: Imm::ib, ..self }
Self {
imm: Imm::ib,
..self
}
}

/// Append a word-sized immediate operand (16-bit); equivalent to `iw` in
Expand All @@ -148,7 +154,10 @@ impl Rex {
#[must_use]
pub fn iw(self) -> Self {
assert_eq!(self.imm, Imm::None);
Self { imm: Imm::iw, ..self }
Self {
imm: Imm::iw,
..self
}
}

/// Append a doubleword-sized immediate operand (32-bit); equivalent to `id`
Expand All @@ -160,7 +169,10 @@ impl Rex {
#[must_use]
pub fn id(self) -> Self {
assert_eq!(self.imm, Imm::None);
Self { imm: Imm::id, ..self }
Self {
imm: Imm::id,
..self
}
}

/// Append a quadword-sized immediate operand (64-bit); equivalent to `io`
Expand All @@ -172,7 +184,10 @@ impl Rex {
#[must_use]
pub fn io(self) -> Self {
assert_eq!(self.imm, Imm::None);
Self { imm: Imm::io, ..self }
Self {
imm: Imm::io,
..self
}
}

/// Check a subset of the rules for valid encodings outlined in chapter 2,
Expand All @@ -188,11 +203,11 @@ impl Rex {

if self.opcodes.prefixes.has_operand_size_override() {
assert!(
operands
.iter()
.all(|&op| matches!(op.location.kind(), OperandKind::Imm(_) | OperandKind::FixedReg(_))
|| op.location.bits() == 16
|| op.location.bits() == 128),
operands.iter().all(|&op| matches!(
op.location.kind(),
OperandKind::Imm(_) | OperandKind::FixedReg(_)
) || op.location.bits() == 16
|| op.location.bits() == 128),
"when we encode the 66 prefix, we expect all operands to be 16-bit wide"
);
}
Expand Down Expand Up @@ -313,9 +328,16 @@ impl<const N: usize> From<[u8; N]> for Opcodes {
[primary] => (false, *primary, None),
[0x0f, primary] => (true, *primary, None),
[0x0f, primary, secondary] => (true, *primary, Some(*secondary)),
_ => panic!("invalid opcodes after prefix; expected [opcode], [0x0f, opcode], or [0x0f, opcode, opcode], found {remaining:?}"),
_ => panic!(
"invalid opcodes after prefix; expected [opcode], [0x0f, opcode], or [0x0f, opcode, opcode], found {remaining:?}"
),
};
Self { prefixes, escape, primary, secondary }
Self {
prefixes,
escape,
primary,
secondary,
}
}
}

Expand Down Expand Up @@ -381,7 +403,10 @@ impl Prefixes {

/// Check if any prefix is present.
pub fn is_empty(&self) -> bool {
self.group1.is_none() && self.group2.is_none() && self.group3.is_none() && self.group4.is_none()
self.group1.is_none()
&& self.group2.is_none()
&& self.group3.is_none()
&& self.group4.is_none()
}
}

Expand Down
Loading
Loading