4 ms·
Create your own JavaScript Engine
- sfvisser 4y agoThis looks like a great way to add scripting capabilities to your rust app! Binding ops to build your own runtime seems easy enough. Would be nice if there was an easy way to integrate TypeScript and have access to the type checker. So you could load code at runtime, type check it and run it when possible. This, combined with Deno running a sandboxed environment seems pretty useful!
- brabel 4y agoI would first try to find out how much overhead doing that has compared to embedding a smaller language that was designed to be embedded, like Lua. I bet this would be thousands of times heavier both on disk and on memory usage.
- sfvisser 4y agoMaybe you can load a single interpreter instance once on app startup and reuse that in different contexts? Not much experience with this, but I assume there are possibilities.
- EgoIncarnate 4y agoThe article does not talk about creating your own Javascript engine (ie v8, JavaScript Core, Spidermonkey). The actual article title is "Roll your own JavaScript runtime", which is more accurate.
- forgotpwd16 4y agoMoreover article mentions at the end that an existent engine is used ("integrates").