nodejs: add and fix windows (#6581)

* simplex-chat-nodejs: adjust binding.gyp for windows

* simplex-chat-nodejs: different library linkage for windows

* simplex-chat-nodejs: remove non-moving GC in Windows

"non-moving GC is broken on windows with GHC 9.4-9.6.3" from:

https://github.com/simplex-chat/simplex-chat/blob/master/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c#L11-L17

* ci: add windows to release-nodejs-libs

* simplex-chat-nodejs: same curl flags for dll.def download
This commit is contained in:
sh
2026-01-15 16:36:35 +00:00
committed by GitHub
parent 2d64365d8c
commit d3a72473e9
3 changed files with 49 additions and 4 deletions
@@ -10,6 +10,17 @@ namespace simplex {
using namespace Napi;
void haskell_init() {
#ifdef _WIN32
// non-moving GC is broken on windows with GHC 9.4-9.6.3
int argc = 5;
const char *argv[] = {
"simplex",
"+RTS", // requires `hs_init_with_rtsopts`
"-A64m", // chunk size for new allocations
"-H64m", // initial heap size
"--install-signal-handlers=no",
nullptr};
#else
int argc = 6;
const char *argv[] = {
"simplex",
@@ -19,6 +30,7 @@ void haskell_init() {
"-xn", // non-moving GC
"--install-signal-handlers=no",
nullptr};
#endif
char **pargv = const_cast<char **>(argv);
hs_init_with_rtsopts(&argc, &pargv);
}