Rust compile deno_runtime error
Hi
I've been this error when I'm compiling my code that uses
I've been this error when I'm compiling my code that uses deno_runtime lib. But I don't know what's this and how I can fix it. Can you help me? I'm using Ubuntu
error: linking with cc failed: exit status: 1 
26 Replies
It's hard to say without full output from the compiler
Hi @.bartlomieju, thanks for answer . I'll send a file with the full output, a moment
When I add
deno_runtime and deno_core this error occursThat's really strange... Is your project available online to be checked out?
Yes, https://github.com/txpipe/oura/tree/fix/update-dependences
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/denoThanks, 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 šHi, gm
do I need to install deno_core or just deno_runtime?

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@mmastrac 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?
https://github.com/buenojs/bueno/blob/main/ext/fs/lib.rs
I struggled with
#[op2] for a little bit, this code helped me figure it out@lino-levan thank you very much
it helped me a lot and now it works ā¤ļø
@.bartlomieju what's
deno_kv ?It's an extension that implements
Deno.openKv APIthis 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
tks