This release is 0 versions behind 0.0.0 — the latest version of @gnome/ffi. Jump to latest
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
provides 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-beta-002)
@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);
Built and signed on
View transparency logGitHub Actions
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";