From 25e2ad6521f070b7764c275fbe7dcdf5bcfa7522 Mon Sep 17 00:00:00 2001 From: PanSi21 Date: Sat, 4 Jan 2025 23:58:39 +0100 Subject: [PATCH] Aggiorna index.js --- index.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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() ); +