3 ms·
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
by pjmlp 2y 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.
- solarkraft 2y agoI definitely want to avoid learning how to set up and use the compiler and linker when I just want to use some package.
- pjmlp 2y agoKnowledge is empowering.
- paperplatter 2y agoI 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.