Replies: 1 comment 1 reply
-
|
Yes, this is possible and @diakopter has done it before. Virgil has a By default the compiler exposes a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for a language that can do the following...
Compile to wasm using WebAssembly, so eg inside javascript.
We setup a compiler wasm module, hand it a source string, compile it and get wasm bytecode out.
Then we take that bytecode and use it to setup a library module and do, well, much the same again, pass some data in process it and pull some data out. So normal sort of wasm library use but from source code compiled on the fly.
My hope is for all the compiler gubbins to be run inside a WebAssembly module in a slightly performant way without being huge and pretending it has an entire linux sub system inside...
The compiler looks like it is very self contained, so is this a use case that was considered?
It seems like it should be possible but involves some messing about with the compiler to get it setup more as a wasm library module. IE replace the CLI and IO of the highest level code with some exported library functions.
I'm really just asking here to check that this sounds reasonable and I haven't misunderstood anything?
Beta Was this translation helpful? Give feedback.
All reactions