Skip to content

Conversation

@cpetig
Copy link
Collaborator

@cpetig cpetig commented Apr 20, 2025

See WebAssembly/component-model#384 for the commit which added fixed size lists to the component model standard documents.

@cpetig cpetig force-pushed the fixed_size_list branch from 0d3ff73 to 0e17f59 Compare May 7, 2025 21:09
@cpetig
Copy link
Collaborator Author

cpetig commented Jul 13, 2025

I have a newer version at https://github.com/cpetig/wit-bindgen/tree/work-in-progress which tests more in depth and also supports C++, I need to separate and clean up that one and then push it here for review.

@cpetig
Copy link
Collaborator Author

cpetig commented Jul 13, 2025

Also this requires bytecodealliance/wasmtime#10619 , and a very recent version of wasm-component-ld for the tests to pass.

@cpetig
Copy link
Collaborator Author

cpetig commented Jan 11, 2026

This is ready, but depends on bytecodealliance/wasmtime#10619 for successful tests.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks good to me!

}
ret.arg("--invoke=run()");
ret.arg("--invoke=run()")
.arg("-Wcomponent-model-fixed-size-list");
Copy link
Member

Choose a reason for hiding this comment

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

For this, for now, this'll go in .github/workflows/main.yml. In retrospect this should go in the test file itself with some sort of //@ ... option or something like that. I can investigate poking around with the latter, so if you want to move this line itself to .github/ that should be sufficient.

Copy link
Member

Choose a reason for hiding this comment

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

In #1497 I'm moving these flags to test files themselves

@cpetig
Copy link
Collaborator Author

cpetig commented Jan 13, 2026

This still has a limitation: The generated Rust and C++ code can't handle non-Copy/POD types. For Functional Safety this isn't an issue as you need to avoid putting string or list into a fixed size array anyway, resources might still make some sense.

I created #1501 to track this limitation.

@cpetig cpetig changed the title Initial fixed size list implementation Initial fixed-length list implementation Jan 13, 2026
@cpetig
Copy link
Collaborator Author

cpetig commented Jan 13, 2026

TODO: Check for correct usage of "fixed-length" over "fixed-size"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants