Skip to content

Instantly share code, notes, and snippets.

@brson
Last active March 14, 2017 01:33
Show Gist options
  • Save brson/eac868c319248a97f7834991fa63e290 to your computer and use it in GitHub Desktop.
Save brson/eac868c319248a97f7834991fa63e290 to your computer and use it in GitHub Desktop.

As a first contribution, I'm hoping you will be interested in contributing to a new project called the Rust Cookbook 1 (source 2).

It's not much now, but the Rust library team is going to be building this collection of practical Rust code examples as their goal for the year 3.

I like this project for new contributors because it lets you write small Rust programs to learn how to use Rust, while contributing back, and there's lots that needs to be done generally on the cookbook.

I have a list of examples 2 to pick from, and in parethesis is the Rust crate needed to write it. Take one you like, figure out how to write the program in Rust, then add it to the cookbook.

This project is really new, so there isn't so much existing code to work off of yet, and we'll have to make some organizational decisions about where to place your example.

You already have documentation on building Rust generally. Here's a quick guide to working with the cookbook:

Clone it and change to that directory:

git clone https://github.com/brson/rust-cookbook
cd rust-cookbook

Install 'mdbook', a program that generates Rust documentation from markdown:

cargo install mdbook

Test the examples in the documentation:

cargo test

Build the cookbook:

mdbook build

That will output the HTML book to the 'book' directory.

The way you should approach this is by first just writing a standalone Rust program to do the thing required by the example. Take it as a learning opportunity to learn how to do that thing. Only then I'd suggest figuring out how to build the cookbook and integrate your code into an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment