ADR-153: A Native Node Add-On Waits for a Program, and Is Generated C Over the C Library

Status: Superseded by ADR-284 — its D1-D3 are D28 there, together with ADR-131 D3 Date: September 19, 2026 Target Version: Nikaia 0.0.31 Related: ADR-130 and ADR-131 (the WebAssembly build, and one artifact, every binding a file over it), ADR-125 (the C library), ADR-140 (what two spellings cost), ADR-028 D5 (an entry exists because a program asked for it)

1. Context

ADR-130 and ADR-131 give Node the WebAssembly build. What a WebAssembly module cannot reach on Node — the filesystem, a socket of its own — those records left open, and a host that marketing named runs Node.

The shape that would close it is a native add-on: an N-API module Node loads, with the whole machine underneath.

2. Decisions

D1 — Not until a program asks.

No generator, no entry, no target. ADR-028 D5 is the rule and this is it applied: a capability exists because something needed it, and nothing in this tree needs a Node add-on. What exists today — the WebAssembly build — covers computation, which is what the demos are.

The cost of deciding this now is zero and the cost of building it now is not, which is the whole of the argument.

D2 — When one asks, it is generated C over the C library.

nikaia bind node writes an N-API shim in C, against the C library ADR-125 already produces — generated source that the host’s own toolchain compiles, exactly as the Python binding is generated source the host’s own ctypes loads.

D3 — And not a napi dependency in the emitted crate.

That is what keeps ADR-131 D1 whole: one artifact, and every binding a file over it. A Rust-side napi crate in the emitted project would make a second artifact — a Node-shaped build of the program rather than a file over the one build — and then which artifact is the program becomes a question this project has spent several records making sure never arises.

3. Consequences

4. What this does not decide

5. What is built

Nothing, and that is what this record decides rather than a state it reports. The entry existed because two records pointed at the gap and nobody had written down that the gap is deliberate.

What would start the work is a program in this tree that needs Node to reach a file or a socket — and the day it exists, D2 and D3 say what shape the answer takes, so the decision will not have to be taken under the pressure of the program that wants it.

This site is open source. Improve this page.