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:
main right nowSlynxIR.sir output and can expose .hir / .ir dumps through SlynxContext::build_stages().slynx sources live under slynx/middleend/README.md is broader than what main emits todayThe repository is currently split into these crates:
common/: shared AST types and common language data structuresfrontend/: lexer, parser, HIR generation, and type checkingmiddleend/: SlynxIR and IR/lowering worksrc/: root library glue (SlynxContext, compile helpers, error presentation)The current codebase already includes:
if and whileSlynxIRThe current repository does not ship an official backend crate or an official CLI binary on main.
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 warnings
The root crate currently exposes helper functions for lowering a .slynx file into IR:
use std::path::PathBuf;
fn main() -> color_eyre::eyre::Result<()> {
let ir = slynx::compile_to_ir(PathBuf::from("slynx/component.slynx"))?;
println!("{ir:#?}");
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("slynx/booleans.slynx")))?;
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(...) and SlynxContext::start_compilation(...) write the default sibling .sir filebuild_stages() lets callers inspect or persist .hir and .ir dumps through the library APImainReal samples that match the current repository syntax live under slynx/, for example:
slynx/component.slynx: basic component constructionslynx/objects.slynx: object construction and field mutationslynx/while.slynx: while loopsslynx/functioncall.slynx: typed function callsOne 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:
Operational templates:
The repository currently has a public tag, v0.0.1, created on 2026-03-21.
At the time of writing, there is still no published GitHub Release page for that tag:
For the release process itself, see RELEASING.md.
Contributions are welcome, especially in these areas:
Start with CONTRIBUTING.md before opening a PR.
This project is licensed under the MIT License. See LICENSE for details.
$ claude mcp add slynx \
-- python -m otcore.mcp_server <graph>