[rust-dev] embedding Rust?
jhaberman at gmail.com
Sun Jan 19 08:53:36 PST 2014
Is it a design goal of the Rust compiler that it (eventually) be
offered as a library, so that you can compile/link Rust code and
dynamically load / call into it at runtime?
If so, what do you foresee as far as size/speed profile? I get the
impression that the Rust compiler is relatively large/slow (both to
compile rustc itself and to compile Rust code) -- is this inherent or
do you see it slimming/speeding over time? I guess LLVM is pretty
heavyweight on its own.
When it comes to embedding I always compare against LuaJIT which
compiles in ~20 seconds to a ~500k library and can compile/run "Hello
World" in 5ms. This is surely an unrealistic goal for Rust which has
to do far more static checking, but I'm curious to know what a
realistic ballpark is for where Rust will likely get.
More information about the Rust-dev