Learning Rust :safe:

Some issues for anyone wanting to learn a bit of Rust while helping out with vdash:

7 Likes

Anybody else watching this channel? Let’s Get Rusty

Im slowly working my way through all his videos and beginning to understand more and more. Still finding a few things that go wrong when trying to follow along, I suspect my extensions in VSCode are being very strict.

Let me know if you have tried to follow along and what issues you hit.

Heres me scratching my head worrying about a comma while doing a tutorial on Structs

the build_user function is


fn build_user(email: String, username: String) -> User {
    User {
        email,
        username,
        active: true,
        sign_in_count: 1,
    }
5 Likes
build_user(String::from("asd"), String::from("dsa"));

without “email:” & “username:”

2 Likes

and then there was a LOT less red squiggles :slight_smile:

Thank you.

Just had this delivered :slight_smile:
https://www.amazon.co.uk/dp/B09QFQ3Y64/ref=dp_kinw_strp_1

4 Likes

Here’s a link to the Lets Get Rusty discord server
Discord.

3 Likes

Blah blahblah help @Southside

Free ebook by Mara Bos.

5 Likes

Wow, that’s amazing, I missed that when I landed on the page before. People recommended it as a great Rust book, but I saw the prices for the physical edition and was deterred. Is there any guarantee though that she keeps that digital version up for free? :grimacing:

3 Likes

I’ll be uploading it to the next testnet :slight_smile:

 safe cat "safe://hyryyry1bg1xdudnamk8uyzqo8w854tmpabf19qm16d5cijot18oi3cttdrnra?v=hj3jne1zd5i4oodrh1a9kkfiq9iyb391g74rkr8kzi4i56uqp467o"
Files of FilesContainer (version hj3jne1zd5i4oodrh1a9kkfiq9iyb391g74rkr8kzi4i56uqp467o) at "safe://hyryyry1bg1xdudnamk8uyzqo8w854tmpabf19qm16d5cijot18oi3cttdrnra?v=hj3jne1zd5i4oodrh1a9kkfiq9iyb391g74rkr8kzi4i56uqp467o":
+---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------+
| Name                            | Type            | Size   | Created    | Modified   | Link                                                               |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
| /atomics                        | inode/directory | 0      | 1672990287 | 1672990287 |                                                                    |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
| /atomics/alt                    | inode/directory | 0      | 1672990287 | 1672990287 |                                                                    |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
| /atomics/alt/3-1.html           | text/html       | 4285   | 1672990287 | 1672990287 | safe://hy8oyrymt63im4178dhyn3ta4wh8mpw7wx1z6nu3ort4dna8wcinh894uqh |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
| /atomics/alt/3-2.html           | text/html       | 4385   | 1672990287 | 1672990287 | safe://hy8oyrypoxx1ykhocfhkdjf54zaosq8mzneqdbinrzmft3tpnqbrpbtkpfa |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
| /atomics/alt/3-3.html           | text/html       | 4836   | 1672990287 | 1672990287 | safe://hy8oyryj6f5rdnsyq69cs59adcqrptajn4h63s9ryzmfq8bgs1tpgh74pia |
|---------------------------------+-----------------+--------+------------+------------+--------------------------------------------------------------------|
3 Likes

This is the best intro to rust I’ve come across

10 Likes

It only became available for free yesterday.
Way beyond my needs or understanding but figured it may be of use to some :smile:

2 Likes

Speed up build times using a new super fast linker: mold

cc @chriso

2 Likes

It’s actively for sale and for macos it is "sold which is a shame

2 Likes

Hey, thanks. I think David Rusu discovered this a while back, and we looked at it briefly, but didn’t come to any conclusion. Perhaps we should look at it again.

3 Likes

Responding to you three years late but - exercism is very nice! I had seen it mentioned here and there, but finally having a go. It’s extremely well laid out, nice explanations, fun tasks, open source, free, all good. Cheers for the share, and anyone looking for a nice place with a few exercises, +1 from me.

4 Likes

My favourite Ukrainian!!!

1 Like

Hello. I have a project in Rust, that’s dependant on safenet libraries. I also build Safenet binaries to spin local testnets for development and testing. Both the project and safenet binaries are compiling the same codebase.

Is it possible to somehow let them use the same intermediate artifacts, instead of compiling all the dependency tree twice and keep duplicated artifacts in their target directories? Perhaps some “global” way, that’s possible with node/npm, or like maven’s m2 directory in Java?

1 Like

I don’t know. Probably a question for the Rust forum or Discord. Be interested to hear back if you find a way.

1 Like