Open-source project
origin-brain/rust-by-practice avatar
origin-brain/rust-by-practice

rust-by-practice's clone command points at the author's own account, and the solutions ship in the repository

Rust By Practice will evolve into Origin.

14,807 stars1,200 forksRustCC-BY-4.0

At a glance

What is it?
This is a book of Rust exercises built so that each one has to compile without errors or panics, with three parts per chapter, online editing and running, and a four-level difficulty scale. It is licensed under Creative Commons attribution rather than a software licence, exists in English and Chinese, and has no published releases. Two things to know before you start. The clone command in the local build instructions points at a personal account rather than the organisation that now hosts the project, and every exercise's answer is committed to a directory in the repository.
Who is it for?
This suits someone who has read a Rust book and cannot tell whether they have understood it, because the exercises fail to compile rather than returning a wrong answer, and a borrow-checker error is an unusually honest teacher. The harder difficulty than the book it derives from is the reason to prefer it if you already worked through the easier material.
Can I use it commercially?
Yes, with credit. CC-BY-4.0 allows commercial use as long as you credit the authors and indicate what you changed. It is written for creative content, so check how it applies to any code.
Is it still maintained?
Yes. The repository last received commits 83 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • origin-brain/rust-by-practice14,807 ★ · +31
Star history
Repository2026-09-222026-11-15
origin-brain/rust-by-practice14.8k14.8k

31 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The clone command points at a personal account, not the organisation

The local build instructions start with a clone command, and the address in it is not this repository.

The repository you are reading is hosted by an organisation whose name is a noun and a verb. The clone command names a user's personal namespace instead, with the same repository name.

So a reader who copies the front page's first command does not get the copy you are looking at. They get whatever that personal account currently contains.

That is almost certainly a leftover from when the project was a personal project. The repository description says the project will evolve into something else, which is consistent with a body of work that has outgrown its original home and is mid-move. The clone command is the last thing to be updated.

It is the kind of error that costs nothing if you notice it and a lot if you do not, because the two copies will drift. Your edits would be against a fork of an older state, your pull request would go somewhere unexpected, and the build instructions you followed would not be the ones the project maintains.

So the consequence is to substitute the address you arrived at. And if you are reading this to decide whether to rely on the project, that is a small piece of evidence about how carefully the documentation is updated, which is worth weighing against how good the exercises are.

Every exercise's answer is committed to the repository, in its own top-level directory

There is a directory at the top level of this repository called solutions, and it sits beside the book directories rather than inside them.

That single fact determines how you should use this project.

The exercises are written as code with blanks to fill and an assertion that must hold. The stated rule is that you make each exercise compile without errors and panics. So the feedback mechanism is the compiler and the assertion, not a test runner and not a diff against a reference.

That is a good design. A borrow-checker failure tells you something specific about ownership that a passing test would not. And the assertions are visible in the exercise itself, so you can see what is being asked before you try.

But with the answers in the repository, this is a course with a permanently open solution key. Nothing in the front page asks you not to look, because there is nothing to stop you, and the directory is one level up from the chapter you are reading.

So the consequence is that this is the right tool for learning and the wrong tool for assessing. If you want to be tested on this material you need a different arrangement, because the answers are a directory traversal away rather than behind a flag.

The exercises are explicitly harder than the book this one derives from

The front page is candid about its relationship to an existing free book, and about how it differs.

It says some of the examples and exercises are borrowed from a well-known example-driven Rust book, with thanks. Then it says although those are great, the project has its own secret weapons.

And then the sentence that tells you what to expect: the overall difficulties are a bit higher, on a four-level scale from easy to super hard, marked with one to four stars.

So the positioning is precise. This is not a replacement for the book it draws from. It is the same ground covered at a higher difficulty, which means if you have worked through the easier material you will not be bored, and if you have not, you will be stuck on the first chapter.

The stated goal is the gap the front page names: filling the space between learning and getting started with real projects.

That gap is real and it is the reason exercises of this kind exist. The borrow checker and the lifetime rules are the parts of Rust that reading does not install, and the only way to install them is to write code that does not compile and fix it.

So the consequence is that you should not treat this as a first Rust resource. Treat it as the part of learning Rust you cannot do by reading, and check the star rating of the first chapter before you start.

The licence is Creative Commons attribution, which is the right choice and an unusual one

This project is a book of code, and its licence is a Creative Commons attribution licence rather than a software licence.

That is the correct instrument for the actual content. Creative Commons was designed for works that are not software, it permits copying and adaptation including commercially, and its only substantive condition is attribution.

So the whole repository, prose and code together, sits under one licence that fits both.

The consequence for you is that attribution is a real obligation rather than a formality. If you fork this and publish the exercises, you owe credit under CC-BY-4.0.

There is also a licence file at the top level alongside a formatting ignore file, and the repository metadata agrees, so there is no ambiguity to resolve before you use it.

Two hosting addresses for one book, and two languages in the tree

The front page gives you two different addresses for reading the book, and the repository holds two language versions.

There is a homepage field pointing at one domain, and a reading link pointing at another. The reading link is practice.rs; the homepage field is practice.course.rs.

Neither is explained, and they may well be the same content served from two places. But a reader following the front page has two choices and no way to tell which is canonical.

The repository itself has two directories that parallel each other, one per language, and the local build instructions give a separate serve command for each. So the book is maintained in both languages from this one repository.

The local build is a documentation tool, installed through a package manager for the language ecosystem, and then run against one language directory at a time. That is a conventional setup and it means you can read either version offline.

So the consequence is that the two addresses probably both work today and you should not depend on either. If you are citing a specific exercise, the commit in this repository is the only stable reference, and neither of these sites offers that.

Only some exercise blocks are marked editable, and that is how the online runner works

The front page claims you can read, edit and run the exercises online. The three example blocks show how selective that claim is.

The first block and the second use a plain language tag on the fence. They are examples, and a reader is meant to read them.

rust
// fill in the blank to make the code work, `split` MUST be used
fn main() {
    let num = Some(4);
    let split = 5;
    match num {
        Some(x) __ => assert!(x < split),
        Some(x) => assert!(x >= split),
        None => (),
    }
}

The third uses a fence tag with two values, the language and a marker saying it is editable. That marker is the documentation tool's convention for a block the reader can edit.

That is worth knowing because the difference is not visible in a rendered page except through behaviour. A block you cannot click and run looks the same as one you can until you try.

The exercises themselves follow a consistent shape. A comment saying to fix the error or fill in the blanks, sometimes a note constraining which function must be used, then the code with blanks marked by repeated underscores, and an assertion at the end that states what has to be true when it compiles.

The project says it is being renamed, and the repository name is the old one

The repository description is not a description. It is a migration notice.

It says the project will evolve into something else. That is all it says, and it is the entire text of the field a developer reads first to decide what a repository contains.

The consequences are structural rather than cosmetic. The repository name and the package-free distribution channel are the old ones. The homepage field points at a course subdomain rather than at the project.

For a book, a rename is expensive in a specific way. Links rot. Exercise numbers are how readers refer to things, and if the book is reorganised under a new name while the repository name stays the same, every external reference has to be rewritten by hand.

There are no published releases. You can cite and pin a specific commit to identify the material you used.

So the consequence is that this is a project in the middle of becoming something else, and if you are considering building a course or internal training on top of it, the material may be reorganised, so pin a commit and review later changes before updating.

Editorial conclusion

This suits someone who has read a Rust book and cannot tell whether they have understood it, because the exercises fail to compile rather than returning a wrong answer, and a borrow-checker error is an unusually honest teacher. The harder difficulty than the book it derives from is the reason to prefer it if you already worked through the easier material. Two things to weigh. That the answers are one directory away, so it works as a course with a solution key and not as an assessment. And that it is being renamed, so expect the name and the hosting to change underneath you.

Frequently asked questions

What is rust-by-practice?

A book of Rust exercises built so that each one must compile without errors or panics. Each chapter has three parts: examples, exercises and practices. The exercises can be read, edited and run online, every exercise has its own solution, and difficulty runs across four levels from easy to super hard. The stated goal is to fill the gap between learning and getting started with real projects, and the front page notes that some material is borrowed from an example-driven Rust book while the overall difficulty is deliberately higher.

Is Rust really hard to learn?

This project does not make a claim about that. It takes the position that difficulty is something you resolve by writing code rather than by reading, and structures the material so the feedback comes from the compiler. The front page does say its exercises are a bit harder than the example-driven book some of them are borrowed from, on a scale running from easy to super hard, so the answer it implies is that the reading stage is not where the difficulty lives.

How can a beginner learn Rust?

This project would not be the starting point. It assumes you have been through a book and wants to find out whether you understood it, and it says the exercises are harder than the example-driven material some of them derive from. Its own front page frames the gap it fills as the one between learning and starting real projects, which is the second stage rather than the first.

Is learning Rust worth it in 2026?

Not addressed here, and nothing in this repository would be evidence either way. It is a set of exercises and a documentation build, with no claims about the language's adoption or its prospects. The front page describes what the exercises cover and what the difficulty scale is, and says the project will evolve into something else.

Can I use these exercises in my own course?

Yes, with attribution. The whole repository is under a Creative Commons attribution licence rather than a software licence, which permits copying and adaptation including commercially and requires credit. The repository has no published releases, so if you need a stable reference, cite a commit rather than a version.

Official sources

  1. Issues
  2. License: CC-BY-4.0
  3. origin-brain/rust-by-practice on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/origin-brain-rust-by-practice.svg)](https://hysenlabs.com/projects/origin-brain-rust-by-practice)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/origin-brain-rust-by-practice.svg)](https://hysenlabs.com/projects/origin-brain-rust-by-practice)

Was this useful?