This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-08
Channels
- # asami (22)
- # babashka (35)
- # beginners (4)
- # calva (76)
- # cider (7)
- # clj-on-windows (89)
- # clojure (30)
- # clojure-europe (25)
- # clojurescript (10)
- # conjure (46)
- # fulcro (13)
- # gratitude (5)
- # lambdaisland (4)
- # lsp (13)
- # malli (5)
- # membrane (6)
- # nbb (1)
- # off-topic (11)
- # re-frame (2)
- # releases (1)
- # shadow-cljs (45)
- # xtdb (4)
Folks, does somebody knows how to work with native node.js modules with N-API? I'm having quite a hard time trying to construct a C++ object (wrapped via ObjectWrap) from outside the class...
@U3Y18N0UC Don't know about that one. Are you using node.js because of Atom or arbitrary reasons? You could also try bun.sh which has an improved built-in FFI library
Because of Atom, unfortunately... there are a lot of in-house extensions that are written in C++ with the outdated Nan library. I found the easiest way to make then work is to convert to N-API. Both are horribly documented but at least N-API is "Call this method, return this value" instead of Nan that is "Copy this memory address to this other one"
this may help
we had the same pain when bridging ai/ml libs for nodejs
The problem for me is that everything I'm seeing is too basic.
For example, how do I instantiate a Javascript Set
from N-API? I can't seem to find any doc;
How do I call a JS function on N-API? Again, almost no results
How do I make console.log
work? Nothing
Re-clojure is asking me for a speaker tagline. Does "Your organic pal that's fun to be with!" is good enough? 😄

FWIW, personally I prefer "dumb" straight-to-business headlines. They make it so much easier to decide whether a recorded video is for me or not.