No description
  • Rust 63.5%
  • C 24%
  • JavaScript 8.4%
  • Python 4%
  • HTML 0.1%
Find a file
Noah Arndt Serafim faefac9f89
All checks were successful
Build and release / build (push) Successful in 32m49s
Expand type system and remove function overloading
2026-10-23 14:00:54 +02:00
.forgejo Use llvm 16 for ci builds 2026-10-18 11:39:25 +02:00
crates Expand type system and remove function overloading 2026-10-23 14:00:54 +02:00
docs Expand type system and remove function overloading 2026-10-23 14:00:54 +02:00
editors/vscode Extract sdk and add unified documentation and examples 2026-10-16 09:51:47 +02:00
examples Expose diagnostics, error propagation and bindings across sdks 2026-10-22 18:17:35 +02:00
sdk Expand type system and remove function overloading 2026-10-23 14:00:54 +02:00
tools/abi Expand type system and remove function overloading 2026-10-23 14:00:54 +02:00
.gitignore Extract sdk and add unified documentation and examples 2026-10-16 09:51:47 +02:00
.prettierignore Extract sdk and add unified documentation and examples 2026-10-16 09:51:47 +02:00
.prettierrc.json Add wasm embedding and package loading 2026-10-09 16:31:45 +02:00
Cargo.lock Expose diagnostics, error propagation and bindings across sdks 2026-10-22 18:17:35 +02:00
Cargo.toml Add wasm embedding and package loading 2026-10-09 16:31:45 +02:00
LICENSE Add license 2026-10-05 10:59:44 +02:00
README.md Add CI release builds and documentation links 2026-10-18 11:27:00 +02:00

DETLEF

License: MIT

DETLEF Evaluates Typed Language Expressions Functionally

DETLEF is a small, typed, embeddable scripting language with a deliberately minimal core.

Documentation · Releases

Its syntax consists primarily of literals, identifiers, calls, and blocks. Language constructs such as variable declarations, conditionals, loops, and arithmetic can be implemented outside the core language through host-provided Functions and Controls.

declare(x, integer, 0)

while(
    less(x, 10),
    {
        print("DETLEF")
        set(x, add(x, 1))
    }
)

Functions and Controls

DETLEF distinguishes between two kinds of callable constructs:

  • A Function receives values after its arguments have been evaluated from left to right.
  • A Control receives its argument expressions unevaluated and decides if, when, and how often they are evaluated.

Both use the same call syntax.

This allows constructs such as if, while, declare, and set to be implemented without dedicated syntax in the parser.

Project Structure

DETLEF is implemented in Rust as a Cargo workspace:

  • detlef-syntax — lexer, parser, source spans, and AST
  • detlef-runtime — evaluation, types, values, environments, functions, controls, objects, and packages
  • detlef-stdlib — standard library
  • detlef-cli — command-line interpreter

Running DETLEF

The releases page provides CLI and C SDK downloads for Windows and Linux x86-64, a JavaScript/Wasm SDK, and the C package-authoring SDK. SDK files and runtime binaries must come from the same release.

Extract the CLI archive and run bin/detlef script.dtf (bin/detlef.exe on Windows), or add its bin directory to your PATH.

To run from source:

cargo run -p detlef-cli -- script.dtf

Or build the CLI first:

cargo build --release -p detlef-cli
./target/release/detlef script.dtf

On Windows:

.\target\release\detlef.exe script.dtf

Add the directory containing the executable to your PATH to run it from anywhere:

detlef script.dtf

Relative script paths are resolved from your current working directory.

Documentation

Read the online documentation for the language and standard library, C SDK, and JavaScript SDK.

The language documentation is built with mdBook; the C SDK reference uses Doxygen. See the documentation build instructions.

To serve it locally:

python docs/serve.py

The language manual currently covers:

  • syntax
  • values and types
  • evaluation
  • lexical scoping

The standard library reference covers the current operations, their evaluation rules, errors, and examples.

Runnable embedding and package examples are in examples/.

Status

Public C headers, JavaScript wrappers, and package tools are in the SDK.

Experimental embedding interfaces live in crates/detlef-ffi for native C hosts and crates/detlef-wasm for JavaScript in Node and browsers. Their READMEs include build instructions and examples.

DETLEF is under active development. The language and its APIs are not yet stable.

VS Code Extension

Syntax highlighting and editing support for .dtf files lives in editors/vscode. Open that folder in VS Code and press F5 to try it in an Extension Development Host, or follow its README to build and install a local VSIX.

License

Licensed under the MIT License. This covers the project code, documentation, and logo. Bundled third-party assets retain their respective licenses and notices.