Skip to content

Fixed-length lists, host side - #12315

Merged
alexcrichton merged 21 commits into
bytecodealliance:mainfrom
cpetig:fixed-size-list-host
Jul 7, 2026
Merged

Fixed-length lists, host side#12315
alexcrichton merged 21 commits into
bytecodealliance:mainfrom
cpetig:fixed-size-list-host

Conversation

@cpetig

@cpetig cpetig commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

Replace the todo's with proper code and add a host side test case.

Implements #12279

Includes all the commits on #10619 , so that one should be merged first.

@github-actions github-actions Bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API. wasmtime:config Issues related to the configuration of Wasmtime labels Jan 11, 2026
@github-actions

Copy link
Copy Markdown

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing", "wasmtime:api", "wasmtime:c-api", "wasmtime:config"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@github-actions

Copy link
Copy Markdown

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

  • If you added a new Config method, you wrote extensive documentation for
    it.

    Details

    Our documentation should be of the following form:

    Short, simple summary sentence.
    
    More details. These details can be multiple paragraphs. There should be
    information about not just the method, but its parameters and results as
    well.
    
    Is this method fallible? If so, when can it return an error?
    
    Can this method panic? If so, when does it panic?
    
    # Example
    
    Optional example here.
    
  • If you added a new Config method, or modified an existing one, you
    ensured that this configuration is exercised by the fuzz targets.

    Details

    For example, if you expose a new strategy for allocating the next instance
    slot inside the pooling allocator, you should ensure that at least one of our
    fuzz targets exercises that new strategy.

    Often, all that is required of you is to ensure that there is a knob for this
    configuration option in wasmtime_fuzzing::Config (or one
    of its nested structs).

    Rarely, this may require authoring a new fuzz target to specifically test this
    configuration. See our docs on fuzzing for more details.

  • If you are enabling a configuration option by default, make sure that it
    has been fuzzed for at least two weeks before turning it on by default.


Details

To modify this label's message, edit the .github/label-messager/wasmtime-config.md file.

To add new label messages or remove existing label messages, edit the
.github/label-messager.json configuration file.

Learn more.

Comment thread crates/wasmtime/src/runtime/component/func/typed.rs Outdated
@cpetig cpetig changed the title Fixed size list, host side Fixed-length lists, host side Jan 13, 2026
@cpetig

cpetig commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

TODO: Check whether the standard name fixed-length lists is used over fixed size lists.

@AlbertMarashi

Copy link
Copy Markdown

What's remaining for this?

@cpetig

cpetig commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

What's remaining for this?

I didn't find the time to add a proper test case. And I (non-blockingly) wait for a new wasm-tools release to do the renaming in one row.

@cpetig
cpetig force-pushed the fixed-size-list-host branch from 8d18537 to 9157634 Compare June 11, 2026 22:38
Comment thread crates/environ/src/component/types.rs Outdated
Comment thread tests/all/component_model/fixed_length_list.rs Outdated
Comment thread tests/all/component_model/fixed_length_list.rs Outdated
Comment thread crates/wasmtime/src/runtime/component/types.rs Outdated
@cpetig
cpetig marked this pull request as ready for review June 14, 2026 00:20
@cpetig
cpetig requested review from a team as code owners June 14, 2026 00:20
@cpetig
cpetig requested review from fitzgen and removed request for a team June 14, 2026 00:20
@cpetig cpetig self-assigned this Jun 14, 2026
@cpetig cpetig moved this from Todo to In Progress in Implement WIT Fixed-Length-Lists Jun 14, 2026

@cpetig cpetig left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether the O(n) constraint applies to the host side as the user always controls the data types (and dimensions) added on the host side, but if so I will gladly investigate into a different solution.

Comment thread crates/wasmtime/src/runtime/component/values.rs Outdated
Comment thread crates/fuzzing/src/oracles/component_api.rs
Comment thread crates/wasmtime/src/runtime/component/values.rs Outdated
@cpetig

cpetig commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@Felix-El

@fitzgen
fitzgen requested review from alexcrichton and removed request for a team and fitzgen June 15, 2026 16:29
Comment thread crates/fuzzing/src/oracles/component_api.rs
Comment thread crates/wasmtime/src/runtime/component/values.rs Outdated
Comment thread crates/wasmtime/src/runtime/component/values.rs Outdated
Comment thread crates/environ/src/component/types.rs
Comment thread crates/wasmtime/src/runtime/component/func/typed.rs Outdated
@cpetig
cpetig force-pushed the fixed-size-list-host branch from 7e7faa7 to be79c14 Compare June 20, 2026 23:05
@cpetig
cpetig force-pushed the fixed-size-list-host branch from c8a031d to 30fc6e4 Compare July 1, 2026 20:55
@cpetig

cpetig commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@alexcrichton would you please take another look at my latest fixes?

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor thoughts from me but otherwise looks great, thanks!

Comment thread crates/environ/src/component/types.rs
Comment thread crates/wasmtime/src/runtime/component/func/typed.rs Outdated
@alexcrichton
alexcrichton added this pull request to the merge queue Jul 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 6, 2026
@alexcrichton
alexcrichton added this pull request to the merge queue Jul 7, 2026
Merged via the queue into bytecodealliance:main with commit 30ea2ab Jul 7, 2026
57 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Implement WIT Fixed-Length-Lists Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API. wasmtime:config Issues related to the configuration of Wasmtime

Development

Successfully merging this pull request may close these issues.

3 participants