Experimental UI language workspace focused on the frontend and middleend of the language.
Slynx is an experimental programming language project for user interfaces. The long-term direction is to expose a reusable IR that downstream compilers can consume, but the current repository is primarily a library-first workspace for the language frontend and middleend.
Slynx is still experimental and under active design.
What is true on the current main branch:
- the workspace is library-first; there is no official CLI binary target in
mainright now - the root crate can lex, parse, build HIR, run type checking, resolve the current alias surface, and lower source files into
SlynxIR - the root library can write the default
.siroutput and can expose.hir/.irdumps throughSlynxContext::build_stages() - sample
.syxsources live underexamples/ - the IR design is still evolving, and the design reference in
crates/slynx_ir/README.mdis broader than whatmainemits today
The repository is a Cargo workspace. The root crate (src/) is the library entry point; the individual pipeline stages live under crates/:
crates/common/: shared AST types and common language data structurescrates/lexer/: lexical analysis (slynx-lexer)crates/parser/: parser (slynx-parser)crates/hir/: HIR generation and name resolution (slynx-hir)crates/checker/: type checking and type inference (slynx-typechecker)crates/monomorphizer/: monomorphization (slynx-monomorphizer)crates/slynx_ir/:SlynxIRdefinition and lowering (slynx-ir)src/: root library glue (SlynxContext, compile helpers, error presentation)
The current codebase already includes:
- lexical analysis and parsing for core language constructs such as functions, objects, components, aliases, tuple literals/types, and control flow such as
ifandwhile - HIR generation and name resolution
- type checking, type inference, and monomorphization for the current supported alias surface
- library entry points for compiling to IR or inspecting HIR/IR dumps before writing output
- lowering to the current
SlynxIR - CI, release, governance, and contribution documentation
The current repository does not ship an official backend crate or an official CLI binary on main.
- Rust stable
- Cargo
git clone https://github.com/Slynx-Language/slynx.git
cd slynx
cargo build
cargo test
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warningsThe root crate exposes helper functions for lowering a .syx file into IR:
use std::path::PathBuf;
fn main() -> color_eyre::eyre::Result<()> {
let ir = slynx::compile_to_ir(PathBuf::from("examples/component.syx"))?;
println!("{ir:#?}");
Ok(())
}To write the default .sir output file alongside the source:
use std::path::PathBuf;
fn main() -> color_eyre::eyre::Result<()> {
slynx::compile_code(PathBuf::from("examples/component.syx"))?;
Ok(())
}If you want to inspect intermediate dumps before writing output, the root context also exposes stage building:
use std::{path::PathBuf, sync::Arc};
fn main() -> color_eyre::eyre::Result<()> {
let context = slynx::SlynxContext::new(Arc::new(PathBuf::from("examples/booleans.syx")))?;
let stages = context.build_stages()?;
println!("{}", stages.hir_text());
stages.write_hir()?;
stages.write_ir()?;
let output = stages.into_output();
output.write()?;
Ok(())
}Today:
compile_code(...)writes the default sibling.sirfilecompile_to_ir(...)returns the compiledSlynxIRdirectlybuild_stages()lets callers inspect or persist.hirand.irdumps through the library API- there is still no polished CLI workflow for dump generation on
main
Real samples that match the current repository syntax live under examples/, for example:
examples/component.syx: basic component constructionexamples/objects.syx: object construction and field mutationexamples/while.syx:whileloopsexamples/functionCall.syx: typed function calls
One small component example:
component Header {
Div {
Icon {
src: "https://github.icon.this.url.does_not_exist.com"
}
}
}
component Footer {
Div {
Text {text: "Footer of page"}
}
}
component Main {
Div {
Text {text: "Main Part"}
}
}
component Website {
Div {
Header {}
Main {}
Footer {}
}
}
func main(): Component {
Website {}
}
Core project documents:
- CONTRIBUTING.md: contribution workflow and validation expectations
- GOVERNANCE.md: project roles and decision structure
- CODE_OF_CONDUCT.md: community behavior expectations
- RELEASING.md: how repository tags and GitHub Releases are cut
- CHANGELOG.md: repository-level changelog
- docs/language-surface.md: grounded overview of the current language syntax and constructs
- docs/first-slynx-file.md: short tutorial-style example for new contributors
- crates/slynx_ir/README.md: IR design/specification reference
- docs/issue-reporting.md: guide for opening clear, actionable issues
- docs/landing-content-inventory.md: grounded inventory of what can already be published on the landing page
Operational templates:
- .github/pull_request_template.md
- .github/ISSUE_TEMPLATE/bug_report.md
- .github/ISSUE_TEMPLATE/feature_request.md
- .github/ISSUE_TEMPLATE/documentation.md
- .github/ISSUE_TEMPLATE/discussion.md
The latest release is v0.0.1, published on 2026-05-04.
For the release process itself, see RELEASING.md.
Contributions are welcome, especially in these areas:
- frontend/parser/type-checker work
- IR and middleend design
- tests and regression coverage
- documentation and specifications
Start with CONTRIBUTING.md before opening a PR.
This project is licensed under the MIT License. See LICENSE for details.