refactor: Nan to node-addons-api/fix for bun compatibility #332
refactor: Nan to node-addons-api/fix for bun compatibility #332x8BitRain wants to merge 7 commits intostackgl:masterfrom
Conversation
|
I've been meaning to work on this someday. Thanks for contributing this. I'll review this over the next while, but on cursory look, it looks good. Tests passing on their first go is also promising. When merged, this will likely go into v10 of this project. I'll also have to spend some time reading more about node-addons type packages, and what changes, if any, will need to be made for packaging up the release. It being re-written in TS will also require some changes from me, such as updating the code linting/formatting, and excluding the derived JS files (I might prefer to exclude them, and only distribute the "built" files to npm) |
|
This will also close #211 |
|
@dhritzkiv If the PR is too big to review all at once I can split it into multiple ones if you want. btw you can check the validity of the new macos dylibs with I'm acutely aware of the dangers of committing binaries to repos these days but compiling ANGLE is a pain and not really an option for an NPM package to do on each build. |
Closes #296
#211
This is a major refactor away from nan and towards node-addons-api that we found was necessary in order for headless-gl to work under a Bun runtime, the downside is older node versions <8 will not support this lib without Nan. Our fork works on Bun 1.3.11 and Node v24.13.1 but if this refactor is undesirable for backwards compatibility purposes then please feel free to close.
I got libEGL.dylib from
./Contents/Frameworks/Google Chrome Framework.framework/Versions/146.0.7680.178/Libraries/libEGL.dyliband libGLESv2.dylib from./Contents/Frameworks/Google Chrome Framework.framework/Versions/146.0.7680.165/Libraries/libEGL.dylibin case you wanted to verify authenticity of the binaries.AI disclaimer: Claude code was used during this refactor.