mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-24 21:45:38 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user