Skip to main content
This release is 0 versions behind 0.0.0 — the latest version of @gnome/ffi. Jump to latest

@gnome/ffi@0.0.0-beta-002
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
This package works with Deno
This package works with Bun
JSR Score
70%
Published
2 months ago (0.0.0-beta-002)

@gnome/ffi

logo 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);

MIT License

Built and signed on
GitHub Actions
View transparency log

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";