Cobrust is an open source programming language created in 2026 by Cobrust contributors.
| #1525on PLDB | 0Years Old |
git clone https://github.com/cobrust-lang/cobrustCobrust is a statically typed Python successor implemented in Rust with an AI-native compiler that closed-loop translates the Python ecosystem. It keeps Python ergonomics (indentation blocks, comprehensions, pattern matching, f-strings) while adopting Rust's ownership model and Result/Option error handling. No GIL, no implicit truthiness, no mutable default arguments. Targets Cranelift and LLVM backends. File extension: .cb
fn greet(name: str) -> str:
f"Hello, {name}!"print("Hello World")| Feature | Supported | Example | Token |
|---|---|---|---|
| Line Comments | ✓ | # This is a comment | # |
| Floats | ✓ | ||
| Integers | ✓ | ||
| Booleans | ✓ | true false | |
| Booleans | ✓ | true false | |
| Strings | ✓ | "Hello, world!" | " |
| First-Class Functions | ✓ | ||
| Enums | ✓ | ||
| Generics | ✓ | ||
| Pattern Matching | ✓ | ||
| Print() Debugging | ✓ | ||
| Static Typing | ✓ | ||
| Semantic Indentation | ✓ | ||
| Comments | ✓ |
license Apache-2.0 OR MIT
hasLambda true