https://github.com/denoffi/denoffi
Deno Foreign Function Interface.
https://github.com/denoffi/denoffi
deno ffi
Last synced: 4 months ago
JSON representation
Deno Foreign Function Interface.
- Host: GitHub
- URL: https://github.com/denoffi/denoffi
- Owner: denoffi
- License: mit
- Created: 2021-04-02T05:27:31.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-17T02:39:10.000Z (almost 3 years ago)
- Last Synced: 2025-12-20T12:25:38.116Z (6 months ago)
- Topics: deno, ffi
- Language: TypeScript
- Homepage: https://deno.land/x/ffi
- Size: 202 KB
- Stars: 38
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Foreign Function Interface (WIP & Need Help)
[](https://github.com/denoffi/denoffi/actions/workflows/ci.yml)
[](https://github.com/denoffi/denoffi/releases)
[](https://github.com/denoffi/denoffi/blob/main/LICENSE)
**Deno Foreign Function Interface.**
## Example
```ts
import * as ffi from "https://deno.land/x/ffi/mod.ts";
type Fn0 = ffi.CFunction<"int add(int, int)">; // { "add": { parameters: ["i32", "i32"]; result: "i32" } }
type Fn1 = ffi.CFunction<"long add(long)">; // { "abs": { parameters: ["i64"]; result: "i64" } }
type Fn2 = ffi.CFunction<"void hello(int)">; // { "hello": { parameters: ["i32"]; result: "void" } }
type Fn3 = ffi.CFunction<"void hello()">; // { "hello": { parameters: []; result: "void" } }
type Fn4 = ffi.CFunction<"void hello(void)">; // { "hello": { parameters: ["void"]; result: "void" } }
```
### License
[denoffi](https://github.com/denoffi/denoffi) is released under the MIT License.
See the bundled [LICENSE](./LICENSE) file for details.