@Dan Gohman is https://github.com/bytecodealliance/wit-bindgen/pull/870 only blocked on a wasm-tools release?
Yes; I've tested it with a local dependency.
Could I perhaps recruit you as a guinea pig to do a wasm-tools release without me?
Sure
in the theory that the recent changes should make it much simpler
ok then in the hopes that it can be done without me I'm going to say "alright it's on you now" and do nothing else
or at least try to do nothing else :)
Ok, I'll give it a try!
Ok, we have https://github.com/bytecodealliance/wasm-tools/pull/1427
I'm contractually obliged to have no comment
it is a little silly to think about the number of times CI runs on exactly the same codebase
it's ok we just say "that's not my problem for today"
oh totally, just musing
I'd like to set up something Wasmtime-like where PRs only run a subset of CI, but it was kind of hard to do that in wasmtime
in infra in rust I was always convinced that 90% of rust/crate downloads are from CI
probably from like the same set of machines that are all used on github actions
and we're done!
huzzah it worked!
@Dan Gohman congratulations, this was very fast!
In the same time I was only able to get to a working prototype of the c++ binding on 64bit with lots of open codegen issues I hand-patched around. Now I need to clean it up to get closer to releasable state.
But this PoC was only possible leveraging your ground work in wasm tools. :bouquet:
@Dan Gohman I hit this panic when testing if Wasmtime worked with wit-bindgen
main now that this provenance work has landed. I think there's some missing bitcasts in there.
I started to write a test for tests/codegen/*.wit
and got as far as:
package test:variants-unioning-types;
world a {
variant v1 {
a(list<u8>),
b(tuple<u32, u32>),
}
import f1: func(x: v1);
variant v2 {
a(list<u8>),
b(tuple<f32, f32>),
}
import f2: func(x: v2);
}
but I fear that this rabbit hole may be a bit deeper than I imagined. Would you be up for filling out that test and the panics there?
basically I think more conversions need to be handled in the into-and-out-of pointer/length cases
Ah, ok. Yeah, I'll write more tests for variants and implement them.
ok cool, thanks!
all of these cases are already handled by join
in wasm-tools
so no need to touch things there, I think it's basically more of those join cases that need to be reflected in the bitcasts
Cool, should be straightforward then
we can theoretically generate these tests with wasm-tools wit-smith
and then use that to fuzz the bindings generators
but honestly I'm afraid of the volume of bugs when hooking up bindings generators to the fuzzer
Ok, https://github.com/bytecodealliance/wit-bindgen/pull/872 is up. It's straightforward, but there are getting to be a lot of bitcasts. I'm thinking about whether to remove the Bitcast enum and just have each backend match on the (to, from) pair itself.
(following up on the PR)
Last updated: Dec 23 2024 at 12:05 UTC