From 322e5d79cd887af318aa7e13f198e8be6f770bea Mon Sep 17 00:00:00 2001 From: t3nus Date: Wed, 17 Dec 2025 09:21:21 +0000 Subject: [PATCH] Copy README.md to apps/bnk/README.md so the NPM website has the readme --- apps/bnk/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 apps/bnk/README.md diff --git a/apps/bnk/README.md b/apps/bnk/README.md new file mode 100644 index 0000000..a297da2 --- /dev/null +++ b/apps/bnk/README.md @@ -0,0 +1,25 @@ +# BunNativeKit + +> Early work in progress. Don't expect anything to work (how you want it to at least). + +BunNativeKit (bnk) is a little research project i started to do a bunch of funny "nonsense" and "neat" things to- uh i mean WITH* bun :D + +### Essentially a TLDR of BNK would be my funny attempt at working with native code in Bun, but wrapping it up in a nice DX box :D +> it is not currently classifiable as JIT - but, im working on things under the hood to get closer to that goal. But the API signature will stay roughly the same. + +Write inline Zig, C, C++, or Rust right in your TypeScript and have it Just Work™. The JIT compiler handles all the compilation, caching (both memory and disk!), and FFI symbol parsing automagically. Need production builds? AOT mode has you covered with cross-platform compilation and TypeScript declaration generation. Oh and it'll even install Zig for you if you don't have it <3 + +```ts +import { jit } from "@bunnativekit/jit"; +// .jit() expects a main function. currently it will run main, though this will be configurable in the future. +const result = await jit.zig(` + export fn main(a: i32, b: i32) i32 { + return a + b; + } +`, 6, 7); // => 13 +``` + +Give [bunnativekit.xwx.gg](https://bunnativekit.xwx.gg) a look for more nonsense + deeper dive into what bnk is, why/what/huh???- and a api ref ([bnk.xwx.gg](https://bnk.xwx.gg) also works dw <3) + + +MIT License <3