Replies: 2 comments
-
I will admit this does get into the ugly world of file loaders and general asset management, but I think thats exactly what we need here, management of resources required to run a deno app. The advantage to putting this behind some kind of ffi specific flag in the import specifier is that we can at least restrict downloading random files to when import { path } from 'https://deno.land/x/native/sqlite3?type=ffi'
import { path } from 'ffi:https://deno.land/x/native/sqlite3'
import { path } from 'ffi!https://deno.land/x/native/sqlite3' |
Beta Was this translation helpful? Give feedback.
-
another suggestion, would be for a {
"tasks": {},
"manifest": [
{ "path": "native-binaries/sqlite.so" },
{ "path": "native-binaries/sqlite.dylib" },
{ "path": "native-binaries/sqlite" }
]
} |
Beta Was this translation helpful? Give feedback.
-
given that deno now supports npm imports with
npm:<package_name>
. Would it be feasible to support deno importing ffi shared libraries somehow? Something along the lines ofHeck if we could come up with a standard pattern for providing symbols, then we could make opening ffi files even simpler:
Just spitballing, but deno could essentially look for a directory that looks like
that last suggestion is probably a bit too magical, but just throwing out a few ideas on how to streamline using deno libs with ffi right now. For the most part, your current options are:
--allow-net
to let the script fetch a resource manuallyBeta Was this translation helpful? Give feedback.
All reactions