diff --git a/index.js b/index.js index f67b2c6..adcd0ce 100644 --- a/index.js +++ b/index.js @@ -1 +1,18 @@ -console.log("Hello via Bun!"); \ No newline at end of file + +import { cc } from "bun:ffi"; +import source from "./test.c" with { type: "file" }; + +const { + symbols: { fibonacci }, +} = cc({ + source, + symbols: { + hello: { + args: [], + returns: "int", + }, + }, +}); + +console.log("fibonacci serie 1 000 000: ", fibonacci() ); +