Repository navigation
Releases
NyxJ 2.0.0
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 - **pl...
v1.0.0 - Initial Stable Release
Release Overview
This is the first stable release of the NyxJ Engine, a high-performance JSON processing engine and micro-service framework written in pure C. This version establishes the core architecture for efficient JSON parsing, serialization, and HTTP-based data exchange.
Key Features in v1.0.0
- Core Parser: Robust tree-based JSON parsing with comprehensive error reporting.
- Serialization: Full support for converting internal structures back to standard JSON format.
- API Service: Integrated HTTP server functionality powered by the Mongoose library.
- Cross-Platform Compatibility: Verified build pipelines for Windows (x64), Linux (x86_64/ARM64), and macOS (ARM64).
- Developer Tooling: Automated build system via Make and CI/CD integration through GitHub Actions.
Technical Specifications
- Language: C99/C11
- Dependencies: Mongoose Networking Library (included)
- Memory Footprint: Minimal, with proactive allocation management.
Installation and Usage
Binaries for supported platforms are attached to this release. For source-based installation, please refer to the README.md file included in the repository.
Contributors
Maintained by FomaDev. Lead Developer: @fordimalanda .