gravity icon indicating copy to clipboard operation
gravity copied to clipboard

WebAssembly support

Open aloisdeniel opened this issue 6 years ago • 2 comments

Gravity could be a great candidate for WebAssembly to share code between web and mobile applications.

aloisdeniel avatar Jun 25 '18 06:06 aloisdeniel

It is a very good idea, in an upcoming version I'll add support for many different targets alternatives to the default bytecode generator.

marcobambini avatar Jun 25 '18 17:06 marcobambini

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. :)

IngwiePhoenix avatar Dec 17 '18 04:12 IngwiePhoenix