How does #Rust ensure that you are only calling the destructor once for a class or smart pointer?
1. The destructor is always called, once the owning variable goes out of scope.
2. You may not call the destructor .drop() manually.
This is a better alternative than the pc-windows-gnu target as it allows you to link with #Microsoft libraries. The reason you can't with the gnu version is that it uses a different ABI.
If you haven't seen it yet, #Veloren is a fantastic voxel based game written in #Rust. It has a big community of people and enough activity to post a weekly newsletter. The game itself is far from complete, but that seems to be only because the scope is so big. It has been playable for years.
You can ride airships, craft weapons, use a paraglider, watch the sunset and much more.
Check it out at https://veloren.net.
You can argue this is the biggest game ever written in #RustLang
`cargo test -- --nocapture` is really handy. Throw in some println!'s wherever you need them and see the output even with passing tests. #rust
@guenther @trevorfsmith not sure, depends on the license I guess. I have used it to cross-compile windows binaries on Linux systems in the past, and they did run on Windows. That was C and not rust though.
For a corporation the license fee should be ok though, but it does seem like it is undercommunicated that it might be required.
Here is a better explanation about the "not undefined behaviour" claims in std::collections I complained about earlier.
Writing test and doc at once in #Rust
Disclaimer: Not legal advice, ask your lawyer!!
If you use #Rust in a corporate environment you should be aware of the licensing that exist on #Windows. #RustLang uses Visual Studio Build tools, and it follows the rules of VS Community edition unless you have a payed license.
250 pc's or $1 mill revenue will put you squarely into #Microsoft definition of enterprise.
The community license is here: https://visualstudio.microsoft.com/license-terms/vs2022-ga-community/
The post that reminded me of this is: https://internals.rust-lang.org/t/use-lld-by-default-on-windows-to-mitigate-microsoft-c-build-tools-licencing-issues/16606
Have you ever had an idea that could improve the rush hour traffic in your area? A/B street is a traffic simulator that gives you that ability.
It downloads data from #OpenStreetMap and simulates people driving to and from work. This gives you the option to try out things, and possibly improve the situation.
If you're really bold you can then bring this to your local politicians.
Recent podcast: https://rustgamedev.com/episodes/interview-with-dustin-a-b-street
Third time's a charm?
Raph Levien make another stab at a UI framework for #rust.
Hopefully some fruits are born from this research that will allow great things for UIs in #rustlang
As of nushell 0.62.0, if you get a `nu::shell` error, you'll get a link you can click (first image).
If you click on that link, it'll take you straight to the docs (in docs.rs!) for that error (second image), with a handy "Resolution" section!
Yay miette! #rust
As part of the stdlib mutex overhaul, std::sync::Mutex on Linux now has competitive performance with parking_lot
Building a crawler in #Rust [4/6]
Now that we have a fast concurrent crawler in Rust, it's time to actually parse the HTML and turn it into structured data (remember, this process is called scraping).
I played around with #rust a little bit a while ago (and then had to stop so I could focus on finishing grad school) but I'm getting back into it now, and it's just a delight to work with, honestly.
Many are taking an Electron based approach to using the same sources for web and desktop.
egui is an option if you wanted to do the opposite of that. Having a native 3d accelrated app on the desktop that also run in the web browser is possible.
You can try out a lot of the features at https://egui.rs
Latest version 0.18.0 was released a few hours ago.
Changelog is available at https://github.com/emilk/egui/blob/master/CHANGELOG.md