Solod v0.1: Go ergonomics, practical stdlib, native C interop
10 hours ago
- #Go Syntax
- #Solod
- #C Interop
- Solod v0.1 introduces a system-level language with Go syntax and zero runtime, targeting Go developers wanting low-level control and C developers appreciating Go's style.
- It features a practical standard library with Go packages ported like io, bufio, fmt, slices, maps, time, and custom packages mem for memory allocation and c for C interop.
- Native C interop enables direct SQLite bindings via C API with so:include and so:extern directives for seamless integration without overhead.
- A persistent key-value store example using SQLite demonstrates memory management with an allocator interface, requiring explicit allocation and freeing.
- Command-line interface support is provided through the flag package, functioning similarly to Go, with benchmarked performance showing improvements in I/O, string operations, and maps.
- The language compiles to plain C for native binaries, avoiding GC pauses and Cgo costs, but requires manual memory handling.
- Future plans include v0.2 focusing on networking, concurrency, and more stdlib packages, with current readiness for hobby projects.