Python syntax, Rust rules
The Oxid language
Oxid is its own language with Python's grammar and Rust's rules: concrete types, checked arithmetic and ownership. Oxid is the application language; Rust is the library language. This is not a Python compatibility layer.
Run it, then ship it
def total(values: list[int]) -> int:
return sum(values)
print(total([2, 4, 9]))oxid run total.py
oxid build total.py -o total
./totalSource run and the resulting executable both print 15. oxid run executes application code through the JIT. oxid build compiles through Rust into a native executable without an interpreter. Rust libraries may need Cargo to build and cache their dependencies, including for source run.
Familiar constructs, explicit rules
Use functions, loops, comprehensions, typed classes, exceptions and collections. Types can be inferred or annotated. Application int is a checked 64-bit signed integer; float is 64-bit. A collection holds one element type. Ownership is checked: assigning a collection does not give two independent names permission to mutate it. Make an explicit copy when you need an independent collection.
Python's grammar, no new syntax
Every Oxid program parses as Python, and files stay .py, so your editor, formatter and code views work unchanged. Oxid adds no keyword, operator or statement: a new meaning comes only from annotations, such as Final, Protocol or type X = A | B, and from library names, such as oxid.rs.Arc. What a program means, its standard library, its numbers and its ownership follow Oxid's rules, not CPython's behaviour.
A refusal on the source line
values = [1, "two"]
print(values)mixed.py:1: error: a list holds one type in oxid: this mixes int and str (Python keeps each as it is)Use a list of integers or a list of strings instead. The language server uses the compiler's rules too. Unsupported code is refused, not passed to CPython or an interpreter as a fallback.
Choose the output, not another language
Use oxid web build for browser assets, oxid site for a static site, and oxid native bundle for a desktop application. Native programs build for the host; cross-compilation requires the target's Rust toolchain and platform tools. A browser page targets WebAssembly: host-only APIs are not made available just because the syntax is the same. A cross-build is not evidence that an application has run on a physical device.
Not CPython: arbitrary PyPI packages and C extensions are not supported. Use the supported Rust libraries and export boundary.