gravity
gravity copied to clipboard
WebAssembly support
Gravity could be a great candidate for WebAssembly to share code between web and mobile applications.
It is a very good idea, in an upcoming version I'll add support for many different targets alternatives to the default bytecode generator.
It would be nice to have some kind of CLI tool which we could use to "compile" scripts into binary data, so we could use it for embedding. For instance, compiling scripts to bytecode, and transforming that bytecode into a C-struct, so it can then be embedded. That'd be really cool!
Like:
$ gravity-cc ./src -o gravity-compiled-code.c
$ gcc gravity-compiled-code.c src/myprogram.c -o main
$ ./main
Or at least, have a way to compile scripts into bytecode for faster off-disk execution. :)