#Rust compile deno_runtime error
1 messages · Page 1 of 1 (latest)
It's hard to say without full output from the compiler
Hi @slim schooner, thanks for answer . I'll send a file with the full output, a moment
When I add deno_runtime and deno_core this error occurs
That's really strange... Is your project available online to be checked out?
this command cargo run -- daemon --config examples/deno_basics/daemon.toml
I updated deno dependencies to the latest version
thank you for your help
Here we're using deno
https://github.com/txpipe/oura/tree/fix/update-dependences/src/filters/deno
Thanks, I'll check it tomorrow
Hey, I updated the code to use deno_core inside the deno_runtime and removed it from my deno feature on toml file and everything worked
🤔
I used this example https://github.com/denoland/deno/tree/main/runtime/examples/extension_with_ops
I've tried to remove deno_core from my dependencies but deno_runtime still uses it
deno_runtime has a feature to import deno_core?
It doesn't have a feature - deno_runtime just directly reexports deno_core. After sleeping on it, I think you just had two different versions of deno_core used, which in turn used two different versions of rusty_v8 and that's why you got duplicate symbols in the linker output
It's better to only specify dependency on deno_runtime - then it will make sure you have compatible deno_core and rusty_v8 crate
Great that you figured it out 👍
You should only need deno_runtime
Do you get the same error if you compile from the terminal? That might be a flake from rust-analyzer
error: custom attribute panicked
--> src/filters/deno/mod.rs:19:1
|
19 | #[op]
| ^^^^^
|
= help: message: deno_core not present in `Cargo.toml`: CrateNotFound { crate_name: "deno_core", path: "/home/paulo/projects/txpipe/oura/Cargo.toml" }
error: custom attribute panicked
--> src/filters/deno/mod.rs:30:1
|
30 | #[op]
| ^^^^^
|
= help: message: deno_core not present in `Cargo.toml`: CrateNotFound { crate_name: "deno_core", path: "/home/paulo/projects/txpipe/oura/Cargo.toml" }
warning: unused import: `OpState`
--> src/filters/deno/mod.rs:3:52
|
3 | use deno_runtime::deno_core::{op, ModuleSpecifier, OpState};
| ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0433]: failed to resolve: use of undeclared crate or module `op_pop_record`
--> src/filters/deno/mod.rs:17:57
|
17 | deno_runtime::deno_core::extension!(deno_filter, ops = [op_pop_record, op_put_record]);
| ^^^^^^^^^^^^^ use of undeclared crate or module `op_pop_record`
error[E0433]: failed to resolve: use of undeclared crate or module `op_put_record`
--> src/filters/deno/mod.rs:17:72
|
17 | deno_runtime::deno_core::extension!(deno_filter, ops = [op_pop_record, op_put_record]);
| ^^^^^^^^^^^^^ use of undeclared crate or module `op_put_record`
For more information about this error, try `rustc --explain E0433`.
warning: `oura` (lib) generated 1 warning
error: could not compile `oura` (lib) due to 4 previous errors; 1 warning emitted
@frozen stratus can you take a look and advise?
It works only if I install deno_core
My cargo.toml
Do you have an example using #[op2] macro?
@slim schooner what's deno_kv ?
It's an extension that implements Deno.openKv API
this lib is required? Because when I use deno_runtime I need to install protoc. Is there any feature to use minimal deno_runtime?
Unfortunately it is. There's no slimmed down version of the runtime, you'd have to pull crates one by one
Ok, thank you very much. Do you know what version this was implemented?
Hmmm, about 2-3 versions back
