I'm trying to use Raylib inside of Bun but when I'm running my program, it works the first time but after that it crashes
And when I tried to see what's going on with a debugger, the program didn't crash
I tried with every version of bun from 1.0 to 1.0.20 and it still segfault
Here's the code
import * as raylibImport from "./index";
const cStr = (str: string) => Buffer.from(str + "\0");
const raylib = raylibImport.loadRaylib("libraylib.so");
raylib.symbols.InitWindow(800, 450, cStr("Hello World"));
while(!raylib.symbols.WindowShouldClose()) {
raylib.symbols.BeginDrawing();
raylib.symbols.ClearBackground(-1);
raylib.symbols.EndDrawing();
}
raylib.symbols.CloseWindow();
raylib.close();
The function loadRaylib is an auto-generated function which contains every functions of raylib (I didn't format the code, and it's pretty long: https://paste.rs/SmfZp)