I’m currently working my way through the Rust book provided on rust-lang.org so that I can one day contribute to this project. Are there any sections I should specifically focus on? Skip?

  • DessalinesA
    link
    fedilink
    arrow-up
    11
    ·
    4 years ago

    I’ll also say that Lemmy uses very basic rust, and only a few parts of its code are a bit hard to read through, and it’d probably be understandable even for someone with no rust experience.

    The activitypub and diesel code are probably the most difficult spots. But once you read through the rust manual, learning libraries like that isn’t too bad.

  • nutomicA
    link
    fedilink
    arrow-up
    9
    ·
    4 years ago

    I suggest that you simply pick an easy issue from the issue tracker and try to solve it. If you know programming, you can probably figure out how to get things work. For one thing you can always search for the specific error you are getting, and Rust gives very good error messages with suggested fixes.

    This is how I learned Rust, because I dont like to read books about programming. Took me about 6 months fulltime to get really comfortable with Rust (before that I had programmed in Java/Kotlin for years).

    Of course everyone learns differently, do what works best for you.

  • pingveno
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    4 years ago

    Honestly, I would just read through all of it including the Appendix. It really does over the essentials of the Rust programming language, with everything there being an essential piece of understanding and using Rust.

    The harder thing is choosing what to read after the Rust Book. Rust’s standard library constrains itself to only core functionality, so functionality like regexs and serialization are implemented in separate crates. The https://lib.rs/ and https://docs.rs/ sites are invaluable for expanding your knowledge of the Rust ecosystem. The Cargo.toml file for a given project will point you to what crates are used in the project.

  • Michael Mc Donnell
    link
    fedilink
    arrow-up
    7
    ·
    4 years ago

    One great strategy for learning is to pick a project first. Then read the learning material as you find gaps in your knowledge. Most of the courses for my degrees were like that.