Skip to content
View source

Introduction

Entelechy is a runtime written in Rust: software that becomes, while it runs. Programs are grown, not shipped: AI (or a person) writes the laws (Kernels), composes the structure (Graphs), and changes both while the world keeps running.

Host is the world. Kernel is the law. Graph is the structure. AI is the creator.

Role What it is In the repository
Host The world: memory, devices, time, budgets. Small and stable; it knows no gamepad, no light, no cube. crates/core/host
Kernel A small typed function Y = K(X, P, C) written in .ent, reaching the machine only through the capabilities it declares and is granted. crates/core/kernel, crates/frontend/*
Graph A .esn scene composing Kernels by stable id (image.grayscale@1) and wiring their typed ports. Kernel owns computation; Graph owns relationships. crates/core/graph, crates/frontend/scene
AI Creates through one open protocol: JSON lines over stdin/stdout, a socket, a WebSocket, or a C function. Any model, any language; the same authority rules for all. crates/interface/protocol
  1. A law. Write a Kernel:

    kernels/grayscale.ent
    kernel image.grayscale@1 {
    requires { field.read; field.write; }
    input source: Image;
    param amount: Float = 1.0;
    output result: Image;
    fn luma(c: Vec4) -> Float {
    return dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
    }
    compute {
    let c = sample(source);
    let g = luma(c);
    return mix(c, vec4(g, g, g, c.a), amount);
    }
    }
  2. A structure. Compose Kernels in a scene:

    scene.esn
    use "kernels/";
    node source: image.gradient@1 { domain = vec2(128, 128); }
    node gray: image.grayscale@1 { source <- source.result; amount = 1.0; }
    node blocks: image.pixelate@1 { source <- gray.result; size = 8; }
    output result <- blocks.result;
  3. A change, while it runs. Edit either file: the new version is compiled, validated and prepared beside the running one, then swapped in whole at the next frame. A wrong change is refused at file:line:column, and the world keeps running as it was.

Images, sound, geometry, rigs and game state are one resource, a typed Field. Every Kernel lowers to one backend-neutral IR, run by a reference interpreter, a JIT (native code through Cranelift, or WebAssembly) and the GPU (WGSL through wgpu). The interpreter is the reference; the JIT matches it bit for bit.

The examples cover path tracing, ray marching, a million bodies, Navier–Stokes smoke, rigid bodies, wave function collapse, networks trained by gradient descent, a synthesizer and MIDI, glTF and imported rigs, falling blocks and Snake, a voxel editor, a CHIP-8 interpreter and an ARM Thumb core — all .ent Kernels and .esn scenes, no Rust, each tested by replays.

The path tracer example

  • Authority is granted. A Kernel runs with the capabilities the person running the session grants; files are read and written only where they allow.
  • Every change is validated first. Publication is atomic and checked against the generation the agent last saw.
  • State commits only when truth is valid. A frame’s state and file writes commit only when the whole evaluation succeeds.
  • The world is observable. Any port can be read, any element traced, any node timed; a run is a replay, and a replay is a test.