WebAssembly / wasi-threads

140 stars 8 forks source link

Add thread spawn test #11

Closed loganek closed 1 year ago

loganek commented 1 year ago

This is one of the tests I'm using for testing WAMR implementation; I thought it might be beneficial to others to push the test here as it's almost libc agnostic (used libc here only for assert and int64_t).

I've implemented that in C as I don't think pure WAT implementation brings a lot more value here (although if that's what's preferred, I don't mind changing that). If that's merged, I'll also integrate the repository with wasi-testsuite so the test (and any other tests added to the repo) can be executed with other wasi tests.

The test here is rather simple but does a few checks; I'm open for suggestions so we can either extend this test or add few more tests to cover more functionality.

sbc100 commented 1 year ago

Nice! Its great to see and end-to-end example like this. I will use this on the emscripten side to make sure we keep our API in sync.

loganek commented 1 year ago

I'm merging this PR as there's no objection; feel free to open an issue if you have any comments regarding the test.