Product Vision and Non-Goals
Relevant source files
The following files were used as context for generating this wiki page:
Sploosh is an AI-native programming language designed specifically for Large Language Models (LLMs) to generate accurate, compilable code on the first attempt. It achieves this by inverting traditional language design: instead of optimizing for human ergonomics at the expense of model ambiguity, Sploosh utilizes the most-trained vocabulary across major languages and enforces a "one canonical way" rule for every operation.
The project operates under a "spec-first" architecture, where the LANGUAGE_SPEC.md serves as the authoritative definition of the language. This vision encompasses a dual-target execution model, blending Rust-grade memory safety with Elixir-style actor concurrency, targeting both traditional environments (Native, WASM) and blockchain platforms (EVM, Solana SBF).
Sources: VISION.md:3-10, README.md:3-8, CONTRIBUTING.md:4-7
Core Product Vision
The primary thesis of Sploosh is that LLMs converge on correct code more effectively when the language syntax utilizes highly familiar tokens and removes syntactic synonyms. The vision centers on minimizing the context required for a model to produce working software.
Design Principles
The following principles guide the development and evolution of the language:
- One Way to Do Everything: Eliminates syntactic synonyms and style debates to remove ambiguity for both models and humans.
- Familiar Vocabulary: Keywords and operators (e.g.,
fn,let,match,spawn) are drawn from the top dozen most-trained languages. - Prompt-Loadable Spec: The language core is restricted to a specific token budget (≤ 5,600 tokens for core) to ensure it can be included in LLM system prompts alongside task context.
- Dual-Target Compilation: Single-source code that targets Native (LLVM), WASM, EVM, and Solana SBF.
Sources: VISION.md:46-60, README.md:14-25, scripts/check_prompt_budget.py:12-16
Execution Model Comparison
Sploosh bridges high-performance systems programming with modern concurrent paradigms.
This diagram illustrates how Sploosh integrates concepts from Rust and Elixir to target diverse execution environments while maintaining strict constraints.
Sources: VISION.md:3-10, README.md:48-50
Key Features and Functionality
Sploosh is built to handle complex systems-grade applications and on-chain protocols while maintaining a small enough footprint for LLM efficiency.
| Feature | Description |
|---|---|
| Actor System | Isolated units of execution with private state and message mailboxes. No shared mutable state. |
| Onchain Modules | onchain mod definitions that are subject to blockchain-specific restrictions (e.g., no floats, no IO). |
| Solidity Compatibility | Storage layouts designed to be compatible with Solidity for easy migration of ERC-20/721 contracts. |
| Errors as Values | Fallible operations return Result<T, E>. There are no exceptions or panics in safe code. |
| Reentrancy Guard | On-chain functions are guarded by default; @reentrant is an explicit opt-in. |
Sources: VISION.md:73-95, README.md:58-65, SECURITY.md:83-85
On-Chain vs. Off-Chain Logic
Sploosh differentiates between standard logic and blockchain-specific logic through module attributes, ensuring that safety-critical on-chain code is deterministic.
The flowchart details the compilation and restriction paths for different module types in Sploosh.
Sources: VISION.md:104-108, SECURITY.md:83-88
Non-Goals (Technical Boundaries)
To maintain its focus on AI-native efficiency and strict safety, Sploosh explicitly excludes several common language features.
- Not for Kernel Hacking: Sploosh does not allow
unsafecode, raw pointers, or inline assembly. FFI is permitted only through safeextern "C"wrappers. - Not a Metaprogramming Language: There are no macros or reader macros. Attributes are the sole surface for metaprogramming.
- Not a Dynamic Language: The language excludes reflection,
eval, and runtime type information (RTTI) beyonddyn Traitrequirements. - Not Feature-Rich: Features are added conservatively. The design philosophy dictates that adding a new feature often requires removing an existing one to stay within the prompt budget.
- Not Human-First: LLM accuracy takes priority over human ergonomics. For example, block comments were removed to ensure there is only one way to write comments (
//).
Sources: VISION.md:113-132, AGENTS.md:95-96
Success Metrics
The project measures success through the lens of LLM performance and deployment versatility:
- First-Shot Accuracy: Frontier models producing compilable code at higher rates than incumbent languages.
- Cross-Target Matrix: A single source tree building cleanly for Native, WASM, EVM, and SVM.
- Spec Stability: Maintaining the core language within the CI-enforced token budget (5,600
cl100k_basetokens).
Sources: VISION.md:135-145, scripts/check_prompt_budget.py:12-16
Summary
Sploosh aims to redefine language design for the era of AI-assisted development. By prioritizing a "spec-first" approach and strictly limiting syntactic variance, it ensures that AI agents can function as first-class authors. The architecture balances the requirements of modern systems programming—safety and concurrency—with the unique constraints of blockchain environments, all while remaining small enough to reside permanently within an LLM's active context.
Sources: VISION.md:3-10, README.md:3-12, AGENTS.md:73-75