Introduction

This book serves as the main ressource about The Rust Programming Language at Camptocamp.

Hello Ferris

To beginn with, let's greet Ferris 🦀, the unofficial mascot of the Rust Community, with a few lines of Rust code - just click the play button to say hi.

fn main() {
    println!("Hello Ferris!");
}

Community

The community behind this book is the Rust Guild at Camptocamp. If you have any questions regarding this book, the affiliated repository or its content join the #gs-guild-rust Slack channel.

Getting Started

Install Rust

Follow the official documentation to Install Rust using rustup.

In case a nightly toolchain is needed, use the --allow-downgrade option on install.

# add nightly toolchain
rustup toolchain install nightly --allow-downgrade
# make it the default
rustup default nightly

For more advanced setups consult the rustup documentation

Editor Support

Setup the rust-analyzer or the InteliJ Rust plugin, depending on your editor of choice.

Learn Rust

Rust is known for having a rather steep learing curve. Choosing a good learning path can help you make progress and stay motivated. If you get stuck, have questions about the learning materials or its content don't hesitate to ask questions in #gs-guild-rust.

The Book

The singlemost recommended way to start learning Rust is 'the book'.

It offers a comprehensive introduction to the language including hands-on chapters. The online version additionallly reflects the current evolution of the language.

Further Resources

The official website contains many more learning resources covering various domain specific aspects of the language, the core documentaion and reference material.

The following resources are worth looking at as they are either highly regarded in the community, read, owned and/or recommended by guild members.

  • Rust in Action (print)
  • Effective Rust (online)
  • Zero To Production In Rust (print)

Geospatial Rust

GeoRust

GeoRust is a collective of people interested in Geospatial Rust wich maintain a collection of geospatial tools and libraries written in Rust as well as an introductory (wip) Geospatial Rust book.

Awesome Geo Rust

Awesome Geo Rust is a curated list of awesome geospatial software, libraries, tools and resources, written in Rust.

Guild Picks

The following list is a collection of links to resurces that were discussed and shared in the guild.

Rust Projects

A curated list of projects at Camptocamp where Rust is used.

Abbreviator

Abbreviator is a URL Shortener with a SQLite database and is based on Tide and sqlx leveraging the async-std runtime.

It features basic Rust CI, configuration through environment variables, CORS and a minimal Docker image.

OGC API

The ogcapi project is an ongoing impementation of various OGC API standards.

It features comprehensive type definitions, a server implementation for collections, features, tiles and styles, a PostgreSQL driver and vector data import leveraging gdal.

Swissgeol Viewer

The Swissgeol Viewer has a api written in Rust with a PostgreSQL database and is based on axum and sqlx leveraging the tokio runtime.

Some key features include Json Web Token authorization, Amazon S3 integration through aws-sdk-rust, reversible database migrations and a local development environment base on Docker Compose.

Rust Guild

The Rust Guild is a Camptocamp Special Interest Group and the organisation behind this book and associated repository.

Chat with us in the #gs-guild-rust Slack channel.

Topic

The main topic of the guild is The Rust Programming Language. Some focus areas are Webassembly and the OGC API standards.

Goal

The main goal is to foster the adoption of Rust at Camptocamp and beyond. More specifically this entails the following goals:

  • Explore and evaluate potential novel use cases to leverage Rust.
  • Communicate and promote existing projects, capabilities and use cases.

Outputs

Outputs of the guild in addition to this book.

Technology Communication Meetings

  • Webassembly "Hello, World!" (tentative)
  • Introduce the ogcapi project (tentative)