<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in code.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>6e0ded7c - Use `TryBTreeMap` in the store&apos;s `ModuleRegistry` (#12846)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#6e0ded7c</link>
        <description>Use `TryBTreeMap` in the store&apos;s `ModuleRegistry` (#12846)

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Thu, 26 Mar 2026 16:46:22 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>c07c94d2 - Debugging: preserve original Wasm bytecode inside of compiled ELF artifact. (#12636)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#c07c94d2</link>
        <description>Debugging: preserve original Wasm bytecode inside of compiled ELF artifact. (#12636)* Debugging: preserve original Wasm bytecode inside of compiled ELF artifact.This PR adds logic to embed the original core Wasm module(s) from acompilation into a new ELF section, alongside other metadatasections. When a component is compiled, the core Wasms inside arepreserved, accessible by their `StaticModuleIndex`es.The need for this support arises from the guest-debuggerecosystem. Consider either a debugcomponent (bytecodealliance/rfcs#45) or a bespoke debugger in nativecode using Wasmtime&apos;s APIs. In either case, the existing APIs tointrospect execution state provide `Module` references for eachinstance from each stack frame, and PC offsets into these `Module`sare the way in which breakpoints are configured. The debugger willsomehow need to associate these `Module`s with the original Wasmbytecode, including e.g. any custom sections containing theproducer-specific ways of encoding debug metadata, to do somethinguseful. In particular also note that the GDB-stub protocol as extendedfor Wasm requires read access directly to the Wasm bytecode (it showsup as part of a &quot;memory map&quot; that is viewed by the standardread-remote-memory command); we can&apos;t delegate this requirement to theremote end of the stub connection, but have to handle it in the stubserver that runs inside Wasmtime (as a component or bespoke).We have two main choices: carry the original bytecode all the waythrough the Wasmtime compilation pipeline and present it via`Module::bytecode()`, ready to use; or say that this task isout-of-scope and that the debugger top-half can find it on disksomehow.Unfortunately the latter (&quot;out of scope, find the file&quot;) is somewhatat odds with the desired developer experience:- It means that we need some way of mapping a compiled Wasm artifact  back to a source Wasm; absent &quot;here&apos;s the full bytecode&quot;, that means  &quot;here&apos;s the path to the full bytecode&quot;, but that path is an  identifier that may not be universally accessible (consider  e.g. capabilities/preopens present for a debugger component) or  portable (consider e.g. moving the artifact to a different machine).  - Or we don&apos;t even provide that metadata, and require the user to    explicitly specify the same module filename twice -- once to    actually run it, and once as an argument to the debugger.- It means that we should account for stale artifacts and mark the  mismatch somehow; e.g. if the user starts debugging with Wasmtime,  either from a `.cwasm` on disk or with one produced in-memory just  for this run, and then subsequently rebuilds their source `.wasm`,  we no longer have a reference for it. (The same problem exists one  level up if source code is edited, but source to a Wasm producer  toolchain is definitely out-of-scope for Wasmtime.)- It means that special logic is required in the case of components to  map a module back to a specific component section (we would  essentially have to expose the static module IDs, then require the  debugger top-half to re-implement our exact flattening algorithm to  find that core module).The permissions issue alone was enough to convince me that we shoulddo something better than providing a filename (why should we have toauthorize the adapter to read the user&apos;s filesystem?) but all of theother benefits -- ensuring an exact match and ensuring perfectavailability -- are a nice bonus. The main downside is making the`.cwasm` larger (possibly substantially so), but this overhead is onlypresent when enabling guest-debugging, the data has to be presentanyway, and this is likely not a dealbreaker.* miri ignore tests with compilation* Review feedback.

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Tue, 24 Feb 2026 00:51:29 +0000</pubDate>
        <dc:creator>Chris Fallin &lt;chris@cfallin.org&gt;</dc:creator>
    </item>
<item>
        <title>96e19700 - Migrate the `wasmtime` crate to `wasmtime_environ::error::*` (#12231)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#96e19700</link>
        <description>Migrate the `wasmtime` crate to `wasmtime_environ::error::*` (#12231)* Migrate the `wasmtime` crate to `wasmtime_environ::error::*`Instead of `anyhow::Error`.This commit re-exports the `wasmtime_environ::error` as the `wasmtime::error`module, updates the prelude to include these new error-handling types, redirectsour top-level `wasmtime::{Error, Result}` re-exports to re-export`wasmtime::error::{Error, Result}`, and updates various use sites that weredirectly using `anyhow` to use the new `wasmtime` versions.This process also required updating the component macro and wit-bindgen macro touse the new error types instead of `anyhow`.Part of https://github.com/bytecodealliance/wasmtime/issues/12069* Replace wasmtime::error::Thing with wasmtime::Thing where it makes sense* cargo fmt* Move `crate::error::Thing` to `crate::Thing` where it makes sense

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Wed, 07 Jan 2026 17:08:11 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>17fbd3c6 - Debug: implement breakpoints and single-stepping. (#12133)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#17fbd3c6</link>
        <description>Debug: implement breakpoints and single-stepping. (#12133)* Debug: implement breakpoints and single-stepping.This is a PR that puts together a bunch of earlier pieces (patchablecalls in #12061 and #12101, private copies of code in #12051, and allthe prior debug event and instrumentation infrastructure) to implementbreakpoints in the guest debugger.These are implemented in the way we have planned in #11964: eachsequence point (location prior to a Wasm opcode) is now a patchable callinstruction, patched out (replaced with NOPs) by default. When patchedin, the breakpoint callsite calls a trampoline with the `patchable` ABIwhich then invokes the `breakpoint` hostcall. That hostcall emits thedebug event and nothing else.A few of the interesting bits in this PR include:- Implementations of &quot;unpublish&quot; (switch permissions back to read/write  from read/execute) for mmap&apos;d code memory on all our platforms.- Infrastructure in the frame-tables (debug info) metadata producer and  parser to record &quot;breakpoint patches&quot;.- A tweak to the NOP metadata packaged with the `MachBuffer` to allow  multiple NOP sizes. This lets us use one 5-byte NOP on x86-64, for  example (did you know x86-64 had these?!) rather than five 1-byte  NOPs.This PR also implements single-stepping with a global-per-`Store` flag,because at this point why not; it&apos;s a small additional bit of logic todo *all* patches in all modules registered in the `Store` when that flagis enabled.A few realizations for future work:- The need for an introspection API available to a debugger to see the  modules within a component is starting to become clear; either that,  or the &quot;module and PC&quot; location identifier for a breakpoint switches  to a &quot;module or component&quot; sum type. Right now, the tests for this  feature use only core modules. Extending to components should not  actually be hard at all, we just need to build the API for it.- The interaction between inlining and `patchable_call` is interesting:  what happens if we inline a `patchable_call` at a `try_call` callsite?  Right now, we do *not* update the `patchable_call` to a `try_call`,  because there is no `patchable_try_call`; this is fine in the Wasmtime  embedding in practice because we never (today!) throw exceptions from  a breakpoint handler. This does suggest to me that maybe we should  make patchability a property of any callsite, and allow try-calls to  be patchable too (with the same restriction about no return values as  the only restriction); but happy to discuss that one further.* Add missing debug.wat disas test.* Review feedback.* Fix comment on `CodeMemory::text_mut`.* Review feedback.* Review feedback: abort process on failure to re-apply executable permissions.* Implement icache flush for aarch64.This appears to be necessary as we otherwise see a failure in CI onmacOS/aarch64 that is consistent with patched-in breakpoint calls stillbeing incorrectly cached after we remove them and republish the code.There is a longstanding issue in #3310 tracking proper icache coherencehandling on aarch64. We implemented this for Linux with the `membarrier`syscall but never did so for macOS. Maybe this is the first point atwhich it matters, because code was always loaded at new addresses (hencedid not have coherence issues because nothing would have been cached)previously.prtest:full* Review feedback: use `next_multiple_of`.

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Fri, 12 Dec 2025 20:02:54 +0000</pubDate>
        <dc:creator>Chris Fallin &lt;chris@cfallin.org&gt;</dc:creator>
    </item>
<item>
        <title>99ecf728 - Debug: create private code memories per store when debugging is enabled.  (#12051)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#99ecf728</link>
        <description>Debug: create private code memories per store when debugging is enabled.  (#12051)* Debug: create private code memories per store when debugging is enabled.This will allow patching code to implement e.g. breakpoints. (That is,for now the copies are redundant, but soon they will not be.)This change follows the discussion [here] and offline to define a fewtypes that better encapsulate the distinction we want to enforce.Basically, there is almost never a bare `CodeMemory`; they are alwayswrapped in an `EngineCode` or `StoreCode`, the latter being a per-storeinstance of the former. Accessors are moved to the relevant place sothat, for example, one cannot get a pointer to a Wasm function&apos;s bodywithout being in the context of a `Store` where the containing modulehas been registered. The registry then returns a `ModuleWithCode` thatboxes up a `Module` reference and `StoreCode` together for cases wherewe need both the metadata from the module and the raw code to derivesomething.The only case where we return raw code pointers to the `EngineCode`directly have to do with Wasm-to-array trampolines: in some cases, e.g.`InstancePre` pre-creating data structures with references to hostfunctions, it breaks our expected performance characteristics to makethe function pointers store-specific. This is fine as long as theWasm-to-array trampolines never bake in direct calls to Wasm functions;the strong invariant is that Wasm functions never execute from`EngineCode` directly. Some parts of the component runtime would alsohave to be substantially refactored if we wanted to do away with thisexception.The per-`Store` module registry is substantially refactored in this PR.I got rid of the modules-without-code distinction (the case where amodule only has trampolines and no defined functions still works fine),and organized the BTreeMaps to key on start address rather than endaddress, which I find a little more intuitive (one then queries with thedual to the range -- 0-up-to-PC and last entry found).[here]: https://github.com/bytecodealliance/wasmtime/pull/12051#pullrequestreview-3493711812* Review feedback: do not assume a reasonable code alignment; error when it cannot be known* Review feedback: fail properly in profiler when we are cloning code* Fix guest-profiler C API.* Review feedback: make private-code representation impossible in non-debugging-support builds.* Add TODO comment referencing issue for cloning only .text.* clang-format* Review feedback: add back Component::image_range.* Review feedback: error on registering profiling metadata when debug is enabled.* rustfmt* Remove early bail on profiling-data registration when debugging is enabled: this always happens so we cannot error out.

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Wed, 03 Dec 2025 01:18:00 +0000</pubDate>
        <dc:creator>Chris Fallin &lt;chris@cfallin.org&gt;</dc:creator>
    </item>
<item>
        <title>90ac295e - Update Wasmtime to the 2024 Rust Edition (#10806)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#90ac295e</link>
        <description>Update Wasmtime to the 2024 Rust Edition (#10806)* Update Wasmtime to the 2024 Rust EditionNow that our MSRV supports the 2024 edition it&apos;s possible to make thisswitch. This commit moves Wasmtime to the 2024 Edition to keepup-to-date with Rust idioms and access many of the edition featuresexclusive to the 2024 edition.prtest:full* Reformat with the 2024 edition

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Mon, 19 May 2025 16:40:55 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>5393c2bf - Reduce typo count (#8951)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#5393c2bf</link>
        <description>Reduce typo count (#8951)

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Mon, 15 Jul 2024 14:26:59 +0000</pubDate>
        <dc:creator>Bruce Mitchener &lt;bruce.mitchener@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>0e9121da - Fix some typos (#8641)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#0e9121da</link>
        <description>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 &lt;andrew.brown@intel.com&gt;

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Thu, 16 May 2024 23:21:22 +0000</pubDate>
        <dc:creator>FrankReh &lt;FrankReh@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>81a89169 - Add support for `#![no_std]` to the `wasmtime` crate (#8533)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#81a89169</link>
        <description>Add support for `#![no_std]` to the `wasmtime` crate (#8533)* Always fall back to custom platform for WasmtimeThis commit updates Wasmtime&apos;s platform support to no longer require anopt-in `RUSTFLAGS` `--cfg` flag to be specified. With `no_std` becomingofficially supported this should provide a better onboarding experiencewhere the fallback custom platform is used. This will cause linkererrors if the symbols aren&apos;t implemented and searching/googling shouldlead back to our docs/repo (eventually, hopefully).* Change Wasmtime&apos;s TLS state to a single pointerThis commit updates the management of TLS to rely on just a singlepointer rather than a pair of a pointer and a `bool`. Additionallymanagement of the TLS state is pushed into platform-specific modules toenable different means of managing it, namely the &quot;custom&quot; platform nowhas a C function required to implement TLS state for Wasmtime.* Delay conversion to `Instant` in atomic intrinsicsThe `Duration` type is available in `no_std` but the `Instant` type isnot. The intention is to only support the `threads` proposal if `std` isactive but to assist with this split push the `Duration` further intoWasmtime to avoid using a type that can&apos;t be mentioned in `no_std`.* Gate more parts of Wasmtime on the `profiling` featureMove `serde_json` to an optional dependency and gate the guest profilerentirely on the `profiling` feature.* Refactor conversion to `anyhow::Error` in `wasmtime-environ`Have a dedicated trait for consuming `self` in addition to a`Result`-friendly trait.* Gate `gimli` in Wasmtime on `addr2line`Cut down the dependency list if `addr2line` isn&apos;t enabled since thenthe dependency is not used. While here additionally lift the versionrequirement for `addr2line` up to the workspace level.* Update `bindgen!` to have `no_std`-compatible outputPull most types from Wasmtime&apos;s `__internal` module as the source oftruth.* Use an `Option` for `gc_store` instead of `OnceCell`No need for synchronization here when mutability is already available inthe necessary contexts.* Enable embedder-defined host feature detection* Add `#![no_std]` support to the `wasmtime` crateThis commit enables compiling the `runtime`, `gc`, and `component-model`features of the `wasmtime` crate on targets that do not have `std`. Thistags the crate as `#![no_std]` and then updates everything internally toimport from `core` or `alloc` and adapt for the various idioms. Thisended up requiring some relatively extensive changes, but nothing tootoo bad in the grand scheme of things.* Require `std` for the perfmap profiling agentprtest:full* Fix build on wasm* Fix windows build* Remove unused import* Fix Windows/Unix build without `std` feature* Fix some doc links* Remove unused import* Fix build of wasi-common in isolation* Fix no_std build on macos* Re-fix build* Fix standalone build of wasmtime-cli-flags* Resolve a merge conflict* Review comments* Remove unused import

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Sat, 04 May 2024 22:02:26 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>d4242001 - Support compilation-only build by adding a `runtime` feature (#7766)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs#d4242001</link>
        <description>Support compilation-only build by adding a `runtime` feature (#7766)* Add `runtime` feature to `wasmtime` crateThis feature can be disabled to build `wasmtime` only for compilation.This can be useful when cross-compiling, especially on a target thatcan&apos;t run wasmtime itself (e.g. `wasm32`).* prtest:full* don&apos;t round pages without runtime feature* fix async assertions* move profiling into runtime* enable runtime for wasmtime-wasi* enable runtime for c-api* fix build_artifacts in non-cache case* fix miri extensions* enable runtime for wast* enable runtime for explorer* support cranelift all-arch on wasm32* add doc links for `WeakEngine`* simplify lib runtime cfgs* move limits and resources to runtime* move stack to runtime* move coredump and debug to runtime* add runtime to coredump and async features* add wasm32 build job* combine engine modules* single compile mod* remove allow for macro paths* add comments

            List of files:
            /wasmtime-44.0.1/crates/wasmtime/src/runtime/code.rs</description>
        <pubDate>Mon, 29 Jan 2024 15:51:43 +0000</pubDate>
        <dc:creator>Adam Bratschi-Kaye &lt;adam.bratschikaye@dfinity.org&gt;</dc:creator>
    </item>
</channel>
</rss>
