wasmtime/lightbeam: https://github.com/bytecodealliance/wasmtime/tree/main/crates/lightbeam
In https://github.com/bytecodealliance/wasmtime/blob/main/crates/lightbeam/Cargo.toml#L16-L19 , we have:
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.75.0" }
derive_more = "0.99"
dynasm = "1.0.0"
dynasmrt = "1.0.0"
I am trying to understand why this also needs cranelift_codegen when it is already using dynasm
usage of cranelift_codegen:
./src/backend.rs:use cranelift_codegen::{
./src/backend.rs: name: &cranelift_codegen::ir::ExternalName,
./src/module.rs:use cranelift_codegen::{
./src/translate_sections.rs:use cranelift_codegen::{binemit, ir};
./src/function_body.rs:use cranelift_codegen::{binemit, ir};
./wasmtime/src/lib.rs:use cranelift_codegen::binemit;
./wasmtime/src/lib.rs:use cranelift_codegen::ir::{self, ExternalName};
./wasmtime/src/lib.rs:use cranelift_codegen::isa;
Can anyone versed in wasm/JIT/cranelift explain, in plain English, why wasmtime/lightbeam needs cranelift_codegen when it already has access to dynasm/dynasmrt for generating x86_64 ?
From a pedantic view, I understand that "because it uses structs / mods from the cranelift_codegen module, as shown above", but I am looking for a more high level architectural view on what cranelift_codegen is providing that dynasm/dynasmrt does not already provide.
Thanks!