latest
gnomejs/sdkprovides some shared utils for working with foreign function interfaces in Deno and Bun and a shim for bun.
This package works with Deno, Bun
JSR Score
70%
Published
2 months ago (0.0.0)
@gnome/ffi
Work less. Do more.
Overview
@gnome/ffi provides some shared utils for working with foreign function interfaces in Deno and Bun and a shim for bun.
Given the current limitations in deno around specifiers like bun:test
and bun:ffi
the @gnome/ffi/bun module provides the imports with type declarations for
bun:ffi
and performs a dynamic import to work around the current limitations.
Basic Usage
import * as ffi from "@gnome/ffi"; const buf = new Uint8Array([0x0]) const ptr = ffi.createPointer(buf); console.log(ptr);
Add Package
deno add jsr:@gnome/ffi
Import symbol
import * as mod from "@gnome/ffi";
---- OR ----
Import directly with a jsr specifier
import * as mod from "jsr:@gnome/ffi";
Add Package
bunx jsr add @gnome/ffi
Import symbol
import * as mod from "@gnome/ffi";