Comment by pjmlp

Comment by pjmlp 15 hours ago

3 replies

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.