Modular Architecture
KnotenCore separates intelligence from execution. Your Agent defines the logic via AST; our engine handles the heavy lifting.
| Module | Role & Core Function |
|---|---|
| executor.rs | Coordinator — Orchestrates data flow between all engine components. |
| evaluator.rs | Interpreter (JIT) — Recursive evaluation of logic and high-level UI nodes. |
| vm/mod.rs | Virtual Machine (AOT) — Ahead-of-Time Bytecode compiler for math-intensive loops. |
| renderer.rs | Eyes — WGPU Pipeline, Blinn-Phong shading, and Native 3D Primitives. |
| window.rs | Skin — Winit event-loop, native application lifecycle, and hardware input. |
| async_bridge.rs | Nervous System — Non-blocking background workers for networking and data. |
Engineered for AI-Readiness
KnotenCore provides a machine-validated environment. Every node and function is formally specified to eliminate LLM hallucinations.
// docs/LANGUAGE_REFERENCE/nod_grammar.ebnf
expr = math_op | logical_op | fn_call;
node = "{" variant ":" args "}";
block = "[" { node } "]";
// docs/LANGUAGE_REFERENCE/node_types.json
"MathDiv": {
"type": "object",
"properties": {
"lhs": { "$ref": "#/definitions/node" },
"rhs": { "$ref": "#/definitions/node" }
},
"additionalProperties": false
}
// CLI --output-format json
{
"status": "fault",
"msg": "Fault: Div by zero (at Node::MathDiv)",
"node": "Node::MathDiv",
"hint": "Ensure rhs is not zero"
}
Zero Boilerplate
No NPM, no config hell. AI generates the AST; the engine handles execution.
Machine-Readable
Standardized Schema and Grammar enable zero-context-loss generation.
AOT Bytecode VM
Recursive interpreter for UI, flat Opcode VM for intensive computation.
Sprint Milestones
KnotenCore v1.0.48:
The Marketplace Launch 🚀
KnotenCore crosses the threshold from experimental to globally available. The VS Code Extension is live on the official Marketplace, the native LSP server delivers real-time diagnostics and auto-completion, and the engine now routes computation directly to the GPU via WGPU Compute Shaders.
🛒 VS Code Marketplace Launch (Sprint 150–151)
Install directly in VS Code:
ext install holger-bl.knotencore- •Syntax highlighting & snippets for
.knotenand.nodfiles — live on the official Marketplace. - •Native
knoten_lspserver: real-time diagnostics (ERR_UNKNOWN_NODE), hover docs, auto-completion, rename refactoring, goto-definition. - •Deep schema validation ("The Iron Shield") blocks malformed AST generation before execution.
⚡ GPGPU Compute Shader Acceleration (Sprint 146–152)
- •
LoadComputeShader(wgsl_source)compiles WGSL shaders natively on the GPU viawgpu::Device. - •
DispatchCompute(id, x, y, z)fires GPU workgroups — for AI inference, simulations, data-parallel tasks. - •Verified through all 10 engine layers: AST → Opcode → Compiler → VM → Registry → Window.
🔒 Compliance & Integrity
- •
cargo clippy --workspace --all-targets -D warnings— 0 warnings. Enforced by GitHub Actions CI. - •3-Gate CI:
cargo fmt→cargo clippy→cargo test. Every push to main is automatically verified. - •Audit autonomously conducted by AI Agent Antigravity — live proof of KnotenCore AI-Readiness.
AOT Compiler & Constant Pool
v1.0.28-alpha emits flat RPN-Bytecode. Reoccurring values (Strings, Floats) automatically stream into the deduplicated constant pool. This yields near O(1) allocation during AST evaluation and stops heap-explosion cold.
// Memory Deduplication
let idx = compiler.add_constant(RelType::Int(10));
compiler.instructions.push(OpCode::Constant(idx));
// Resilient Async Networking
let agent = ureq::AgentBuilder::new()
.timeout(Duration::from_secs(10))
.build();
Resilient AsyncBridge
Built for the modern web. The AsyncBridge offloads blocking I/O (like Fetch nodes) to dedicated background workers with strict timeouts. Your Agent stays responsive while global data is being retrieved.
Hardened Sandbox
Security is not an afterthought. v1.0.28-alpha implements Strict Permissions by default. Agents cannot access the network or file system unless explicitly authorized via CLI flags. Absolute isolation for autonomous code.
// Secure by Default
engine.permissions.allow_fs_read = false;
engine.permissions.allow_fs_write = false;
// Error-Hardened ALU
OpCode::Add => {
let r = stack.pop().ok_or("Stack underflow")?;
let l = stack.pop().ok_or("Stack underflow")?;
stack.push(l + r);
}
Stack-based Bytecode VM
The execution engine is now a true stack-machine (Instruction-Pointer based). Thanks to compiler backpatching, it natively supports conditional branching, loops, and blazingly fast RPN operations.