To Overview

datex-coreDATEX Core Library implemented in Rust. Includes a compiler, decompiler and DATEX runtime (work in progress)

Licensed under MIT License
Version
cdn.unyt.org/datex-core/

DATEX Core

Twitter badge Discord badge

The DATEX logo

This repository contains the full DATEX Runtime including networking, compiler and decompiler, written in Rust. The DATEX Core crate is used in DATEX Core JS, which provides a JavaScript interface to the DATEX Runtime. The DATEX CLI is also built on top of this crate and provides a command line interface for the DATEX Runtime.

Project Structure

  • src/ - Contains the source code of the crate
    • ast/ - Abstract syntax tree (AST) modules
    • compiler/ - Compiler for the DATEX language
    • crypto/ - Cryptographic trait and a native implementation
    • decompiler/ - Decompiler for the DATEX language
    • dif/ - Abstract data interface for data exchange with external systems
    • global/ - Global constants and structures
    • libs/ - Library modules such as core library and standard library
    • network/ - Network protocol implementation and communication interfaces
    • parser/ - DXB parser and instruction handler
    • references/ - Reference implementation, observers and mutators
    • runtime/ - Runtime for executing DXB
    • serde/ - Serialization and deserialization of DATEX values
    • traits/ - Shared traits for values, types and references
    • types/ - Type system implementation
    • utils/ - Utility functions and traits
    • values/ - Value implementation, core values and value containers
  • benches/ - Benchmarks for the crate for performance testing
  • tests/ - Integration tests for the crate
  • macros/ - Procedural macros for the crate
  • docs/ - Documentation for the crate
    • guide/ - Collection of guides for contributing to the crate

Environment

  • DATEX Specification - The specification of DATEX, including protocols, syntax, and semantics. The specification is work in progress and is not yet complete. It is being developed in parallel with the implementation of the DATEX Core. The repository is currently private, but will be made public in the future and is available to contributors on request.
  • DATEX Core JS - A JavaScript interface to the DATEX Core, built on top of this crate. Includes a WebAssembly build for running DATEX in the browser or server-side with Deno, Node.js, and Bun and trait implementations using standard web APIs such as WebCrypto and WebSocket.
  • DATEX CLI - A command line interface for the DATEX Core, built on top of this crate. Provides a simple way to run DATEX scripts and interact with the DATEX Runtime in a REPL-like environment.
  • DATEX Core ESP32 - A port of the DATEX Core to the ESP32 platform, allowing you to run DATEX on microcontrollers of the Espressif family.
  • DATEX Core CPP - A C++ port of the DATEX Core, allowing you to run DATEX on platforms that support C++. This port is still in development and not functional.
  • DATEX Core JS (legacy) - A legacy version of the DATEX Core JS, implemented in TypeScript. This version will be replaced by the new DATEX Core JS implementation.

Development

Building the Project

The project is built with Rust Nightly (rustc 1.91.0-nightly). To build the project, run:

cargo build

Running Tests

Tests must be run with the debug feature enabled. You can either run the tests with cargo test --features debug or use the alias cargo test-debug.

Clippy

To apply clippy fixes, run the following command:

cargo clippy-debug

Running Benchmarks

The benchmarks in the benches directory can be run with the following command:

cargo bench

Benchmarks are also run automatically in the GitHub CI on every push to the main branch or a pull request branch.

Contributing

We welcome every contribution!
Please take a look at the DATEX Core contribution guidelines and the unyt.org contribution guidlines.


© unyt 2025 • unyt.org

a54a11c7dbc210c1bf0bbdc80f37da4d93587a5e