Both cranelift-codegen and wasmtime-debug need to map Cranelift registers to Gimli registers. Previously both crates had an almost-identical `map_reg` implementation. This change: - removes the wasmtime-debug implementation - improves the cranelift-codegen implementation with custom errors - exposes map_reg in `cranelift_codegen::isa::fde::map_reg` and subsequently `wasmtime_environ::isa::fde::map_reg`
This is the wasmtime-environ crate, which contains the implementations
of the ModuleEnvironment and FuncEnvironment traits from
cranelift-wasm. They effectively
implement an ABI for basic wasm compilation that defines how linear memories
are allocated, how indirect calls work, and other details. They can be used
for JITing, native object files, or other purposes.