Holochain Forum

Learning Rust

This post is here to help you get the working knowledge of Rust when you start developing Holochain applications.

learning resources

unusual Rust features

If you can only focus on a few things, this is the part you should read. These features and their syntax are very specific to Rust and are responsible for most of the confusion among the language learners.

Rust features that you should be familiar with

Rust features you can ignore for now


P.S. if you have ideas on short explanations for Rust features that would help people transition from other languages – please let me know! :slight_smile:

4 Likes

if one is just learning to code now, and is very intrigued by the holochain project (let’s say a young high school student)

would learning rust first be advisable? what path would you recommend? learning other programming languages first?

… ?

@spirit hi there :slight_smile:

I don’t have a definitive answer here, instead I have a pros/cons list for learning Rust as your first language:

  • pros
    • you will likely have a deeper, more systematic view of how things work (especially when it comes to memory management), because with Rust you won’t have much of a choice
    • you will be able to write a bunch of code for multiple layers, from low-level OS stuff to cli tools to web backends and REST APIs
    • Rust code practices would likely help you develop efficient development habits which will be useful regardless of your language
    • being a beginner, you’ll shoot yourself in the foot far less frequently because Rust compiler will have your back with detailed error messages and examples. So even though your progress might be slower, it will be more reliable and you’ll feel more confident in the code that compiles (once it does, hehe)
  • cons
    • your first results will likely come later than if you’ve chosen let’s say JS/Python, so you might feel discouraged at the start and slow down. Consider this point if you’re used to fast feedback. If you just want to start building something for the sake of results (which is more than fine!), starting with something less complex will be a good choice.
    • there will be occasional things that Rust & community haven’t figured out just yet, which would mean there won’t always be a plethora of solutions like with more widely used languages. It’s not too bad though, because there are a lot of places to ask for help.

Hope it helps!

1 Like