Comment by tjelen

Comment by tjelen 16 hours ago

4 replies

I would say that the problem really is there. Dealing with native dependencies and addons was almost always a pain as the article describes (and not just from developer perspective), so anything that helps there is really appreciated.

Not sure what you mean by the right tools in this context.

pjmlp 15 hours ago

First of all, this is for C, and most extensions are written in C++ or Rust nowadays.

Secondly, the right tools are having Python, the C and C++ compiler, node-gyp and cmake.js installed, and actually understand how they work.

But what do I know, nowadays folks use C and C++ as scripting languages putting a full library into a single header file to avoid learning how to use the compiler and linker.

  • paperplatter 12 hours ago

    I know how to compile and link C. I've never done C<->JS FFI but could probably figure it out. But if I have relatively small C code in single files, why bother? I'll take the easy route unless there's a clear reason not to.

    The thing is, I'm not already using the Bun runtime and wouldn't switch just for this.

  • solarkraft 14 hours ago

    I definitely want to avoid learning how to set up and use the compiler and linker when I just want to use some package.