Skip to content

Python syntax, Rust libraries

Oxid

Write an application in Python syntax with Rust's rules and Rust libraries. Build a web page, an HTTP server, a desktop window or one native executable. Oxid checks types and ownership before execution; oxid run executes application code through the JIT, and oxid build makes a native executable through Rust.

print("Hello, Oxid")
uvx oxid run hello.py

Save the example as hello.py, then run it.

What Oxid is not

Not CPython: import numpy and other CPython/PyPI packages do not run. Use the supported Rust-backed APIs, or call an external service over HTTP. Not a replacement for Rust: library authors still use Rust for low-level control. Not open source: Oxid is free to use and proprietary.

A counter, whole

from oxid import Signal, component, html, mount

@component
def counter():
    count = Signal(0)

    def inc(ev):
        count.update(lambda n: n + 1)

    return html(t"""
        <button on:click={inc}>clicked {count} times</button>
    """)

mount(counter, "#app")

Try it in the playground. Paste the counter above and press Run.

Current release: 0.28.1. Python 3.14 is required for the tooling. Browser builds are static files and need no Python installation on the visitor's machine. Run and build use the same application language, not separate strict and loose modes.

Free to use · the wheels of every release stay at /dist/, because the chapters and their apps pin one by URL.