Live data from Hacker News

Rust 1.45

blog.rust-lang.org

31–40 of 227 posts

Re: Rust 1.45

#32
post #14

By any chance if anyone is in the Paris area and is interested to teach Rust at university next year during the first semester. Please get in touch :).

What university ? Would love to take the resulting course

Sadly our computer rooms aren't big enough to accept additional students to assist to our courses :/.

Re: Rust 1.45

#33
post #30
post #2

https://github.com/SergioBenitez/Rocket on stable rust finally!

Great news, but it's not even 1.0 yet. Thus, it isn't stable enough for production use. At the moment, I'd rather use something like actix-web instead.

That's not how versions work

Re: Rust 1.45

#34
post #14

By any chance if anyone is in the Paris area and is interested to teach Rust at university next year during the first semester. Please get in touch :).

Is this undergrad? Genuinely curious, how will you get someone to understand what ownership helps avoid without them having experienced the pain on the other side?

I guess with younger and younger kids learning programming these, may be there can handle more? I am not sure if my son would understand all of the intricacies in his first semester.

Re: Rust 1.45

#35
post #2

https://github.com/SergioBenitez/Rocket on stable rust finally!

IMHO, it's a shame So Much time has been spent (~3 years ?) on async at the cost of basic features like multipart and CORS.

But I understand it could be more fun for the devs :-)

Re: Rust 1.45

#36
I keep seeing more and more news about Rust, and figure that perhaps it is time that I learn something new.

99% of my development work these days is C with the target being Linux/ARM with a small-ish memory model. Think 64 or 128MB of DDR. Does this fit within Rust's world?

I've noticed that stripped binary sizes for a simple "Hello, World!" example are significantly larger with Rust. Is this just the way things are and the "cost of protection"? For reference, using rustc version 1.41.0, the stripped binary was 199KiB and the same thing in C (gcc 9.3) was 15KiB.

Re: Rust 1.45

#37

I keep seeing more and more news about Rust, and figure that perhaps it is time that I learn something new. 99% of my development work these days is C with the target being Linux/ARM with a small-ish memory model. Think 64 or 128MB of DDR. Does this fit within Rust's world? I've noticed that stripped binary sizes for a simple "Hello, World!" example are significantly larger with Rust. Is this just the way things are…

A significant portion of the size is formatting and panic unwinding code. Some of this can be reduced by using `panic=abort` but it is a known issue.

Worth noting that a lot of the code size is a constant addition that won't really scale with your program code.

Re: Rust 1.45

#38
post #34
post #14

By any chance if anyone is in the Paris area and is interested to teach Rust at university next year during the first semester. Please get in touch :).

Is this undergrad? Genuinely curious, how will you get someone to understand what ownership helps avoid without them having experienced the pain on the other side? I guess with younger and younger kids learning programming these, may be there can handle more? I am not sure if my son would understand all of the intricacies in his first semester.

University of Maryland teaches Rust for a single lecture as a part of their CMSC330 (Organization of Programming Languages) [1] undergraduate class. The lecture slides are available online [2].

[1] https://www.cs.umd.edu/class/spring2020/cmsc330/

[2] https://www.cs.umd.edu/class/spring2020/cmsc330/lectures/25-...

Re: Rust 1.45

#39
I'm building an embedded project that currently runs a python script for automatic brightness. It takes a brightness value from a sensor over I2C, applies a function to get an appropriate LCD brightness value and then sends that to the display driver over a serial port. Would this be an appropriate project to write in Rust to learn the basics of this language?

Re: Rust 1.45

#40

I keep seeing more and more news about Rust, and figure that perhaps it is time that I learn something new. 99% of my development work these days is C with the target being Linux/ARM with a small-ish memory model. Think 64 or 128MB of DDR. Does this fit within Rust's world? I've noticed that stripped binary sizes for a simple "Hello, World!" example are significantly larger with Rust. Is this just the way things are…

The smallest Rust binary ever produced was 145 bytes. https://github.com/tormol/tiny-rust-executable

That is a bit extreme but it demonstrates the lower bound.

There's a lot of things you can do to drop sizes, depending on the specifics of what you're doing and the tradeoffs you want to make.

Architecture support is where stuff gets tougher than size, to be honest. ARM stuff is well supported though, and is only going to get better in the future. The sort of default "get started" board is the STM32F4 discovery, which has 1 meg of flash and 192k of RAM. Seems like you're well above that.

Post reply on HN