DenoDDeno
Powered by
Optical Disc πŸ’ΏO
Denoβ€’3y agoβ€’
6 replies
Optical Disc πŸ’Ώ

deno_runtime NpmResolver like the CLI?

As far as I can tell, if I want to embed Deno in my Rust application using deno_core and deno_runtime, I would effectively need to implement my own npm: specifier resolution.
https://docs.rs/deno_node/0.76.0/deno_node/trait.NpmResolver.html
I found this trait I can implement, but what I really want is for module imports to just be identical to how they are when running code from the plain Deno CLI.
People seem to say frequently that deno_runtime is the solution for copying the Deno CLI's behavior in a custom executable, but I can't find any existing structures that mimic the module-graph mapping behavior that is included with the CLI, so wouldn't I be better off just forking the CLI code?
NpmResolver in deno_node - Rust
API documentation for the Rust
NpmResolver
NpmResolver
trait in crate
deno_node
deno_node
.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?