SPECTRALANG_
SpectraLang logo

A language designed for AI/ML workloads and first-class API services.

Tensors, autodiff and differentiable regions are language-level constructs, not libraries — JIT-powered, from tensor graphs to production APIs.

[ TENSOR-FIRST AI/ML CORE ] [ FIRST-CLASS API SERVICES ] [ JIT EXECUTION ]

[ active development — not yet a stable production language ]

// SECTION 01 — WORKSTREAMS

TWO FIRST-CLASS_TRACKS

One language, two production workstreams that are first-class in the language and the standard library.

[01] AI/ML CORE

std.tensor
  • First-class tensors with shape and dtype constraints (Tensor<T, R>)
  • Reverse-mode autodiff and differentiable regions as language-level constructs
  • SSA-based IR with optimization passes and JIT execution
  • ML framework layer: layers, losses, optimizers, datasets, dataloaders
  • ONNX import/export, NumPy .npy interchange, Python/FFI bridges
  • Experiment tracking, distributed-training foundations, reproducibility tooling

[02] API PLATFORM

spectra.api
  • First-class async/await with a platform-aware reactor (epoll / IOCP / kqueue)
  • spectra.api package: HTTP/1.1 server and client, JSON, routing, middleware
  • Typed HTTP primitives: Request, Response, Method, Status, Header, Cookie
  • Database drivers for PostgreSQL, SQLite, and Redis (in development)
  • TLS, authentication, validation, and structured error handling on the roadmap
  • Observability: OpenTelemetry tracing, Prometheus metrics, health checks

// SECTION 02 — SOURCE

REAL CODE,_TRANSLATED

Bundled examples straight from the repository — comments translated to English, code untouched.

spectralang run examples/syntax_quickstart.spectra
module syntax_quickstart
from std.io import println
func welcome(name: string) returns string {
    return f"Hello, {name}!"
}
public func main() returns int {
    let name    = "SpectraLang"
    let message = welcome(name)
    println(message)
    let total = 0
    for item in [1, 2, 3] {
        total = total + item
    }
    if total > 5 and not total == 0 {
        println("clear syntax")
    } else {
        println("keep exploring")
    }
    return 0
}

* comments and messages translated to English for clarity — the code itself is unchanged from the bundled examples in the https://github.com/Hyska-Software/SpectraLang repository

// SECTION 03 — SETUP

INSTALL_IT

Grab the latest release for your platform — fetched live from GitHub — or build from source.

[ FETCHING LATEST RELEASE FROM GITHUB ... ]

[ BUILD FROM SOURCE ]

  1. STEP 01Clone the repository

    $> git clone https://github.com/Hyska-Software/SpectraLang.git
  2. STEP 02Enter the workspace

    $> cd SpectraLang
  3. STEP 03Build the full workspace (compiler, runtime, CLI, LSP)

    $> cargo build
  4. STEP 04Install the spectralang CLI on your PATH

    $> cargo install --path tools/spectra-cli

[ CLI ESSENTIALS ]

  • spectralang compile <paths>Compile Spectra modules (default).
  • spectralang check <paths>Type-check modules and report diagnostics without executing.
  • spectralang run <paths>Compile modules and execute the entry point via JIT.
  • spectralang lint <paths>Run lint checks and report warnings or denied rules.
  • spectralang bench <paths>Compile with timing metrics and optional JSON report.
  • spectralang fmt <paths>Format Spectra source files.
  • spectralang replStart an interactive Spectra prompt.
  • spectralang new <path>Scaffold a new Spectra project.
  • spectralang package <action>Resolve, lock, build, publish, and consume packages.
  • spectralang release-infoReport CLI and package release channel metadata.