Repository navigation
NyxJ 2.0.0
Released 2026-11-07 · changes since
v1.0.0· 40 commits · 1 contributor · 4 pull requests · 90 files changed, 18242 insertions(+), 785 deletions(-)
Highlights
NyxJ 2.0.0 turns the engine into a complete, production-oriented platform: a rewritten thread-safe core,
a dozen data modules, a web framework with operations tooling, and a WebAssembly build.
Added
Core engine
- Thread-safe RFC 8259 parser (no global state) with full string escape decoding,
\usurrogate pairs,
strict UTF-8 validation and the exact JSON number grammar. - Detailed error model:
nyxj_errorwith code, byte offset, line, column and message;nyxj_strerror()
andnyxj_error_name().nyxj_resultnow carries the error next to the data. - JSON Denial-of-Service protection: maximum depth (512 by default), input size, string length and
elements per container (nyxj_parse_options), optional duplicate-key rejection. - Relaxed mode accepting comments and trailing commas (
NYXJ_PARSE_RELAXED). - SIMD-accelerated whitespace and string scanning (SSE2 on x86-64, NEON on AArch64, scalar fallback).
- Arena allocator (memory pool) for fragmentation-free trees released in O(1).
- Builder API (
nyxj_new_*,nyxj_object_set*,nyxj_array_push/insert/remove),nyxj_clone(),
nyxj_equals(), typed getters and one-line dot-path access (nyxj_get_path(root, "user.langs[1]")). - Linear-time serializer with full escaping, shortest round-trip numbers, pretty-printing, sorted keys
and optional\uXXXXoutput. - Structured logging with levels, JSON output, custom sinks and compile-time stripping
(NYXJ_LOG_COMPILE_LEVEL).
Data modules
- JSON-to-struct mapping with field descriptors (
nyxj_map.h), inverse mapping and a C code generator
(nyxj gen-struct). - JSON Schema validation (types, enums,
$ref, combinators,if/then/else, objects, arrays, numeric and
string constraints, common formats) with path-aware reports. - NyxQuery: JSONPath with recursive descent, wildcards, slices, unions and filter expressions.
- Differential state tracking: JSON Pointer, JSON Patch diff/apply (atomic) and JSON Merge Patch.
- MessagePack encoder and decoder.
- Zero-copy token view that indexes the original buffer without copying strings.
- Streaming SAX parser with constant memory, chunked input and multi-document (NDJSON) support.
- Heuristic repair of almost-JSON (comments, quotes, missing/trailing commas, unclosed structures,
Python/JavaScript literals, sloppy numbers, Markdown fences) andnyxj_parse_lenient(). - The Guardian sanitizer: allocation-free inspection of raw buffers before parsing.
- Fail-safe tools: shadow execution (
nyxj_parse_verified), triple modular redundancy and checksums.
Runtime and networking
- Worker thread pool with bounded queue, backpressure and adjustable concurrency.
- Embedded key-value store with TTL, atomic counters, prefix listing and JSON snapshots.
- Prometheus metrics registry and process/system resource monitoring.
- Unix domain sockets and a lock-free shared-memory ring buffer for inter-process communication.
- Express-style router with
:paramsand wildcards, middleware chain, 405 handling, CORS and request
bodies parsed on the worker pool (NYXJ_ROUTE_ASYNC). - HTTPS/TLS for the server and a native synchronous HTTP/HTTPS client.
- OpenAPI 3 document generated from the routes, served with Swagger UI at
/docs. /healthand/readyprobes (readiness returns 503 andX-NyxJ-Scale-Hint: scale-outunder load),
heartbeat sampling and optional heartbeat webhook.- Eco-Throttle: worker concurrency reduced when CPU temperature or load crosses a threshold.
- Safe-Gate reverse proxy that sanitizes requests before forwarding them to an upstream service.
- Plugin system loading
.so/.dllmodules through a versioned host function table. - Experimental gossip clustering over UDP with peer discovery, failure detection and load sharing hints.
Tooling
nyxjCLI: validate, format, minify, get, query, repair, schema, diff, patch, msgpack, gen-struct,
stream, tokens, gate and bench.nyxj-serveroptions for every feature and a JSON configuration file.- WebAssembly build of the core (
make wasm) with a browser demo and Node.js smoke test. - Test suite (500+ checks) covering every module plus a live client/server integration test and an
end-to-end smoke script; CI on Linux x64/ARM64, macOS, Windows, sanitizers and WebAssembly. - Release pipeline: a
v*tag builds and tests Linux x64/ARM64, macOS, Windows and WebAssembly, then
publishes a GitHub release with generated notes (changelog highlights, grouped commits, pull requests,
contributors), archives, the OpenAPI document, SHA-256 checksums and build provenance. A manual run
rehearses the release without publishing. - Examples: struct mapping, streaming sensor feed, plugin, browser demo.
DOCUMENTATION.md: a complete, beginner-friendly guide (36 chapters and appendices) that teaches
NyxJ from JSON basics and installation to production services, with compiled and tested examples;
API and server quick references indocs/, and the ROADMAP.
Changed
- The build now produces
build/libnyxj.a,build/nyxj,build/nyxj-server, the example plugin and the
examples from a single cross-platform Makefile. nyxj_parse()returnsroot == NULLon error instead of a partial tree.- Error responses use one shape:
{"error": "<code>", "message": "...", "status": N}. - Arrays now track their capacity: build values with the builder API rather than raw
malloc. - The API and client examples use the router and the HTTP client.
- The README is a short overview that points to the complete guide.
Fixed
- String escapes are decoded when parsing and escaped when serializing (they were copied verbatim).
- Numbers with exponents and invalid forms such as
-or01are handled per the JSON grammar. - Missing allocation checks and memory leaks on error paths in the parser.
- The client example referenced an undefined field (
msg.text).
Security
- Nesting depth is limited by default, closing the stack exhaustion vector of deeply nested payloads.
- Response headers are sanitized against CR/LF injection; request bodies above
max_body_sizeget 413.
Removed
src/server.c(replaced bysrc/server/main.c) and the per-example Makefiles.
What changed
Commits grouped by type (Conventional Commits)
✨ New features
- core: Rewrite the parser as a thread-safe RFC 8259 engine with detailed errors and JSON DoS limits (
04c86da) by @fordimalanda - core: Add builder API, dot-path getters, linear serializer and arena allocator (
a7158d5) by @fordimalanda - log: Add structured logging with levels, JSON output and compile-time stripping (
e9c88c3) by @fordimalanda - map: Add JSON-to-struct mapping and a C struct code generator (
a76baa9) by @fordimalanda - schema: Add JSON Schema validation with path-aware reports (
00af9ce) by @fordimalanda - query: Add NyxQuery, a JSONPath engine with filter expressions (
9cf498e) by @fordimalanda - patch: Add JSON Pointer, JSON Patch and Merge Patch diffing (
e4efb12) by @fordimalanda - msgpack: Add MessagePack binary serialization (
f4ff40d) by @fordimalanda - sax: Add a constant-memory streaming parser with NDJSON support (
e08f5b2) by @fordimalanda - repair: Add heuristic repair of malformed JSON (
e760084) by @fordimalanda - gate: Add the Guardian sanitizer for raw network buffers (
7519b38) by @fordimalanda - reliability: Add shadow execution, triple modular redundancy and checksums (
22bca0f) by @fordimalanda - pool: Add a worker thread pool with backpressure and adjustable concurrency (
5df7eef) by @fordimalanda - kv: Add an embedded key-value store with TTL, counters and snapshots (
672af5a) by @fordimalanda - metrics: Add a Prometheus metrics registry and resource monitoring (
21d104e) by @fordimalanda - ipc: Add Unix domain sockets and a shared-memory ring buffer (
2c800c9) by @fordimalanda - http: Add a router with middleware, async handlers, TLS, OpenAPI, probes and Eco-Throttle (
1cf2db6) by @fordimalanda - client: Add a native HTTP/HTTPS client (
e05e34c) by @fordimalanda - gate: Add the Safe-Gate reverse proxy mode (
43d4468) by @fordimalanda - plugin: Load .so/.dll plugins through a versioned host API (
0afc455) by @fordimalanda - cluster: Add experimental gossip clustering with failure detection (
660038b) by @fordimalanda - server: Rebuild nyxj-server with the full API, plugins, Safe-Gate and config file (
520c443) by @fordimalanda - cli: Add the nyxj command-line toolbox (
d612154) by @fordimalanda - wasm: Compile the core to WebAssembly with a browser demo (
150fb9d) by @fordimalanda
🐛 Bug fixes
- Avoid NULL memcpy on empty request parts and compact WASM formatting at indent 0 (
4797a78) by @fordimalanda
⚡ Performance
- view: Add a zero-copy, non-destructive token view (
2935c18) by @fordimalanda
♻️ Refactoring
- examples: Migrate examples to the router and HTTP client, add mapping and streaming demos (
d60d52d) by @fordimalanda
📚 Documentation
- Rewrite the README and add API and server guides, changelog and roadmap (
9963537) by @fordimalanda - Mention the release pipeline in the 2.0.0 changelog (
7a941a9) by @fordimalanda - Update contributing guidelines to include license agreement details (
6182ec3) by @fordimalanda - Update license from MIT to Fordima Public License (FPL) version 1.0 (
167ac84) by @fordimalanda - Update license from MIT to Fordima Public License (FPL) v1.0 with usage and contribution details (
c5f7658) by @fordimalanda - Add the complete NyxJ guide and trim the README (
9662255) by @fordimalanda
🧪 Tests
- Add unit, integration and end-to-end smoke tests for every module (
585150b) by @fordimalanda
🏗️ Build and CI
- Add a cross-platform Makefile for the library, tools, plugins, wasm and dist (
7c95083) by @fordimalanda - Test on Linux x64/ARM64, macOS and Windows with sanitizers and WebAssembly (
9230286) by @fordimalanda - Keep LF line endings for shell scripts, Makefile and workflows (
397716d) by @fordimalanda - Add a release pipeline with generated notes, checksums, provenance and a dry-run mode (
16a9cc1) by @fordimalanda - Link Windows binaries statically (
0be489b) by @fordimalanda - Label the OpenAPI asset in release notes (
fbbc3a5) by @fordimalanda
Merged pull requests
- feat: NyxJ 2.0.0 - high-performance platform (core rewrite, modules, framework, tooling) by @fordimalanda in #1
- ci: intelligent release pipeline for v* tags by @fordimalanda in #2
- docs: switch the license to the Fordima Public License (FPL) v1.0 by @fordimalanda in #3
- docs: add the complete NyxJ guide and trim the README by @fordimalanda in #4
Contributors
- @fordimalanda — 40 commits
Downloads
| Asset | Platform | Size | SHA-256 |
|---|---|---|---|
SHA256SUMS.txt |
Checksums | 1 KiB | 4f6b1bd5c973656d… |
nyxj-2.0.0-linux-arm64.tar.gz |
Linux ARM64 | 948 KiB | f5f8e961b4abc97d… |
nyxj-2.0.0-linux-x64.tar.gz |
Linux x86-64 | 943 KiB | a241a6fa06b5dab7… |
nyxj-2.0.0-macos-arm64.tar.gz |
macOS Apple Silicon | 916 KiB | 894697e01cd74e81… |
nyxj-2.0.0-openapi.json |
OpenAPI 3 document of nyxj-server | 14 KiB | eb65f400198e071c… |
nyxj-2.0.0-wasm.tar.gz |
WebAssembly (browser, Node.js, edge) | 103 KiB | a59b2ccae3feb1c3… |
nyxj-2.0.0-windows-x64.zip |
Windows x64 | 990 KiB | b0e1cda21acd7930… |
Each platform archive contains bin/nyxj (CLI), bin/nyxj-server, lib/libnyxj.a, the public headers,
the example plugin and the example programs. Verify downloads with sha256sum -c SHA256SUMS.txt.
Install
curl -LO https://github.com/fomadev/nyxj/releases/download/v2.0.0/nyxj-2.0.0-linux-x64.tar.gz
tar -xzf nyxj-2.0.0-linux-x64.tar.gz
./nyxj-2.0.0-linux-x64/bin/nyxj version
./nyxj-2.0.0-linux-x64/bin/nyxj-server --port 8000 # then open http://localhost:8000/docsBuild from source: git clone --branch v2.0.0 https://github.com/fomadev/nyxj.git && cd nyxj && make && make test.
Full changelog: v1.0.0...v2.0.0
· Documentation · Roadmap