D
Deno

help

What is the right way to bundle native modules?

BBBustin Base6/25/2023
If I'm not able to import a native module with the built-in "import" keyword, what is the ideal way to download and cache them? Should I be fetching it? How should I be caching it locally? Should I make an "install" script? What are the general techniques, does anyone have any examples?
BBBustin Base6/25/2023
Like in this example: https://deno.com/manual@v1.34.3/runtime/ffi_api Suppose the binaries are all pre-built and available for download. How would you recommend "installing" these or pulling them down before runtime?
Deno
Foreign Function Interface | Manual | Deno
As of Deno 1.13 and later, the FFI (foreign function interface) API allows users to call libraries written in native languages that support the C ABIs (C/C++, Rust, Zig, V, etc.) using Deno.dlopen.
Ddjdev6/25/2023
many ffi modules use plug: https://deno.land/x/plug but it fetches at runtime currently there’s no realistic way to install before runtime
BBBustin Base6/25/2023
Ok very cool, thanks, I'll check that out.

Looking for more? Join the community!

Recommended Posts
HandleScope in async opIs there a way to get v8::HandleScope inside async op if I add it as ``` scope: &mut v8::HandleScopDeno LSP randomly breaks until a restart (unable to send result to client)This wasnt an issue until recently. In vscode randomly the lsp stops working. Trying to use the autoIs anyone working on LLMs for Deno so I don't have to learn it in disgusting Python?I'm coming to terms with the reality of having to learn this technology but not on Python.. I mean..Permission denied (os error 13)Please help me, I'm desparate. It doesn't print anything else.Is there a rich text (wysiwyg) editor for deno fresh ?I'm working on a blog, and i need a rich text editor for articles.deno_core usageAre there any repos using deno_core in their code + how would I enable the unstable features and URLError reading `allocUnsafe` using npm:icsHello there, I try to use npm:ics in my project and in some runs it works, in others it doesn't (whiUsing discord.js in Deno?Apparently Deno supports discord.js now. Awesome. But now I can't make it work. According to debug Type alias with inherited type parameter constraintsIs there any way to do this? I want SVLTN to just be a short-name alias for SomeVeryLongTypeName, anFresh: global stateIs it possible to have a global state that can be accessed from anywhere? Currently I'm passing the Run Deno on Linux without /proc mountedI have a few automatic scripts using deno to run stuff, and wanted to migrate them to another MachinReasons to choose Node.jsI've been tasked to write a list of pros/cons of Deno in comparison to Node.js. I am quite honestly