Learn Rux with AI
A coding assistant makes a patient study partner. It can explain a lesson line by line, answer "why?" as often as you ask, quiz you, invent exercises, and review the program you wrote. This page shows how to use one with the course — and how to avoid its one big weakness with a language as new as Rux.
The one rule: the compiler has the last word
Assistants learned to program from millions of examples in older languages, and very few in Rux. Left to guess, they fill gaps with Rust, C or Swift — a _ default arm where Rux wants else, a fn where Rux writes func, a library function that does not exist. Three habits keep you safe:
- Give the assistant Rux context — the lesson, the Examples repository, the documentation. The setup below does this.
- Ask it to run
rux checkon anything it writes, and to fix what the compiler reports. - Trust the compiler and the docs over the assistant. When they disagree, the assistant is wrong — and working out why teaches you more than the right answer would.
flowchart LR
you(["You"]) -- "question or exercise" --> ai["Assistant"]
docs["Lesson, Examples repo,<br/>rux-lang.dev docs"] -. context .-> ai
ai -- "explanation and code" --> check{"rux check"}
check -- "error" --> ai
check -- "compiles" --> run["rux run"]
run -- "output" --> youOption 1: a coding agent in the Examples repository
A coding agent runs in your terminal or editor, reads the files in the folder you open it in, and can run commands such as rux check and rux run itself. Open it in the Examples repository and every lesson is already in its reach.
Install an agent
Claude Code is Anthropic's coding agent. It needs a Claude subscription or a Claude Console account.
curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
Then start it inside the repository with claude. Claude Code is also available as a desktop app and as extensions for VS Code and JetBrains IDEs — see the Claude Code documentation.
Codex is OpenAI's coding agent. It signs in with a ChatGPT account.
npm install -g @openai/codex
curl -fsSL https://chatgpt.com/codex/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
Then start it inside the repository with codex. Codex also has an IDE extension — see the Codex documentation and the source on GitHub.
Open the course in it
git clone https://github.com/rux-lang/Examples.git
cd Examples
claude # or: codex
The repository root carries an AGENTS.md file — Codex reads it automatically, and Claude Code reads it through the repository's CLAUDE.md. It tells the agent what Rux is, how the course is laid out, which syntax differs from the languages it knows, and to verify everything with rux check. You do not have to explain any of that yourself.
Add the Rux skill (optional)
The Examples repository also publishes a Rux skill: a compact reference an agent loads when it works with Rux code, in any project. Install it once and your agent knows Rux everywhere, not just inside the course:
npx skills add rux-lang/Examples
Option 2: a chat assistant, straight from a lesson
You do not need to install anything to study with a chat assistant. Every lesson page has a Copy page button and a menu next to it:
- Open in Claude or Open in ChatGPT starts a conversation that already points the assistant at the lesson and its program, and asks it to explain the lesson and check your understanding.
- Copy page puts the lesson's Markdown on your clipboard, to paste into any assistant you like.
A chat assistant cannot run the compiler for you, so paste what it writes into a lesson package — or the Playground — and check it yourself.
Prompts that work
Copy these into your agent, replacing the lesson name. Each one keeps the assistant tied to the course and the compiler.
Explain a lesson
Read the lesson in ControlFlow/DoWhile (README.md and Src/Main.rux).
Explain the program step by step for a beginner, then ask me one
question at a time to check I understood. Do not move on until I answer.
Practise
Give me a small exercise that uses only what lessons 1.1 to 3.5 teach.
Do not show a solution. When I say I am done, read my code, run
rux check and rux run in that folder, and review it.
Understand an error
I ran rux check in Basics/Convert and got the error below. Explain what
the compiler means in plain words and give me a hint — not the fix.
<paste the error>
Compare with a language you know
I know Python. Compare how Rux handles optional values (lessons in
Optionals/) with Python's None. Only use Rux syntax that appears in
this repository, and point to the lesson for each claim.
Review your own program
Here is my FizzBuzz solution in Projects/MyFizzBuzz. Run rux check,
then review it against Projects/FizzBuzz: what is idiomatic Rux, what
is not, and why?
An assistant that writes every exercise for you teaches you to read code, not to write it. Ask it to wait for your attempt, to give the smallest useful hint, and to explain its reasoning — then type the code yourself.
Context for any assistant
When you work outside the Examples repository, point your assistant at these:
| Source | What it gives the assistant |
|---|---|
| llms-full.txt | The whole site — course, reference, CLI and API — as one Markdown file |
| llms.txt | An index of every page, each linked to its Markdown source |
| Learn Rux | This course, lesson by lesson |
| github.com/rux-lang/Examples | Every lesson as a package that compiles with the current rux |
| Rux Reference | The full language rules |
| API Reference | The standard packages and their functions |
https://rux-lang.dev/llms-full.txt is the quickest way to give an assistant that has never heard of Rux the whole language at once: attach it to a chat, or tell an agent to fetch it before it writes any code. It is large, so for a single lesson the lesson's own page is the better fit.
Next
Start the course with 1.1 Hello, World, with or without a study partner.
First project
Create a Rux package with rux new, print Hello, World, build and run it, read your first compiler error, and clone the Examples repository the course is built on.
Cheat sheet
The syntax taught across the Learn Rux course on one page — bindings, types, control flow, functions, structs, variants, optionals, errors, generics, ownership and pointers — with a link to the lesson for each.