titzer / virgil

A fast and lightweight native programming language
1.24k stars 48 forks source link

Improve WASM targets #69

Open titzer opened 2 years ago

titzer commented 2 years ago

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.

syrusakbary commented 2 years ago

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?

titzer commented 2 years ago

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.