virgil icon indicating copy to clipboard operation
virgil copied to clipboard

Improve WASM targets

Open titzer opened this issue 2 years ago • 2 comments

Virgil compiles to WASM and has three different runtime implementations:

(1) rt/wave, the (W)eb(A)ssembly (V)irgil (E)nvironment), a minimal set of imports just to get Virgil running, which was only implemented in Wizard and a bit-rotted version in V8 using the C embedding API. (2) rt/wasi_snapshot_preview1, an implementation of System against the wasi_snapshot_preview1 API, but it is not complete. (3) rt/node, an implementation of System against the node.js APIs.

I could use some help with (2), as there are a few things not working. Also, there is no equivalent of chmod, which is a minor thing, but needed to bootstrap the compiler.

Also, I haven't fully tested (3) or made it robust. Could use some help here.

titzer avatar Jul 13 '22 18:07 titzer

I could use some help with (2), as there are a few things not working

I didn't have time to look into this yet. But it will be useful to know exactly what is not working. Do you have some insight on this?

syrusakbary avatar Jul 14 '22 18:07 syrusakbary

System.fileLoad(), for one, which needs stat to get a file size. Generally the tests in test/wasi/ and test/system were what I was working on before I got sidetracked.

titzer avatar Jul 14 '22 19:07 titzer