Modern native language

Silex release v0.47.1

Modern CodeNative Power

Focus on your game, not its setup. Silex brings together a modern compiled language, an integrated toolchain, and a coherent graphics foundation so you can get from code to screen faster.

Main.sx
struct Greeter {
    let name:str
    func message() str {
        return "Hello from $(self.name)!"
    }
}

func main() {
    print(Greeter(name:"Silex").message())
}
$ silex run Main.sx → Hello from Silex!
  • Simplicity

    An expressive, powerful, and flexible language for writing code that is pleasant to read and maintain.

  • Efficiency

    Cross-platform compilation for Windows, macOS, and Linux. ARM64 and x64.

  • Safety

    Typing and ownership make data flow predictable.

macOS

Apple Silicon
curl -fsSL https://raw.githubusercontent.com/Matanek/Silex/main/install.sh | sh

Linux

x64
curl -fsSL https://raw.githubusercontent.com/Matanek/Silex/main/install.sh | sh

Windows

x64 · PowerShell
irm https://raw.githubusercontent.com/Matanek/Silex/main/install.ps1 | iex

Next steps

From install to first program

Verify the compiler, prepare the optional toolchain, then run your source.

Terminal
  1. 01
    Verify the installation$ silex --version
  2. 02
    Prepare optional tools$ silex setup
  3. 03
    Run the program$ silex run Main.sx

Zed is a modern code editor. Manual installation of the Silex extension is available: prepare Rust, clone its repository, then load it into Zed.

Available now
  1. 01
    Prepare Silex and Rust
    $ silex --version $ rustup target add wasm32-wasip2

    Rust is not installed? Install it with rustup.

  2. 02
    Clone the extension
    $ git clone https://github.com/Matanek/Silex-Extension-Zed.git
  3. 03
    Load the extension in Zed
    › zed: install dev extension

    Select the Silex-Extension-Zed directory, then open an .sx file.

29 packages available

The catalog lists packages published on Cloudflare. Links to development repositories are optional.

AI

Modular foundation for learning, behavior, and autonomous-agent packages.

GFX

Modular graphics and application library for windows, input, rendering, and GPU workloads.

GFX.Animation

Manual value tweens and reusable ECS timelines for 2D and 3D animation.

GFX.Application

Composable Bundle contexts driven by one Application loop.

GFX.Assets

Portable image, model, and sprite-sheet data with runtime asset stores.

GFX.Audio

Sound loading and playback with fades, routing, spatial position, and GFX integration.

GFX.Canvas

Portable vector drawing, text, rasterization, snapshots, and mutable pixel surfaces.

GFX.ECS

Stable entities, typed components, queries, spawn recipes, and deferred commands.

GFX.Font

Portable font faces, shaping foundations, vector outlines, and hinted coverage for GFX.

GFX.GPU

Direct GPU resources, pipelines, commands, compute, rendering, and presentation.

GFX.Physics

Optional native Silex 2D physics simulation for GFX.

GFX.Rendering

Generic rendering host with frame planning, multisampling, statistics, and presentation.

GFX.Scene2D

Retained 2D scenes with transforms, sprites, tile maps, cameras, Canvas content, and GPU rendering.

GFX.Scene3D

Retained 3D scenes with geometry, materials, lighting, cameras, and GPU rendering.

GFX.Stats

Live FPS and rendering-performance panels for GFX applications.

GFX.UI

Declarative UI composition, controls, constraint layout, and retained Canvas rendering.

GFX.UI.Terminal

Composable ANSI/VT terminal and application-console controls for GFX.UI.

GFX.Viewer

Display images, Canvas drawings, Plot figures, and other visual values in a native window.

GFX.WebView

Embed system HTML, CSS, and JavaScript WebViews in GFX windows.

HTML

Build, parse, select, transform, and serialize HTML documents.

HTTP

Bounded HTTP/1.1 types, reusable clients, and application servers.

Image

Load, save, and transform raster images with native Silex cascades.

JSON

Parse, inspect, construct, and serialize JSON values without losing numeric precision.

Plot

Create charts from Silex data and present them natively or export standalone SVG.

STD

The standard library for portable Silex applications.

Sync

Persistent communication and shared-state synchronization for games and interactive applications.

Tensor

Immutable multidimensional tensors, eager autodifferentiation, and CPU/GPU numerical operations for Silex.

XML

Build, parse, traverse, and serialize strict XML documents.

YAML

Read, create, modify, and write human-authored YAML documents.

Built with Silex

Examples

These captures show examples distributed with Silex and available in the Silex-Examples repository.