Description
Vu is an experimental programming language engineered for the demands of AI development, prioritizing both speed and safety. It achieves performance on par with Rust while offering a more readable and concise syntax, requiring significantly fewer tokens to write—21-42% less than Go or Rust, according to GPT-4o tokenizer counts. This reduction in token count is intended to minimize opportunities for AI models to introduce errors and to lower the computational cost of code generation.
Read More
The language design eliminates common complexities found in other systems languages, such as braces, semicolons, lifetime annotations, and header files. Type inference is handled within functions, with explicit type declarations reserved for function signatures where human readability is crucial. This minimalist approach aims to make the language easier for both humans and AI models to write and comprehend, reducing the cognitive load and potential for mistakes.
Security is a cornerstone of Vu's design. It inherently prevents memory bugs and data races at compile time, eliminating the need for 'unsafe' blocks. Every value has a single owner, borrows cannot escape or outlive their scope, and data remains immutable while borrowed. Index operations are bounds-checked, and integer overflows halt program execution rather than silently wrapping. For concurrent operations, parallel loops ensure each iteration owns its element, with other data being read-only. Tasks share data exclusively through channels and read-only Shared values.
Vu also implements a robust capability-based security model. Access to files, processes, the network, and C interoperability are treated as capabilities. Only the `main` function can acquire these, and they cannot be forged. A dependency that isn't explicitly granted network access, for instance, cannot open a socket. This strict enforcement aims to prevent unauthorized resource access and enhance overall system integrity. The language is rigorously tested with 637 programs specifically designed to break its rules, running under AddressSanitizer, UBSan, LeakSanitizer, and ThreadSanitizer on every change.
Developer experience is enhanced through highly informative error messages. Designed for an agent-driven code-fixing loop (write, compile, read error, retry), Vu's compiler errors are concise, plain English, and often suggest the exact fix, avoiding lengthy backtraces. The compiler itself is lightweight (around 480 KB) and can run in a browser, providing real-time feedback as code is typed. Vu compiles to C, leveraging `gcc` for optimization, and maintains all safety checks, including bounds and overflow checks, even in benchmarks. It achieves competitive performance, sometimes outperforming C with `malloc` due to its efficient memory recycling without runtime checks.
- CategoryAI Coding Assistants
- Pricing ModelOpen source
- DeploymentSelf-hosted, Browser extension
- PlatformsLinux
Vu Programming Language's Core Features
Memory-safe programming language
Fast execution speed, comparable to Rust
Concise syntax with fewer tokens (21-42% less than Go/Rust)
No braces, semicolons, or lifetime annotations
Type inference within functions, explicit types in signatures
Compile-time prevention of memory bugs
Compile-time prevention of data races in concurrent code
Capability-based security for files, network, and processes
Bounds-checked indexing
Integer overflow stops program execution
Rigorous internal testing with adversarial programs
Clear, plain English error messages with suggested fixes
In-browser compiler for real-time feedback
Compiles to C for GCC optimization
Maintains all safety checks during execution
How to use Vu Programming Language?
Install Prerequisites: Ensure you have Linux and GCC installed on your system.
Build Compiler: Run the initial build process to compile the Vu compiler from its self-written C code.
Write Vu Code: Begin writing your programs using Vu's concise syntax, leveraging its memory safety features.
Compile and Check: Use `vu check` to compile your code and receive immediate, helpful error messages.
Fix Errors: Follow the compiler's suggested fixes to quickly resolve issues and ensure correct program behavior.
Run Programs: Execute your compiled Vu programs, benefiting from Rust-like speeds and built-in safety.
Vu Programming Language's Use Cases
- AI Model Code Generation
- High-Performance Systems
- Secure Application Development
- Resource-Constrained Environments
- Educational Programming





