FastC¶
A safe, C-like language that compiles to C11
FastC is a transpiled language designed for systems programming with a focus on safety, C interoperability, and familiar syntax. Write code that looks like C but with modern safety features, then compile it to portable C11.
Key Features¶
- Familiar Syntax - If you know C, you already know most of FastC
- Memory Safety - Bounds checking, null safety, and overflow detection
- Zero Runtime - Compiles to standard C11 with no runtime dependencies
- C Interop - Seamless FFI with existing C libraries
- Modern Types - Optionals, results, slices, and more
Quick Example¶
Compile and run:
Why FastC?¶
| Feature | C | FastC |
|---|---|---|
| Null pointer dereference | Undefined behavior | Compile-time prevention |
| Array bounds | Unchecked | Runtime checked (safe mode) |
| Integer overflow | Undefined (signed) | Runtime checked (safe mode) |
| Optional values | Manual NULL checks | opt(T) with if-let |
| Error handling | Return codes | res(T,E) result types |
Getting Started¶
- Install FastC from source
- Follow the Quick Start Guide
- Explore the Language Guide
Project Status¶
FastC is under active development. Current features:
- Complete type system with primitives, structs, enums
- Optional and result types for safe error handling
- Module system for multi-file projects
- Full C FFI support
- CLI tools: compile, check, format, build, run
Links¶
License¶
FastC is open source software licensed under the MIT License.