https://github.com/ivov/lisette
A little language inspired by Rust that compiles to Go
https://github.com/ivov/lisette
compiler go programming-language rust
Last synced: 1 day ago
JSON representation
A little language inspired by Rust that compiles to Go
- Host: GitHub
- URL: https://github.com/ivov/lisette
- Owner: ivov
- License: mit
- Created: 2026-03-21T14:02:38.000Z (13 days ago)
- Default Branch: main
- Last Pushed: 2026-03-21T20:05:17.000Z (12 days ago)
- Last Synced: 2026-03-22T06:46:20.310Z (12 days ago)
- Topics: compiler, go, programming-language, rust
- Language: Rust
- Homepage: https://lisette.run
- Size: 2.14 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lisette
[](https://crates.io/crates/lisette)
[](https://go.dev)
[](LICENSE)
Little language inspired by Rust that compiles to Go.
Safe and expressive:
- Hindley-Milner type system
- Algebraic data types, pattern matching
- Expression-oriented, immutable by default
- Rust-like syntax plus `|>` operator and `try` blocks
- Go-style interfaces, channels, goroutines
Quietly practical:
- Interop with Go standard library
- Linter, formatter, 250+ diagnostics
- Fast incremental compiler, readable Go
- LSP support for VSCode, Neovim, and Zed
## Quick tour
Enums and pattern matching:
```rust
enum Shape {
Circle(float64),
Rectangle { width: float64, height: float64 },
}
fn area(shape: Shape) -> float64 {
match shape {
Shape.Circle(r) => 3.14 * r * r,
Shape.Rectangle { width, height } => width * height,
}
}
```
Go interop and `?` for error handling:
```rust
import "go:os"
import "go:io"
import "go:fmt"
fn load_config(path: string) -> Result {
let file = os.Open(path)?
defer file.Close()
let data = io.ReadAll(file)?
parse_yaml(data)
}
fn main() {
match load_config("app.yaml") {
Ok(config) => start(config),
Err(e) => fmt.Println("error:", e),
}
}
```
`Option` instead of `nil` and zero values:
```rust
match flag.Lookup("verbose") {
Some(f) => fmt.Println(f.Value),
None => fmt.Println("no such flag"),
}
let scores = Map.new()
match scores.get("alice") {
Some(score) => fmt.Println(score),
None => fmt.Println("score not found"),
}
```
Pipeline operator:
```rust
let slug = " Hello World "
|> strings.TrimSpace
|> strings.ToLower
|> strings.ReplaceAll(" ", "-") // "hello-world"
```
Typed channels and concurrent tasks:
```rust
let (tx, rx) = Channel.new().split()
task {
tx.send("hello")
tx.close()
}
match rx.receive() {
Some(msg) => fmt.Println(msg),
None => fmt.Println("closed"),
}
```
## Learn more
- ๐ก [`quickstart.md`](docs/intro/quickstart.md) โ Set up a Lisette project
- ๐งฟ [`safety.md`](docs/intro/safety.md) โ Go issues Lisette prevents
- ๐ [`reference.md`](docs/reference/README.md) โ Full language reference
- ๐ [`roadmap.md`](docs/intro/roadmap.md) โ Status and planned work
## Author
ยฉ 2026 Ivรกn Ovejero