History log of /wasmtime-44.0.1/crates/cranelift/src/debug/transform/unit.rs (Results 1 – 24 of 24)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5
# c4a38d67 26-Jan-2026 Philip Craig <[email protected]>

Use `gimli::write::Dwarf::convert_with_filter` for DWARF transform (#12428)

Replace parts of the transform code with `gimli`'s generic DWARF
transformation support. Most of the remaining code is spe

Use `gimli::write::Dwarf::convert_with_filter` for DWARF transform (#12428)

Replace parts of the transform code with `gimli`'s generic DWARF
transformation support. Most of the remaining code is specific to the
needs of Wasmtime.

The overall behaviour is the same as the previous implementation. We
build a graph of the DIE dependencies, and prune DIEs that don't have
valid code ranges. Then we traverse the DIE tree again and transform the
DIEs. However, there are some differences.

Previously, unresolved references to DIEs were stored in `PendingUnitRefs`
and `PendingDebugInfoRefs`, then at the end of the transformation we
went back and fixed up these references. The new behaviour reserves IDs
for all of the DIEs in the dependency tree before transformation, which
avoids the need to fix up references later. It also allows gimli to
correctly handle references in DWARF expressions, although that doesn't
currently matter for Wasmtime because it doesn't handle references in
expressions yet. The visible effect of this in Wasmtime is that the
order of transformed attributes will now always match the original DWARF.

The DIE tree pruning is slightly different. We no longer add back-edges
pointing to namespace DIEs or the root DIE, which previously caused some
DIEs to be reachable when they should not have been. In particular,
this affects DW_TAG_variable DIEs for global variables. Wasmtime can't
currently translate the location for globals, so they were added without
a valid DW_AT_location. These DIEs are now omitted from the transformed
DWARF. In the future when global variables can be translated correctly,
they can be included by calling `ReserveUnitSection::require_entry`.

Performance measurements for `wasmtime compile -D debug-info=y` show
minimal change.

show more ...


Revision tags: v40.0.3
# 7ee620a5 24-Jan-2026 Philip Craig <[email protected]>

Update gimli and addr2line dependencies (#12424)

* Update gimli and addr2line dependencies

gimli has a significant number of breaking changes to adapt to.

* Add vets

---------

Co-authored-by: Al

Update gimli and addr2line dependencies (#12424)

* Update gimli and addr2line dependencies

gimli has a significant number of breaking changes to adapt to.

* Add vets

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1
# c7cab275 22-Dec-2025 Nick Fitzgerald <[email protected]>

wasmtime-cranelift: Use `wasmtime_environ::error` instead of `anyhow` (#12204)


Revision tags: v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1
# bd7b59da 19-Oct-2025 Philip Craig <[email protected]>

Delete DWARF `Reader` trait, also use `gimli::UnitRef` (#11883)

* Delete DWARF Reader trait

Use the existing Reader type alias instead. Most places were already
using this.

* Use `gimli::UnitRef`

Delete DWARF `Reader` trait, also use `gimli::UnitRef` (#11883)

* Delete DWARF Reader trait

Use the existing Reader type alias instead. Most places were already
using this.

* Use `gimli::UnitRef`

This reduces parameter counts and makes it harder to use the
wrong DWARF sections for split DWARF.

A drawback is that `UnitRef<'a, R>` is invariant over `R`,
so additional lifetime annotations are needed in some places.

This probably also fixes a bug with the parsing of
`AttributeValue::LocationListsRef`, but I didn't try to test this.

show more ...


Revision tags: v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0
# 9b0e1b9d 08-Aug-2025 Philip Craig <[email protected]>

Improve garbage collection of DWARF for dead code (#11402)

Checking for the tombstone address during the reachability calculation
allows more DWARF entries to be marked as unreachable, and there was

Improve garbage collection of DWARF for dead code (#11402)

Checking for the tombstone address during the reachability calculation
allows more DWARF entries to be marked as unreachable, and there was
already code to handle this for addresses left as 0.

show more ...


Revision tags: v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0
# 90ac295e 19-May-2025 Alex Crichton <[email protected]>

Update Wasmtime to the 2024 Rust Edition (#10806)

* Update Wasmtime to the 2024 Rust Edition

Now that our MSRV supports the 2024 edition it's possible to make this
switch. This commit moves Wasmtim

Update Wasmtime to the 2024 Rust Edition (#10806)

* Update Wasmtime to the 2024 Rust Edition

Now that our MSRV supports the 2024 edition it's possible to make this
switch. This commit moves Wasmtime to the 2024 Edition to keep
up-to-date with Rust idioms and access many of the edition features
exclusive to the 2024 edition.

prtest:full

* Reformat with the 2024 edition

show more ...


Revision tags: v32.0.0, v31.0.0, v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1
# 0b2c9d72 27-Dec-2024 SingleAccretion <[email protected]>

[DWARF] Transform instance methods into static methods with a `__this` parameter (#9898)

* Add an instance method test

* Transform instance methods into static methods with a '__this' parameter


Revision tags: v28.0.0
# 8e4f0cd3 02-Dec-2024 SingleAccretion <[email protected]>

Export debug builtins on Windows (#9706)

This allows the debugger to find them.

After much research, this has been chosen as the overall best solution.
The alternative here would be to create machi

Export debug builtins on Windows (#9706)

This allows the debugger to find them.

After much research, this has been chosen as the overall best solution.
The alternative here would be to create machine code thunks that call
these symbols when Jitting code, and describing those thunks in DWARF,
which would be significantly more complex.

show more ...


# 45b60bd6 02-Dec-2024 Alex Crichton <[email protected]>

Start using `#[expect]` instead of `#[allow]` (#9696)

* Start using `#[expect]` instead of `#[allow]`

In Rust 1.81, our new MSRV, a new feature was added to Rust to use
`#[expect]` to control lint

Start using `#[expect]` instead of `#[allow]` (#9696)

* Start using `#[expect]` instead of `#[allow]`

In Rust 1.81, our new MSRV, a new feature was added to Rust to use
`#[expect]` to control lint levels. This new lint annotation will
silence a lint but will itself cause a lint if it doesn't actually
silence anything. This is quite useful to ensure that annotations don't
get stale over time.

Another feature is the ability to use a `reason` directive on the
attribute with a string explaining why the attribute is there. This
string is then rendered in compiler messages if a warning or error
happens.

This commit migrates applies a few changes across the workspace:

* Some `#[allow]` are changed to `#[expect]` with a `reason`.
* Some `#[allow]` have a `reason` added if the lint conditionally fires
(mostly related to macros).
* Some `#[allow]` are removed since the lint doesn't actually fire.
* The workspace configures `clippy::allow_attributes_without_reason = 'warn'`
as a "ratchet" to prevent future regressions.
* Many crates are annotated to allow `allow_attributes_without_reason`
during this transitionary period.

The end-state is that all crates should use
`#[expect(..., reason = "...")]` for any lint that unconditionally fires
but is expected. The `#[allow(..., reason = "...")]` lint should be used
for conditionally firing lints, primarily in macro-related code.
The `allow_attributes_without_reason = 'warn'` level is intended to be
permanent but the transitionary
`#[expect(clippy::allow_attributes_without_reason)]` crate annotations
to go away over time.

* Fix adapter build

prtest:full

* Fix one-core build of icache coherence

* Use `allow` for missing_docs

Work around rust-lang/rust#130021 which was fixed in Rust 1.83 and isn't
fixed for our MSRV at this time.

* More MSRV compat

show more ...


# af476a51 02-Dec-2024 SingleAccretion <[email protected]>

Synthetic type centralization (#9700)


Revision tags: v27.0.0
# a126152d 06-Nov-2024 SingleAccretion <[email protected]>

Do not GC `DW_AT_declaration` `DW_TAG_subprogram`s (#9578)

* Add a test

* Log section-relative offsets of DIEs

For easier correlation to llvm-dwarfdump's output.

* Do not GC function declarations

Do not GC `DW_AT_declaration` `DW_TAG_subprogram`s (#9578)

* Add a test

* Log section-relative offsets of DIEs

For easier correlation to llvm-dwarfdump's output.

* Do not GC function declarations

Declarations must be consistent across compilation units.

show more ...


Revision tags: v26.0.1, v25.0.3, v24.0.2
# 92cc0ad7 04-Nov-2024 SingleAccretion <[email protected]>

Add very basic logging to the debug info transform (#9526)

* Add very basic logging to the debug info transform

The DI transform is a kind of compiler and logging
is a very good way to gain insight

Add very basic logging to the debug info transform (#9526)

* Add very basic logging to the debug info transform

The DI transform is a kind of compiler and logging
is a very good way to gain insight into compilers.

* Fix C&P

* Bubble the "trace-log" feature up the dependency tree

And switch logging macros to always be enabled in debug.

Verified "trace-log" **does not** show up when running
'cargo tree -f "{p} {f}" -e features,normal,build'

* Fix dead code warnings

show more ...


Revision tags: v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1, v25.0.1, v25.0.0, v24.0.0
# 494867dd 20-Aug-2024 Philip Craig <[email protected]>

Copy skeleton unit attributes for split DWARF (#9151)

The skeleton unit may contain attributes that don't appear in
the split unit. In particular, this includes DW_AT_ranges and
DW_AT_comp_dir.

Als

Copy skeleton unit attributes for split DWARF (#9151)

The skeleton unit may contain attributes that don't appear in
the split unit. In particular, this includes DW_AT_ranges and
DW_AT_comp_dir.

Also, set the correct form for the default directory in the
line program. Previously, the different form meant that we emitted
the directory again when a file used it. Copying the DW_AT_comp_dir
attribute is required for use of the default directory to work
successfully.

show more ...


# 1ef3eecf 19-Aug-2024 Philip Craig <[email protected]>

Cleanup some DWARF transform code (#9139)

* Remove unneeded `cu_low_pc` parameter

`unit.low_pc` is the same value.

* Simplify `clone_line_program`

We were parsing things that had already been par

Cleanup some DWARF transform code (#9139)

* Remove unneeded `cu_low_pc` parameter

`unit.low_pc` is the same value.

* Simplify `clone_line_program`

We were parsing things that had already been parsed into `gimli::Unit`,
such as `DW_AT_comp_dir`, `DW_AT_name`, and `DW_AT_stmt_list`.

* Use `gimli::Dwarf` methods in more places

show more ...


# 7e15d87b 16-Aug-2024 Philip Craig <[email protected]>

Handle more split DWARF attributes and forms (#9134)

This includes GNU split support for DWARF version 4.


# c7756bd2 15-Aug-2024 Philip Craig <[email protected]>

Use the correct DWARF sections and unit for parsing split DWARF (#9132)

The DWARF sections in `DebugInputContext` were always set to the DWARF sections
from the .wasm file. However, when parsing spl

Use the correct DWARF sections and unit for parsing split DWARF (#9132)

The DWARF sections in `DebugInputContext` were always set to the DWARF sections
from the .wasm file. However, when parsing split DWARF, most of the time we
want to be using the sections from the .dwp file instead. We were already
passing `gimli::Dwarf` to most places already so having the sections in
`DebugInputContext` was no benefit. So a lot of this commit is replacing
`context` with `dwarf`.

Next, sometimes we were using the wrong `gimli::Dwarf`. In general, we want
to use the skeleton unit for parsing line info, and the split unit for
everything else. `clone_unit` was wrongly using the DWARF associated with
the skeleton unit in many places. Instead of changing all of those places,
I've kept the variable names `dwarf` and `unit`, but changed which DWARF they
refer to. This also fits better with the non-split operation. So some of
the changes in this commit are updating places that were already correct
to use the new variable meanings.

Finally, this commit adds a call to `copy_relocated_attributes`. This copies
some info from the skeleton unit that is needed when parsing the split unit.

show more ...


Revision tags: v23.0.2, v23.0.1, v23.0.0, v22.0.0
# dd8c48b3 05-Jun-2024 Alex Crichton <[email protected]>

Add basic support for DWARF processing with components (#8693)

This commit updates the native-DWARF processing (the `-D debug-info` CLI
flag) to support components. Previously component support was

Add basic support for DWARF processing with components (#8693)

This commit updates the native-DWARF processing (the `-D debug-info` CLI
flag) to support components. Previously component support was not
implemented and if there was more than one core wasm module within a
component then dwarf would be ignored entirely.

This commit contains a number of refactorings to plumb a more full
compilation context throughout the dwarf processing pipeline. Previously
the data structures used only were able to support a single module. A
new `Compilation` structure is used to represent the results of an
entire compilation and is plumbed through the various locations. Most of
the refactorings in this commit were then to extend loops to loop over
more things and handle the case where there is more than one core wasm
module.

I'll admit I'm not expert on DWARF but basic examples appear to work
locally and most of the additions here seemed relatively straightforward
in terms of "add another loop to iterate over more things" but I'm not
100% sure how well this will work. In theory this now supports
concatenating DWARF sections across multiple core wasm modules, but
that's not super well tested.

show more ...


Revision tags: v21.0.1, v21.0.0
# 0e9121da 16-May-2024 FrankReh <[email protected]>

Fix some typos (#8641)

* occurred

* winch typos

* tests typos

* cli typos

* fuzz typos

* examples typos

* docs typos

* crates/wasmtime typos

* crates/environ typos

* crates/cranelift typos

Fix some typos (#8641)

* occurred

* winch typos

* tests typos

* cli typos

* fuzz typos

* examples typos

* docs typos

* crates/wasmtime typos

* crates/environ typos

* crates/cranelift typos

* crates/test-programs typos

* crates/c-api typos

* crates/cache typos

* crates other typos

* cranelift/codegen/src/isa typos

* cranelift/codegen/src other typos

* cranelift/codegen other typos

* cranelift other typos

* ci js typo

* .github workflows typo

* RELEASES typo

* Fix clang-format documentation line

---------

Co-authored-by: Andrew Brown <[email protected]>

show more ...


Revision tags: v20.0.2, v20.0.1
# fb4f4cd3 24-Apr-2024 yowl <[email protected]>

Add initial support for DWARF Fission (#8055)

* add cloning for String attributes

* use into_owned instead of to_vec to avoid a clone if possible.

* runs, but does not substitute

* show vars from

Add initial support for DWARF Fission (#8055)

* add cloning for String attributes

* use into_owned instead of to_vec to avoid a clone if possible.

* runs, but does not substitute

* show vars from c program, start cleanup

* tiday

* resolve conflicts

* remove WASI folder

* Add module_builder

add dwarf_package to state for cache

* move dwarf loading to module_environ.rs

pass the dwarf as binary as low as module_environ.rs

* pass dwarf package rather than add to debug_info

* tidy option/result nested if

* revert some toml and whitespace.

* add features cranelift,winch to module_builder and compute_artifacts

remove some `use`s

* address some feedback

remove unused 'use's

* address some feedback

remove unused 'use's

* move wat feature condition to cover whole method.

* More feedback

Another try at wat feature move

* Another try at wat feature move

* change gimli exemption version

add typed-arena exemption

* add None for c-api

* move `use` to #cfg

* fix another config build

* revert unwanted code deletion

* move inner function closer to use

* revert extra param to Module::new

* workaround object crate bug.

* add missing parameter

* add missing parameter

* Merge remote-tracking branch 'origin/main' into dwarf-att-string

# Conflicts:
# crates/wasmtime/src/engine.rs
# crates/wasmtime/src/runtime/module.rs
# src/common.rs

* remove moduke

* use common gimli version of 28.1

* remove wasm feature, revert gimli version

* remove use of object for wasm dwarf

* remove NativeFile workaround, add feature for dwp loading

* sync winch signature

* revert bench api change

* add dwarf for no cache feature

* put back merge loss of module kind

* remove param from docs

* add dwarf fission lldb test

* simplify and include test source

* clang-format

* address feedback, remove packages

add docs
simplify return type

* remove Default use on ModuleTypesBuilder

* Remove an `unwrap()` and use `if let` instead

* Use `&[u8]` instead of `&Vec<u8>`

* Remove an `unwrap()` and return `None` instead

* Clean up some code in `transform_dwarf`

* Clean up some code in `replace_unit_from_split_dwarf`

* Clean up some code in `split_unit`

* Minor refactorings and documentation in `CodeBuilder`

* Restrict visibility of `dwarf_package_binary`

* Revert supply-chain folder changes

* Fix compile error on nightly

* prtest:full

* prtest:full

* prtest:full

* prtest:full

* prtest:full

* prtest:full

* prtest:full

* prtest:full

* use lldb 15

* prtest:full

* prtest:full

* load dwp when loading wasm bytes with path

* correct source file name

* remove debug

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v20.0.0, v17.0.3, v19.0.2, v18.0.4, v19.0.1, v19.0.0, v18.0.3, v18.0.2, v17.0.2, v18.0.1, v18.0.0, v17.0.1, v17.0.0, v16.0.0, v15.0.1, v15.0.0, v14.0.4, v14.0.3, v14.0.2, v13.0.1, v14.0.1, v14.0.0, minimum-viable-wasi-proxy-serve, v13.0.0, v12.0.2, v11.0.2, v10.0.2, v12.0.1, v12.0.0, v11.0.1, v11.0.0
# ca90650c 07-Jul-2023 Adam Petro <[email protected]>

Support multiple versions of `wasmtime` in the same crate (#6673)

* Attempt versioned exports to facilitate having multiple versions in the same crate

* Modify approach to use `export_name` and `li

Support multiple versions of `wasmtime` in the same crate (#6673)

* Attempt versioned exports to facilitate having multiple versions in the same crate

* Modify approach to use `export_name` and `link_name`

* Only apply version to names in assembly and foreign item fns

* Attempt to handle the s390x case

* Fix alignment of backslashes in assembly file

* Pretend I understand the preprocessor

* Version symbols in `crates/runtime/src/helpers.c`

* Stop versioning `__jit_debug_register_code` because gdb relies on it and it is uses `weak` linkage

* Version symbol in `crates/fiber/src/windows.c`

* Consolidate `LitStr` creation in macro

* Add new crate to publish script and supply-chain config

* Fix order in supply chain config

* Set `audit-as-crates-io` to false

* Missing `versioned_link` for Windows

* Version strings used in debug

* Formatting

* Get rid of `versioned_str` and bring back `versioned_suffix`

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v10.0.1, v10.0.0, v9.0.4, v9.0.3, v9.0.2, v9.0.1, v9.0.0
# 1cbca5a5 02-May-2023 Saúl Cabrera <[email protected]>

winch: Handle relocations and traps (#6298)

* winch: Handle relocations and traps

This change introduces handling of traps and relocations in Winch, which
was left out in https://github.com/bytecod

winch: Handle relocations and traps (#6298)

* winch: Handle relocations and traps

This change introduces handling of traps and relocations in Winch, which
was left out in https://github.com/bytecodealliance/wasmtime/pull/6119.

In order to so, this change moves the `CompiledFunction` struct to the
`wasmtime-cranelift-shared` crate, allowing Cranelift and Winch to
operate on a single, shared representation, following some of the ideas
discussed in https://github.com/bytecodealliance/wasmtime/pull/5944.

Even though Winch doesn't rely on all the fields of `CompiledFunction`,
it eventually will. With the addition of relocations and traps it
started to be more evident that even if we wanted to have different
representations of a compiled function, they would end up being very
similar.

This change also consolidates where the `traps` and `relocations` of the
`CompiledFunction` get created, by introducing a constructor that
operates on a `MachBufferFinalized<Final>`, esentially encapsulating
this process in a single place for both Winch and Cranelift.

* Rework the shared `CompiledFunction`

This commit reworks the shared `CompiledFunction` struct. The compiled
function now contains the essential pieces to derive all the information
to create the final object file and to derive the debug information for
the function.

This commit also decouples the dwarf emission process by introducing
a `metadata` field in the `CompiledFunction` struct, which is used as
the central structure for dwarf emission.

show more ...


Revision tags: v6.0.2, v7.0.1, v8.0.1, v8.0.0, v7.0.0, v6.0.1, v5.0.1, v4.0.1, v6.0.0, v5.0.0, v4.0.0, v3.0.1, v3.0.0, v1.0.2, v2.0.2, v2.0.1, v2.0.0, v1.0.1, v1.0.0, v0.40.1, v0.40.0, v0.39.1, v0.38.3, v0.38.2, v0.39.0, v0.38.1, v0.38.0, v0.37.0, v0.36.0, v0.35.3, v0.34.2, v0.35.2, v0.35.1, v0.35.0, v0.33.1, v0.34.1, v0.34.0, v0.33.0, v0.32.1, v0.32.0
# 12bfbdfa 08-Nov-2021 Adam Bratschi-Kaye <[email protected]>

Skip generating DWARF info for dead code (#3498)

When encountering a subprogram that is dead code (as indicated by the
dead code proposal
https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't

Skip generating DWARF info for dead code (#3498)

When encountering a subprogram that is dead code (as indicated by the
dead code proposal
https://dwarfstd.org/ShowIssue.php?issue=200609.1), don't generate debug
output for the subprogram or any of its children.

show more ...


Revision tags: v0.31.0, v0.30.0
# eb21ae14 23-Aug-2021 Alex Crichton <[email protected]>

Move definition of ModuleMemoryOffset (#3228)

This was historically defined in `wasmtime-environ` but it's only used
in `wasmtime-cranelift`, so this commit moves the definition to the
`debug` mod

Move definition of ModuleMemoryOffset (#3228)

This was historically defined in `wasmtime-environ` but it's only used
in `wasmtime-cranelift`, so this commit moves the definition to the
`debug` module where it's primarily used.

show more ...


# 87c33c29 18-Aug-2021 Alex Crichton <[email protected]>

Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)

* Move `CompiledFunction` into wasmtime-cranelift

This commit moves the `wasmtime_environ::CompiledFunction` type into the
`

Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)

* Move `CompiledFunction` into wasmtime-cranelift

This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.

The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.

* Move wasmtime_environ::reference_type

This now belongs in wasmtime-cranelift and nowhere else

* Remove `Type` reexport in wasmtime-environ

One less dependency on `cranelift-codegen`!

* Remove `types` reexport from `wasmtime-environ`

Less cranelift!

* Remove `SourceLoc` from wasmtime-environ

Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.

* Remove wasmtime-environ's dep on cranelift's `StackMap`

This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.

An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.

* Define code offsets in wasmtime-environ with `u32`

Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.

* Commit to using `cranelift-entity` in Wasmtime

This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.

It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.

* Remove most uses of `cranelift-codegen` in `wasmtime-environ`

There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.

* Limit the glob-reexport of `cranelift_wasm`

This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.

Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.

* Extract types from cranelift-wasm to cranelift-wasm-types

This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.

The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.

The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.

* Get lightbeam compiling

* Remove unnecessary dependency

* Fix compile with uffd

* Update publish script

* Fix more uffd tests

* Rename cranelift-wasm-types to wasmtime-types

This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.

* Fix publish script

show more ...