Embedding the latest version of deno with deno_runtime #32576
-
|
Hello All, I'm trying to embed deno in my Rust program - I'm using deno_runtime-0.245.0 and deno_core-0.390.0. Here is the code I have When I run this code, the code fails to load telemetry.ts from deno_telemetry - Here is the error I get When I load the CLI Snapshot ( uncomment the CLI_SNAPSHOT ), I the above problem goes away but my extension is not available in ext:core/ops - I'm not sure whether it is possible to load extensions over a snapshot. I did some searching and at a couple of places, I have seen the mention of an example for using deno_runtime under runtime/examples. However, I'm unable to find it. I can see examples for deno_core but not for deno_runtime. Can someone help me with what is wrong in the above code or point me to a sample code that uses deno_runtime. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
You need to use |
Beta Was this translation helpful? Give feedback.
-
|
To embed |
Beta Was this translation helpful? Give feedback.
-
|
When embedding Deno, make sure that all extension modules are successfully loaded by explicitly defining them in the |
Beta Was this translation helpful? Give feedback.
-
|
When embedding Deno, make sure that all extension modules are successfully loaded by explicitly defining them in the |
Beta Was this translation helpful? Give feedback.
You need to use
RuntimeOptions.extension_transpileroption becausedeno_telemetryships with TS source. You can use one from https://github.com/denoland/deno/blob/main/runtime/transpile.rs.