<?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 nested.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>94740588 - Migrate the Wasmtime CLI to `wasmtime::error` (#12295)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#94740588</link>
        <description>Migrate the Wasmtime CLI to `wasmtime::error` (#12295)* Migrate wasmtime-cli to `wasmtime::error`* migrate benches to `wasmtime::error` as well* Remove new usage of anyhow that snuck in

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Fri, 09 Jan 2026 19:15:48 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>c0bb341d - Run some tests in MIRI on CI (#6332)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#c0bb341d</link>
        <description>Run some tests in MIRI on CI (#6332)* Run some tests in MIRI on CIThis commit is an implementation of getting at least chunks of Wasmtimeto run in MIRI on CI. The full test suite is not possible to run in MIRIbecause MIRI cannot run Cranelift-produced code at runtime (aka itdoesn&apos;t support JITs). Running MIRI, however, is still quite valuable ifwe can manage it because it would have trivially detectedGHSA-ch89-5g45-qwc7, our most recent security advisory. The goal of thisPR is to select a subset of the test suite to execute in CI under MIRIand boost our confidence in the copious amount of `unsafe` code inWasmtime&apos;s runtime.Under MIRI&apos;s default settings, which is to use the [StackedBorrows][stacked] model, much of the code in `Instance` and `VMContext`is considered invalid. Under the optional [Tree Borrows][tree] model,however, this same code is accepted. After some [extremely helpfuldiscussion][discuss] on the Rust Zulip my current conclusion is thatwhat we&apos;re doing is not fundamentally un-sound but we need to model itin a different way. This PR, however, uses the Tree Borrows model forMIRI to get something onto CI sooner rather than later, and I hope tofollow this up with something that passed Stacked Borrows. Additionallythat&apos;ll hopefully make this diff smaller and easier to digest.Given all that, the end result of this PR is to get 131 separate unittests executing on CI. These unit tests largely exercise the embeddingAPI where wasm function compilation is not involved. Some tests compilewasm functions but don&apos;t run them, but compiling wasm through Craneliftin MIRI is so slow that it doesn&apos;t seem worth it at this time. This doesmean that there&apos;s a pretty big hole in MIRI&apos;s test coverage, but that&apos;sto be expected as we&apos;re a JIT compiler after all.To get tests working in MIRI this PR uses a number of strategies:* When platform-specific code is involved there&apos;s now `#[cfg(miri)]` for  MIRI&apos;s version. For example there&apos;s a custom-built &quot;mmap&quot; just for  MIRI now. Many of these are simple noops, some are `unimplemented!()`  as they shouldn&apos;t be reached, and some are slightly nontrivial  implementations such as mmaps and trap handling (for native-to-native  function calls).* Many test modules are simply excluded via `#![cfg(not(miri))]` at the  top of the file. This excludes the entire module&apos;s worth of tests from  MIRI. Other modules have `#[cfg_attr(miri, ignore)]` annotations to  ignore tests by default on MIRI. The latter form is used in modules  where some tests work and some don&apos;t. This means that all future test  additions will need to be effectively annotated whether they work in  MIRI or not. My hope though is that there&apos;s enough precedent in the  test suite of what to do to not cause too much burden.* A number of locations are fixed with respect to MIRI&apos;s analysis. For  example `ComponentInstance`, the component equivalent of  `wasmtime_runtime::Instance`, was actually left out from the fix for  the CVE by accident. MIRI dutifully highlighted the issues here and  I&apos;ve fixed them locally. Some locations fixed for MIRI are changed to  something that looks similar but is subtly different. For example  retaining items in a `Store&lt;T&gt;` is now done with a Wasmtime-specific  `StoreBox&lt;T&gt;` type. This is because, with MIRI&apos;s analyses, moving a  `Box&lt;T&gt;` invalidates all pointers derived from this `Box&lt;T&gt;`. We don&apos;t  want these semantics, so we effectively have a custom `Box&lt;T&gt;` to suit  our needs in this regard.* Some default configuration is different under MIRI. For example most  linear memories are dynamic with no guards and no space reserved for  growth. Settings such as parallel compilation are disabled. These are  applied to make MIRI &quot;work by default&quot; in more places ideally. Some  tests which perform N iterations of something perform fewer iterations  on MIRI to not take quite so long.This PR is not intended to be a one-and-done-we-never-look-at-it-againkind of thing. Instead this is intended to lay the groundwork tocontinuously run MIRI in CI to catch any soundness issues. This feels,to me, overdue given the amount of `unsafe` code inside of Wasmtime. Myhope is that over time we can figure out how to run Wasm in MIRI butthat may take quite some time. Regardless this will be adding nontrivialmaintenance work to contributors to Wasmtime. MIRI will be run on CI formerges, MIRI will have test failures when everything else passes,MIRI&apos;s errors will need to be deciphered by those who have probablynever run MIRI before, things like that. Despite all this to me it seemsworth the cost at this time. Just getting this running caught twopossible soundness bugs in the component implementation that could havehad a real-world impact in the future![stacked]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md[tree]: https://perso.crans.org/vanille/treebor/[discuss]: https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Tree.20vs.20Stacked.20Borrows.20.26.20a.20debugging.20question* Update alignment comment

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Wed, 03 May 2023 21:02:33 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>284fec12 - Remove explicit `S` type from component functions (#5722)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#284fec12</link>
        <description>Remove explicit `S` type from component functions (#5722)I ended up forgetting this as part of #5275.

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Mon, 06 Feb 2023 22:07:57 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>78ecc17d - unsplat component::Linker::func_wrap args (#5065)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#78ecc17d</link>
        <description>unsplat component::Linker::func_wrap args (#5065)* component::Linker::func_wrap: replace IntoComponentFunc with directly accepting a closureWe find that this makes the Linker::func_wrap type signature much easierto read. The IntoComponentFunc abstraction was adding a lot of weight to&quot;splat&quot; a set of arguments from a tuple of types into individualarguments to the closure. Additionally, making the StoreContextMutargument optional, or the Result&lt;return&gt; optional, wasn&apos;t veryworthwhile.* Fixes for the new style of closure required by component::Linker::func_wrap* fix fuzzing generator

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Tue, 18 Oct 2022 14:24:14 +0000</pubDate>
        <dc:creator>Pat Hickey &lt;phickey@fastly.com&gt;</dc:creator>
    </item>
<item>
        <title>29c7de73 - Update wasm-tools dependencies (#4970)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#29c7de73</link>
        <description>Update wasm-tools dependencies (#4970)* Update wasm-tools dependenciesThis update brings in a number of features such as:* The component model binary format and AST has been slightly adjusted  in a few locations. Names are dropped from parameters/results now in  the internal representation since they were not used anyway. At this  time the ability to bind a multi-return function has not been exposed.* The `wasmparser` validator pass will now share allocations with prior  functions, providing what&apos;s probably a very minor speedup for Wasmtime  itself.* The text format for many component-related tests now requires named  parameters.* Some new relaxed-simd instructions are updated to be ignored.I hope to have a follow-up to expose the multi-return ability to theembedding API of components.* Update audit information for new crates

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Tue, 27 Sep 2022 18:12:34 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>57dca934 - Upgrade wasm-tools crates, namely the component model  (#4715)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#57dca934</link>
        <description>Upgrade wasm-tools crates, namely the component model  (#4715)* Upgrade wasm-tools crates, namely the component modelThis commit pulls in the latest versions of all of the `wasm-tools`family of crates. There were two major changes that happened in`wasm-tools` in the meantime:* bytecodealliance/wasm-tools#697 - this commit introduced a new API for  more efficiently reading binary operators from a wasm binary. The old  `Operator`-based reading was left in place, however, and continues to  be what Wasmtime uses. I hope to update Wasmtime in a future PR to use  this new API, but for now the biggest change is...* bytecodealliance/wasm-tools#703 - this commit was a major update to  the component model AST. This commit almost entirely deals with the  fallout of this change.The changes made to the component model were:1. The `unit` type no longer exists. This was generally a simple change   where the `Unit` case in a few different locations were all removed.2. The `expected` type was renamed to `result`. This similarly was   relatively lightweight and mostly just a renaming on the surface. I   took this opportunity to rename `val::Result` to `val::ResultVal` and   `types::Result` to `types::ResultType` to avoid clashing with the   standard library types. The `Option`-based types were handled with   this as well.3. The payload type of `variant` and `result` types are now optional.   This affected many locations that calculate flat type   representations, ABI information, etc. The `#[derive(ComponentType)]`   macro now specifically handles Rust-defined `enum` types which have   no payload to the equivalent in the component model.4. Functions can now return multiple parameters. This changed the   signature of invoking component functions because the return value is   now bound by `ComponentNamedList` (renamed from `ComponentParams`).   This had a large effect in the tests, fuzz test case generation, etc.5. Function types with 2-or-more parameters/results must uniquely name   all parameters/results. This mostly affected the text format used   throughout the tests.I haven&apos;t added specifically new tests for multi-return but I changed anumber of tests to use it. Additionally I&apos;ve updated the fuzzers to allexercise multi-return as well so I think we should get some goodcoverage with that.* Update version numbers* Use crates.io

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Wed, 17 Aug 2022 16:17:34 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>651f4085 - Add support for nested components (#4285)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/tests/all/component_model/nested.rs#651f4085</link>
        <description>Add support for nested components (#4285)* Add support for nested componentsThis commit is an implementation of a number of features of thecomponent model including:* Defining nested components* Outer aliases to components and modules* Instantiating nested componentsThe implementation here is intended to be a foundational pillar ofWasmtime&apos;s component model support since recursion and nested componentsare the bread-and-butter of the component model. At a high level theintention for the component model implementation in Wasmtime has longbeen that the recursive nature of components is &quot;erased&quot; at compile timeto something that&apos;s more optimized and efficient to process. This commitended up exemplifying this quite well where the vast majority of theinternal changes here are in the &quot;compilation&quot; phase of a componentrather than the runtime instantiation phase. The support in the`wasmtime` crate, the runtime instantiation support, only had minorupdates here while the internals of translation have seen heavy updates.The `translate` module was greatly refactored here in this commit.Previously it would, as a component is parsed, create a final`Component` to hand off to trampoline compilation and get persisted atruntime. Instead now it&apos;s a thin layer over `wasmparser` which simplyrecords a list of `LocalInitializer` entries for how to instantiate thecomponent and its index spaces are built. This internal representationof the instantiation of a component is pretty close to the binary formatintentionally.Instead of performing dataflow legwork the `translate` phase of acomponent is now responsible for two primary tasks:1. All components and modules are discovered within a component. They&apos;re   assigned `Static{Component,Module}Index` depending on where they&apos;re   found and a `{Module,}Translation` is prepared for each one. This   &quot;flattens&quot; the recursive structure of the binary into an indexed list   processable later.2. The lexical scope of components is managed here to implement outer   module and component aliases. This is a significant design   implementation because when closing over an outer component or module   that item may actually be imported or something like the result of a   previous instantiation. This means that the capture of   modules and components is both a lexical concern as well as a runtime   concern. The handling of the &quot;runtime&quot; bits are handled in the next   phase of compilation.The next and currently final phase of compilation is a new pass wheremuch of the historical code in `translate.rs` has been moved to (butheavily refactored). The goal of compilation is to produce one &quot;flat&quot;list of initializers for a component (as happens prior to this PR) andto achieve this an &quot;inliner&quot; phase runs which runs through theinstantiation process at compile time to produce a list of initializers.This `inline` module is the main addition as part of this PR and is nowthe workhorse for dataflow analysis and tracking what&apos;s actuallyreferring to what.During the `inline` phase the local initializers recorded in the`translate` phase are processed, in sequence, to instantiate acomponent. Definitions of items are tracked to correspond to their rootdefinition which allows seeing across instantiation argument boundariesand such. Handling &quot;upvars&quot; for component outer aliases is handled inthe `inline` phase as well by creating state for a component whenever acomponent is defined as was recorded during the `translate` phase.Finally this phase is chiefly responsible for doing all string-basedname resolution at compile time that it can. This means that at runtimeno string maps will need to be consulted for item exports and such.The final result of inlining is a list of &quot;global initializers&quot; which isa flat list processed during instantiation time. These are almostidentical to the initializers that were processed prior to this PR.There are certainly still more gaps of the component model to implementbut this should be a major leg up in terms of functionality thatWasmtime implements. This commit, however leaves behind a &quot;hole&quot; whichis not intended to be filled in at this time, namely importing andexporting components at the &quot;root&quot; level from and to the host. This istracked and explained in more detail as part of #4283.cc #4185 as this completes a number of items there* Tweak code to work on stable without warning* Review comments

            List of files:
            /wasmtime-44.0.1/tests/all/component_model/nested.rs</description>
        <pubDate>Tue, 21 Jun 2022 18:48:56 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
</channel>
</rss>
