But how do I make a website?

I'll show you some steps to keep learning

But if you've already heard of it…

And some problems that the language helped me to solve

How I got to know Rust

I'll tell you what Rust is

If you've never heard of Rust…

I started to get involved with the deployment of some projects.

"But what is Rust?"

Rust was one of the options in my search for alternatives.

"Do I have to code in C to produce binaries?"

All of these traits create an ideal environment to proceed with confidence

What kept me interested on the language:

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.

Rust has a type system that prevents several kinds of memory management errors at compile-time

How many bugs may happen in a low-level program?

And start with what you're already familiar with in other languages

You can learn bit by bit, at your own speed

These were examples of the potential of the language

It's a great evolution for the whole low-level ecosystem

Examples in documentation are executed during testing

/// Runs a grand calculation that will leave you surprised

And this is enforced by the compiler.

We can only access the order data before we send it in this scenario.

Which we can't express in other popular languages

Our binary won't have these problems!

Are there any problems in this code?

In short, imagine how complex a browser is under the hood.

Now, how do I make a website?

(And you can sew your own)

Ah, and this is the mascot, Ferris

When we're done, we'll have:

Which helps to install the needed dependencies and tooling

This is the version manager for Rust

Let's create a file at src/index.html with the following content

Add the dependency in the Cargo.toml file

Let's use the Nickel framework to help us

In the end we'll have this:

We start our server, with a message in case there are errors.

We configure the port with the PORT environment variable. Let's use port 3000 for fallback.

We include all of our HTML file content in a constant.

First, we import and include some references to the web framework.

Now let's see a little of Rust, bit by bit. Let's open the src/main.rs file.

And there's a demo on Heroku!

And it's all in just one single-file binary!

You have a site in Rust.

Does it look far too diferent from other languages?

Now you have code to make web requests!

Let's import our library and some I/O functions

Let's use Reqwest for this project

There are already several libraries available > on Crates.io

I'm going to follow a recipe available on the Rust Cookbook

It's as easy as in other languages, even though it's a systems language

"One question… "

Is it easy to learn Rust ? I spent weeks banging my head against some concepts that were new to me.

I come from a Ruby/Java/JavaScript background

I had to learn about the stack and references

The concepts of lifetimes and borrowing took a while to get into my head

Rust brought new concepts to my toolbox. And I've been having a lot of fun!

The community is very open and

helped me a lot, and has a lot of interest in

welcoming new people. Many people are willing to help on #rust-beginners, on #rust, and on the forum.

There's a big push to make an inclusive ecosystem, as much for community participation as for learning material for all programing levels.

RustBridge An initiative to teach Rust to those that aren't well-represented in the area of technology

With interest in turning the language into a good first programming language

Collaborative evolution All proposals for changes in the language follow an RFC process

Which requires new change proposals to have documentation and a clear way to

teach the proposed change

How do I get my site on Heroku? I used this buildpack.

Is there only Nickel for web work? There are several frameworks, but it's an ecosystem in development.

A good list can be found at Are We Web Yet?

If you are looking for something more experimental : Have a look at Rocket, which uses a more succinct syntax…

But it depends on compiler functionalities that are still in development.

Do I need to use rustup? It's the most recommended method by the community It's the easiest way to stay up-to-date

Rust has a new version every 6 weeks

has a new version every 6 weeks It's easier to follow new developments

Rust is also available through distro package managers, but it can take a while for updates to come.

How can I connect to a database? Diesel can help with this.

Are there any companies already using Rust ? Yes. Your Firefox installation already has components written in Rust. Some companies: Dropbox, Chef, Tilde, Sentry, CoreOS, Mozilla and there are more on the website list.

Can I only use Rust for web? No, you can use it for many other things!

(If I tried to list all the examples, this would be another presentation entirely)