Open-source project
rust-rosetta/rust-rosetta avatar
rust-rosetta/rust-rosetta

rust-rosetta collects small Rust programs as a language primer

Implementing Rosetta Code problems in Rust.

729 stars163 forksRustUnlicense

At a glance

What is it?
rust-rosetta is a repository of minimal working Rust programs for the tasks collected on the Rosetta Code wiki, tracked in a single Cargo.toml and checked by a coverage binary that finds incomplete or diverged solutions. It suits a learner or a contributor who wants small idiomatic examples, and it is a teaching repository rather than a reusable library.
Who is it for?
Adopt rust-rosetta when you are learning Rust and want a few hundred small, complete programs to read, or when you want to contribute a missing task and get review on idiomatic style. Do not adopt it as a library, since each program is a self contained example rather than a reusable API, and do not treat the code as a style authority without reading CONTRIBUTING.md.
Can I use it commercially?
Yes. Unlicense is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 115 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 October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A tracked list of tasks rather than a library

rust-rosetta is a repository for completing a long running issue on the rust-lang/rust tracker, and it contains minimal working code for many simple and not so simple tasks. The structure is unusual and worth understanding before you clone it. Rather than a directory of separate crates, the completed tasks are listed along with a link to the problem in Cargo.toml, and the implementations live under a tasks/ directory with the src/ directory holding the main crate. A meta/ directory holds the task metadata, and tests/ holds the test suite. The effect is that the Cargo.toml is not just a manifest, it is the index of what has been done, which is why a reader can see the state of the project by opening one file. The project also carries a shell.nix, a rust-toolchain file, a clippy.toml and a rustfmt.toml, so the toolchain and lint configuration are pinned in the repository rather than left to a contributor's machine.

The coverage binary is the maintainer's tool for finding drift

The main crate contains a coverage binary that is useful for discovering incomplete solutions, or finding solutions that are different from the version posted to the Rosetta Code wiki. The commands it offers are listed with:

sh
$ cargo run --release --bin coverage -- --help

That is the mechanism that keeps the repository in step with the wiki, and it is worth understanding what it is for. The two problems it solves are different. An incomplete solution is a task the repository claims but has not finished, and a diverged solution is one that has drifted from the version on the wiki, which can happen when the wiki version is edited after the Rust version was written. The documentation also points at an alternative: an automatically generated report of which tasks have been implemented where, hosted at the rosetta-coverage project, which is a broader cross-language view rather than a repository-internal one. So the project maintains two views of the same truth, one computed locally from the tree and one computed across languages.

Not every task exists in the form the repository expects

There is a warning in the documentation that anyone picking up a task needs to read before starting. Not all rust-rosetta tasks exist in their current form on Rosetta Code, and you are asked to cross-check with the repository before you start. The list of tasks remaining is a link to the Rosetta Code report of tasks not implemented in Rust, and the coverage report is the second way to check the same thing. This is a small detail with a disproportionate effect on a first contribution. Someone who picks a task from the wiki, finds the statement has changed since the repository was created, writes a solution to the new statement, and submits it may be told the task no longer matches. The repository is a snapshot of task definitions as they were, and the wiki is a living document, and the two drift apart over years. The project is honest about this, which is the useful part, since the alternative is a confusing review.

Nightly Rust and a welcoming tone for learners

Development is done on the nightly channel of Rust, and the documentation points at rustup for getting it. That is a real constraint for anyone who wants to build the repository today, since a stable toolchain will not necessarily compile it, and the pinned rust-toolchain file will pull the right version. The stated purpose of the repository is more educational than infrastructural. It says this is a project for learning, that new contributors and learners of the language are welcome, and that the maintainers will try to work with you to make the code more idiomatic if you would like. The help channel is an IRC channel, #rust-rosetta on irc.mozilla.org, with the note that it is an asynchronous protocol so responses may be slow. That combination of a large body of small complete programs, a stated willingness to review for idiom, and a nightly toolchain makes this a genuinely useful resource for someone who has just started Rust and wants to see what a finished, small program looks like in the language.

A public domain repository with a long contributor list

The licence is Unlicense, which is as permissive as software licensing gets, placing the code in the public domain with no attribution requirement. That is a deliberate choice for a corpus of examples, since anyone can lift a solution into their own project without concern, and it removes the friction of a hundred people each asking whether a snippet can be reused. The contributor list in the Cargo.toml is long and reads as a record of the project over years, with named authors and their GitHub handles going back through many people including early Rust community figures. The repository is not archived and the last push was on 2026-06-30, with the topics listing hacktoberfest, rosetta-code and rust, which explains a good part of the contributor volume. The absence of GitHub releases is consistent with the project being a collection rather than a distributed artifact, since there is nothing here to version as a release.

Editorial conclusion

Adopt rust-rosetta when you are learning Rust and want a few hundred small, complete programs to read, or when you want to contribute a missing task and get review on idiomatic style. Do not adopt it as a library, since each program is a self contained example rather than a reusable API, and do not treat the code as a style authority without reading CONTRIBUTING.md. Verify first that the task you want still exists in the form the repository expects, because the documentation warns that not all tasks are present in their current form on the wiki, and that you are on the nightly toolchain the project uses.

Frequently asked questions

What is rust-rosetta for?

It is a repository for completing a long running issue on the rust-lang/rust tracker, containing minimal working code for many simple and not so simple tasks. Completed tasks are listed with a link to the problem in Cargo.toml, and the project explicitly welcomes new contributors and learners of the language.

How do I find out which tasks are still missing in rust-rosetta?

There is a link to the Rosetta Code report of tasks not implemented in Rust, and the main crate contains a coverage binary that is useful for discovering incomplete solutions. You can list its commands with cargo run --release --bin coverage -- --help, and there is also an automatically generated cross-language report at the rosetta-coverage site.

Which Rust toolchain does rust-rosetta need?

Development is done on the nightly channel of Rust, obtained through rustup, and the repository pins the toolchain in a rust-toolchain file. The project also carries a clippy.toml, a rustfmt.toml and a shell.nix so lint and formatting settings are fixed in the repository.

Can I use code from rust-rosetta in my own project?

Yes. The repository is released under the Unlicense, which places the code in the public domain with no attribution requirement, so a solution can be reused in another project without concern.

Official sources

  1. Issues
  2. License: Unlicense
  3. README
  4. rust-rosetta/rust-rosetta on GitHub
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/rust-rosetta-rust-rosetta.svg)](https://hysenlabs.com/projects/rust-rosetta-rust-rosetta)

Was this useful?