nameless
nameless4mo ago

Fully embedding Deno runtime

Hi. Is there any example of fully utilizing Deno as it is originally, and on top of it providing some additional functionality? My background is to create Metamod* plugin with JS runtime to give modders ability to create mods using JavaScript/TypeScript. Firstly, I thought about using Node.js runtime, which has ability to run projects (with package.json) out of the box. However, when you make the bindings of GoldSrc structs/classes and their methods to be able to read/write/run from JS - it's painful, especially when we're talking about C/C++ macros. So, I decided to switch over Rust with Deno runtime. My goal is to be able to leverage all the possibilities of Deno (TypeScript support, import_map.json, deno.json) and my own functionality on top of it. Shortly, just use Deno as it is, plus additional integrated functionality in my Metamod* plugin. Can you hint me of steps to do? And do I understand it correct that without cli crate there's no possibility that Deno runtime will be able to use import_map? * Metamod is a plugin system for GoldSrc based games
2 Replies
nameless
namelessOP4mo ago
To say even more shortly, I want to give modders possibility to run Deno projects, with installed dependencies from npm etc + runtime itself will contain additional functionality to interoperate with GoldSrc
bartlomieju
bartlomieju4mo ago
You'd need to fork the Deno CLI and modify it. We don't expose it as a library Or you'd have to pull all the crate that the cli uses and stitch them together