alexcrichton opened PR #3178 from less-target-isa to main:
This commit started off by deleting the
cranelift_codegen::settings
reexport in thewasmtime-environcrate and then basically played
whack-a-mole until everything compiled again. The main result of this is
that thewasmtime-*family of crates have generally less of a
dependency on theTargetIsatrait and type from Cranelift. While the
dependency isn't entirely severed yet this is at least a significant
start.This commit is intended to be largely refactorings, no functional
changes are intended here. The refactorings are:
A
CompilerBuildertrait has been added towasmtime_environwhich
server as an abstraction used to create compilers and configure them
in a uniform fashion. Thewasmtime::Configtype now uses this
instead of cranelift-specific settings. Thewasmtime-jitcrate
exports the ability to create a compiler builder from a
CompilationStrategy, which only works for Cranelift right now. In a
cranelift-less build of Wasmtime this is expected to return a trait
object that fails all requests to compile.The
Compilertrait in thewasmtime_environcrate has been souped
up with a number of methods that Wasmtime and other crates needed.The
wasmtime-debugcrate is now moved entirely behind the
wasmtime-craneliftcrate.The
wasmtime-craneliftcrate is now only depended on by the
wasmtime-jitcrate.Wasm types in
cranelift-wasmno longer contain their IR type,
instead they only contain theWasmType. This is required to get
everything to align correctly but will also be required in a future
refactoring where the types used bycranelift-wasmwill be extracted
to a separate crate.I moved around a fair bit of code in
wasmtime-cranelift.Some gdb-specific jit-specific code has moved from
wasmtime-debugto
wasmtime-jit.Note that this is built on https://github.com/bytecodealliance/wasmtime/pull/3176, but I wanted to keep all these refactorings ideally bite-ish sized to be more easily digestable
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Just a reminder to either remove or uncomment this code.
bjorn3 created PR review comment:
Same
bjorn3 submitted PR review.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
/// Construct a new `Compiler`.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Same
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton edited PR #3178 from less-target-isa to main:
This commit started off by deleting the
cranelift_codegen::settings
reexport in thewasmtime-environcrate and then basically played
whack-a-mole until everything compiled again. The main result of this is
that thewasmtime-*family of crates have generally less of a
dependency on theTargetIsatrait and type from Cranelift. While the
dependency isn't entirely severed yet this is at least a significant
start.This commit is intended to be largely refactorings, no functional
changes are intended here. The refactorings are:
A
CompilerBuildertrait has been added towasmtime_environwhich
server as an abstraction used to create compilers and configure them
in a uniform fashion. Thewasmtime::Configtype now uses this
instead of cranelift-specific settings. Thewasmtime-jitcrate
exports the ability to create a compiler builder from a
CompilationStrategy, which only works for Cranelift right now. In a
cranelift-less build of Wasmtime this is expected to return a trait
object that fails all requests to compile.The
Compilertrait in thewasmtime_environcrate has been souped
up with a number of methods that Wasmtime and other crates needed.The
wasmtime-debugcrate is now moved entirely behind the
wasmtime-craneliftcrate.The
wasmtime-craneliftcrate is now only depended on by the
wasmtime-jitcrate.Wasm types in
cranelift-wasmno longer contain their IR type,
instead they only contain theWasmType. This is required to get
everything to align correctly but will also be required in a future
refactoring where the types used bycranelift-wasmwill be extracted
to a separate crate.I moved around a fair bit of code in
wasmtime-cranelift.Some gdb-specific jit-specific code has moved from
wasmtime-debugto
wasmtime-jit.
Note that this is built on https://github.com/bytecodealliance/wasmtime/pull/3176, but I wanted to keep all these refactorings ideally bite-ish sized to be more easily digestable
alexcrichton updated PR #3178 from less-target-isa to main.
alexcrichton requested pchickey for a review on PR #3178.
pchickey submitted PR review.
pchickey submitted PR review.
pchickey created PR review comment:
I am grateful that we have gotten rid of all these redundant duplications!
alexcrichton merged PR #3178.
Last updated: Dec 06 2025 at 06:05 UTC