buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.16k stars 32 forks source link

wasm web/wasi target #142

Closed giann closed 2 months ago

giann commented 1 year ago

Probable issues:

Resources:

judah-caruso commented 9 months ago

Are there any plans for compiling buzz to wasm directly? Assuming this ticket is to just allow the buzz interpreter to run within wasm?

giann commented 9 months ago

Not sure what you mean? buzz can only run within wasm if built for wasm.

judah-caruso commented 9 months ago

Ah sorry, I meant creating something like a new RunFlavor that compiles buzz to wasm (similar to assemblyscript).

For example:

// main.buzz
import "std";

fun main([str] _) > void {
    print("hello, world");
}
$ buzz -target=wasi_wasm32 -out=main.wasm main.buzz
$ wasmer main.wasm # hello world

This is most likely out of scope for the project, but I was just curious if this is a plan for the future.

giann commented 9 months ago

Yes this is out of scope. That would require buzz to become an AOT compiled language.

giann commented 2 months ago

Reopening because of https://ziglang.org/download/0.12.0/release-notes.html#Bring-Your-Own-OS-API-Layer-Regressed which effectively kills this feature