O(e^n) 🇮🇹 (@NickNaso) header
O(e^n) 🇮🇹 (@NickNaso) profile picture

Software developer - JavaScript - Node.js - C - C++ - Go Tireless dreamer - XOXO

Italy
Joined April 2009
Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)Photo by O(e^n) 🇮🇹 (@NickNaso)
#nodejs #javascript #native #addon #bindings #go #c #cpp #quickjs Node-API has one of the best ABI-stability stories in the JS world. napi-bindings.dev is now live: a reference hub for Node-API and home of the napi-bindings tools. What's inside 🧵
1
4
18
1,836
The reference: 189 symbols (157 functions, 23 types, 9 callbacks), each on its own page. Signature, parameters, the Node-API version it was added in, the header it lives in (js_native_api.h or node_api.h). ⌘K finds any of them in a keystroke.
1
1
71
#nodejs #quickjs #napi #native #addon #code #c #cpp #rust #go #JavaScript Native addons are compiled against Node-API, not against V8. So why do they only run inside node? quickjs-napi implements all 155 Node-API v10 functions on top of QuickJS. Same .node file, different engine
1
78
No relink, no rebuild. An addon doesn’t link a library: it resolves napi* and uv* from the running process. So the quickjs-napi executable exports the whole Node-API plus libuv 1.51, exactly like node does. quickjs-napi -e "require('./addon.node')"
1
11
The engine: QuickJS now covers most of ES2025. Top-level await, WeakRef/FinalizationRegistry, iterator helpers, Set methods, resizable ArrayBuffer, RegExp v flag, Float16Array, JSON modules, Promise.try, Math.sumPrecise.
1
13
#nodejs #javascript #addon #napi #cpp #c #zig #native Marmotta v0.10.0 is out, and it’s a release about boring bugs. The kind that pass locally and fail in CI: path resolution, toolchain selection, cleanup. Here’s what changed in a Node.js native addon build tool, and why 🧵
2
81
Context: Marmotta builds C/C++ Node-API addons using Zig as the compiler. No node-gyp, no CMake, no system C/C++ toolchain. Zig is downloaded and managed for you, and cross-compiling is one flag: npx marmotta build --target aarch64-macos
1
22
Anatomy of a call: V8 → Node-API → C trampoline → a single cgo crossing → Go. Numbers, booleans and strings up to ~500 B are converted in C, within the same crossing: add(a, b) costs only 34 ns more than noop(). Other types: Go codecs built once and cached.
1
1
31
#nodejs #javascript #cpp #c #native #addon #napi #zig #deno #bun #executable Marmotta v0.9.0: the Node-API addon build tool now ships as native OS packages. How one SHA256SUMS file drives 8 packages and 7 recipes, and the bug class that almost slipped through 🧵
1
1
64
Single source of truth: every release publishes standalone executables + SHA256SUMS. A script renders every recipe from that file. A missing checksum or leftover placeholder is a hard failure, never a half-filled recipe.
1
35
#nodejs #javascript #cpp #c #native #addon #napi #zig #deno #bun #executable Marmotta v0.8.0 is out. The Zig-based build tool for Node-API addons now ships as a standalone executable, so you don't need Node.js or npm to run it.
1
45
8 targets, matching Zig's coverage: linux x64/arm64 (glibc + musl), macOS x64/arm64, windows x64/arm64. Node-API headers ship inside the binary and are extracted once to ~/.marmotta, keyed by the archive's SHA-256, because Zig needs real files on disk.
1
19
#nodejs #javascript #cpp #c #native #addon #napi #zig #deno #bun #logs #pino Marmotta v0.7.0 ships structured logging. 🎉 Sounds small. It took two review rounds, because once a CLI's output feeds CI, every newline, prefix and exit code is a contract. What we learned 🧵
1
1
43
Context: Marmotta builds C/C++ Node-API addons with the Zig compiler. No node-gyp, no CMake, cross-compile with --target. Until now it spoke console.log(). Fine in a terminal. Useless to a CI job that needs to know why a build failed.
1
22
#packaging #ecommerce #unboxing #packagingdesign #resi #sostenibilità #web2pack #web2print #scatole Spedizione, reso e unboxing in una sola scatola: arriva la scatola Ecommerce su @packly . Anche da 1 pezzo: pack.ly/en/categories/ecomme…
1
28
Chiusura con 1 o 2 bande adesive: la seconda serve al cliente per il reso. Nuovo materiale kraft fuori, bianco dentro.
13
#packaging #ecommerce #unboxing #packagingdesign #resi #sostenibilità #web2pack #web2print #scatole Spedizione, reso e unboxing in una sola scatola: arriva la scatola Ecommerce su @packly . Anche da 1 pezzo: pack.ly/en/categories/ecomme…
25
#nodejs #Ghostscript #javascript #zig #cpp #native #addon Every Node.js lib wrapping Ghostscript starts the same way: "install Ghostscript first." libgs removes that step. Here's how it ships a C library through npm to 19 platforms 🧵
1
1
72
What it is: Ghostscript 10.08 + deps as a static gs.a (DLLs on Windows), plus the API headers: iapi.h, ierrors.h, gserrors.h, gdevdsp.h. Fonts and PostScript resources are compiled in. No X11, no CUPS, no fontconfig.
1
26
1) Other runtimes Deno and Bun load Node-API addons too. The integration tests now run against Node.js, Deno and Bun, and CI installs all three. On Windows, Marmotta generates host-process Node-API bindings.
1
19
#nodejs #javascript #native #addon #napi #buildtool #zig #cpp I just published Porting five real Node-API (N-API) addons from node-gyp and CMake to Marmotta medium.com/@nicknaso/porting…
2
130
#nodejs #javascript #c #cpp #native #addon #napi #build #tool #zig Marmotta 0.5.0 is out. 🎉 - marmotta.config.js: static or async config, can vary by build target - zigVersion: pin the Zig toolchain per project (bypasses PATH) npm i -g marmotta github.com/napi-bindings/mar…
1
1
48
@3xhaust_ thanks for the feedback
1
10
#packaging #packagingdesign #customerexperience #ecommerce #webtoprint #web2pack @packly Our new Packly Help Center is live. Guides on artwork files, dielines, orders, shipping and PPWR, instant search with Ctrl+K, and our team always one click away. pack.ly/en/help-center
23
#nodejs #javascript #cpp #c #native #addon #build Building a Node-API addon without Python, without Visual Studio, without CMake. I wrote Marmotta, a TypeScript build tool that uses the Zig compiler. A thread on how it works and where it falls short 🧵
3
5
339
The problem: node-gyp delegates to the system toolchain. Python for GYP, MSVC/Xcode/GCC, versions compatible with your Node. Errors like "find Python" and "Could not find any Visual Studio installation" are almost always about the environment, not your code.
1
1
41
#NodeConf #nodejs #javascript Overview of V8 heap management
1
19
#MideConf #javascript #nodejs Improving the capabilities of Emscripten, WebAssembly and Rust
15