Chemical is an innovative, performant, type-safe, and user-friendly programming language with a low memory footprint. It comes with first-class tooling out of the box, all customizable by developers.
Important
Chemical is in pre-alpha state, expect breaking changes and do not use in production.
- Download & Extract the latest ZIP from the Releases page.
- Inside the folder, run
./chemical configure
or./chemical.exe configure
- Verify by running
chemical -v
- Easy to Learn: Master in under a week.
- Great IDE Support: LSP with syntax highlighting, completions, diagnostics, and more.
- Compile-Time Evaluation: Powerful
comptime
features. - Low Memory Footprint: Tiny executables, no garbage collector.
- Multiple Backends: LLVM & C (both fully functional).
- C Interop: Translate between C & Chemical.
- Flexible Build System: Custom DSL for builds and modules.
Component | Status |
---|---|
Lexer, Parser, Sym Res | β |
Native Codegen (LLVM) | β |
C Translation & TCC JIT | β |
Basic Build System | β |
Basic Multi-threading | β |
Basic LSP | β |
Standard Library & Docs | π In Progress |
Embedded Languages | π In Progress |
Advanced LSP Support | π Planned |
Memory Management & Safety | π Partial |
Advanced Build System Support | π Planned |
Comptime Features | π Planned |
Compiler Plugins | π Planned |
Mobile & Web Support | π Planned |
These features should give you an idea about features we have worked on
- C-like syntax with structs & namespaces
- Arrays, enums, unions
- Native lambdas (with capture)
- Macros & annotations
- Implicit & explicit casting
- Extension functions (like Kotlin)
- Raw pointers & memory control
- Full constructors & destructors
- Explicit copying (
.copy()
required) - Comptime support & generics
- Overloading, variants, type aliases
- Trait & impl (Rust-like)
- Name mangling & conflict detection
- 8β16β―GB RAM
- C++ toolchain (for LSP)
- LLVM (for compiler)
- CLion or other IDE
- Clone this repo
- Inside the repo, run
./scripts/configure.sh
(on windows, git bash must be installed) - Open the repo in IDE (in CLion, you'll get automatic build configurations) or build using cmake
LSP also depends on Tiny CC Based Compiler Project and is built similarly
- Clone
chemical-bootstrap
repo in this organization (contains LLVM/CLANG) - Run build scripts (
./build.bat
/./build
) (this builds LLVM) - Inside it, clone this repo
- Open this repo directory in terminal
- Run the configure script using
./scripts/configure.sh
(on windows, bash must be installed, usually comes with git) - Open the repo in CLion
- For LSP: clone
chemical-vscode
. - There's a run configuration for compiling and launching extension
- Build and Launch the LSP server before launching the extension, The extension detects running lsp executable at port automatically
Open an issue for any build errors.
Chemical exists to let you embed complex, domain-specific syntax into the language via compiler plugins. Extensions are first-class: add new syntax and behaviors without touching the core. Tooling (syntax highlighting, editor parsing) must continue to work for extended syntax. Scalability and extensibility are part of Chemicalβs DNA.
Real projects frequently need features a language didnβt originally include. Chemical aims to provide the capabilities you actually need while avoiding βsyntax pollution.β Powerful, composable abstractions for library authors and power users come with sensible defaults and a gentle learning curve for beginners. The goal: lots of capability, minimal surprise.
Long-term, Chemical will promote memory safety while keeping the language simple to use. Safety is a priority but not yet fully enforced β the initial focus is on core functionality and tooling. Once the core is stable, compiler-enforced safety checks will be added progressively; the beta compiler will enforce baseline safety guarantees.
We welcome all contributions! See CONTRIBUTING.md for guidelines.
Chemical compiler is MIT-licensed and will remain open source. Use it freelyβcredit is appreciated but not required.