Which would be the best way (respect to performance) to embed a language
like Go in Rust?
(a) Since the Go compilers are written in C, it could be wrapped the
functions for compiling and linking, and then to do a system call to run
the binary.
(b) To call directly to the binaries to compile, link, and a last call
to run the final binary.
(c) Create a VM but it takes a lot of memory and it is necessary to be
an export in virtual machines to get a good performance, but the
negative part is that it takes a lot of memory. Lua works of this way;
it is basically a library written in C with an implementation based into
a VM to be easily embedded.
(d) Compile Go source to Rust.
* * *
Why to use Go like embedded language?
Go would be a great language for the user interface code of an
application like a game; the syntax is simple, with garbage-collection
getting simpler code that is developed faster, and the concurrency model
fits well to handle events asynchronously.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev