D
Deno

help

Rust compile deno_runtime error

PBPaulo Bressan9/6/2023
Hi ferrisUpsideDown 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
No description
Bbartlomieju9/6/2023
It's hard to say without full output from the compiler
PBPaulo Bressan9/6/2023
Hi @.bartlomieju, thanks for answer . I'll send a file with the full output, a moment
PBPaulo Bressan9/6/2023
PBPaulo Bressan9/6/2023
When I add deno_runtime and deno_core this error occurs
Bbartlomieju9/6/2023
That's really strange... Is your project available online to be checked out?
PBPaulo Bressan9/6/2023
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/deno
Bbartlomieju9/6/2023
Thanks, I'll check it tomorrow
PBPaulo Bressan9/6/2023
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?
Bbartlomieju9/7/2023
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 šŸ‘
PBPaulo Bressan9/7/2023
Hi, gm do I need to install deno_core or just deno_runtime?
PBPaulo Bressan9/7/2023
No description
Bbartlomieju9/7/2023
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
PBPaulo Bressan9/7/2023
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
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
Bbartlomieju9/7/2023
@mmastrac can you take a look and advise?
PBPaulo Bressan9/7/2023
It works only if I install deno_core
PBPaulo Bressan9/7/2023
No description
PBPaulo Bressan9/7/2023
My cargo.toml
No description
PBPaulo Bressan9/7/2023
Do you have an example using #[op2] macro?
IioB9/7/2023
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
PBPaulo Bressan9/8/2023
@lino-levan thank you very much it helped me a lot and now it works ā¤ļø @.bartlomieju what's deno_kv ?
Bbartlomieju9/8/2023
It's an extension that implements Deno.openKv API
PBPaulo Bressan9/8/2023
this lib is required? Because when I use deno_runtime I need to install protoc. Is there any feature to use minimal deno_runtime?
Bbartlomieju9/8/2023
Unfortunately it is. There's no slimmed down version of the runtime, you'd have to pull crates one by one
PBPaulo Bressan9/8/2023
Ok, thank you very much. Do you know what version this was implemented?
Bbartlomieju9/8/2023
Hmmm, about 2-3 versions back
PBPaulo Bressan9/8/2023
tks

Looking for more? Join the community!

Recommended Posts
lsp bug?Is there any reason why intellisense would identify the type correctly, but after completion it woulConvert m3u8 stream to mp4?Hey. Whats the best /fastest way to convert a m3u8 stream (all files are in a local folder) to a norGetting error trying to download NPM package``` Download https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz D`deno check` error: Cannot find name 'Deno'`In my project, `deno check` has started producing the error `TS2304 [ERROR]: Cannot find name 'Deno'Read CSV files inside zip file using the web streams APII need to read a number of csv files inside a zip file. The basic example I've got working so far isUnable to find local file with installed deno moduleI am working on porting the 'octoherd/cli' to Deno. One of the things it does is load a script modulImporting NPM packages with `npm:` where package has `@` in the nameI want to import the package `@hono/zod-openapi`, version `0.30` I tried to add to my `deno.json` lHow to use KV Connect?Hello there <:HelloThere:730465880991072285> Is there any plan an making an STD module for creatindlopen() from web urlHey, is it possible to provide a url to the dll file from a cdn server? For example if I want to dDoes calling `bundle` inside a handler make sense?hey all I wanted to understand if this is smart to do. I am using the `cacheRoot` option and wanted Is WASM generally faster than using Deno FFI?...Deno hanging when trying to connect with MongooseWhen I try to connect to MongoDB using Mongoose the whole process just hangs until eventually timingEmbeding Dino compiled code within rust (Tauri) code, inside main.rs during build compilation.Hi. Still not sure if this is question for Tauri community or Deno community, so I'll place on both DuckDB deno package broken & npm package segfaultingHas anyone had any luck using DuckDB with Deno? I've tried with the npm package with segfaults on a Get Deno working with ESLintHi! I'm trying out a Deno project and I want to get Deno TS Typing working with ESLint. I understanInstall issueI am triyng to instal Deno but i always get this error and I cant solve it. Help pls!LSP: Uncached or missing @types/node when importing node:processI'd like to understand better what's going on here in case it's a potential bug in node interop: ```Deno vs Node for writing a React component library.Hi all. I love Deno and what it does, but I need some help deciding if it is right for my small projrun code at the start of every hourI would like the most performant code pls.Denoflare scheduled workersCloudflare has a cronjob feature for running workers at a scheduled time. Wrangler has a flag wrangl