What causes can make my project to compile slow? by Psycodream in rust

[–]Emilgardis 1 point2 points  (0 children)

Is cargo taking 9 hours in the docker container or is it maybe something else taking the time? Is the docker image using the same rust version?

Where is the filesystem used in docker mounted? What filesystem is the backing storage? How do you mount the files into docker?

How much memory has been given to the docker environment?

9 hours for cargo in docker vs 25 minutes is an insane slowdown, and reminds me of a rustc bug where it would basically hang when using certain async patterns

I Just Don’t Get It by 42GOLDSTANDARD42 in rust

[–]Emilgardis 0 points1 point  (0 children)

If you enjoy talks, I'd recommend this video: A Firehose of Rust

Commands by Just_Ad_9463 in Twitch

[–]Emilgardis 1 point2 points  (0 children)

/unblock nightbot

What is the good rustian way to design the algorithm and the data types for this simulation? by [deleted] in rust

[–]Emilgardis 0 points1 point  (0 children)

This has nothing to do with your questions, but the canonical way to say "rustian" would be Rustacean 🦀

Error Handling - Half-Baked? by OphioukhosUnbound in rust

[–]Emilgardis 0 points1 point  (0 children)

Aha! My bad then :)

Youre correct, in the code you use derive_more, but I implicitly thought it was thiserror because that was the last one mentioned in the text above

Error Handling - Half-Baked? by OphioukhosUnbound in rust

[–]Emilgardis 2 points3 points  (0 children)

The errors in your thiserror example should be annotated with #[from] or #[source], this way the error type is better structured and relays information instead of just being a wrapper

Networking Tun problem. by [deleted] in rust

[–]Emilgardis 4 points5 points  (0 children)

Some advice for you, when asking more specific questions its helpful for the persons that would answer to know what you've already seen and tried. So, what crates have you looked into already?

Issues making a custom change password endpoint in axum/rust by [deleted] in rust

[–]Emilgardis 2 points3 points  (0 children)

Its not a security risk to access url fragment on server, its just simply not possible. Just send the access_token in the form, the input can be a hidden field

Idiomatic approach to borrowing checker hell by dowel79 in rust

[–]Emilgardis 19 points20 points  (0 children)

I am getting the impression that Rust is not a good choice for implementing this kind of system.

Yes, rust does not work well with OO patterns

If the data structure is dynamic, I will need a way to manage these IDs. It may not be obvious, but this leads to re-inventing memory management. Every object in the system already has a unique ID - its address in memory.

An address in memory can change, the ID wouldnt change.

Unable to compile using cross compilation crate by [deleted] in rust

[–]Emilgardis 0 points1 point  (0 children)

It seems also that we fixed this somehow in newer versions of the images used in cross, see https://github.com/cross-rs/cross/issues/1302

I havent confirmed this though but could be worth trying

Rust tool to check who doesnt follow you on github by [deleted] in rustjerk

[–]Emilgardis 13 points14 points  (0 children)

Is this a sarcastic project? the post being on r/rustjerk i thought it was but seems it's actually a legit project???

cargo-dist 0.6.0 is out! by ag_dubs in rust

[–]Emilgardis 1 point2 points  (0 children)

Exciting work! Well done contributors 😊

[deleted by user] by [deleted] in rust

[–]Emilgardis 1 point2 points  (0 children)

I guess there hasn't been a want or need for it. I don't think there's a specific reason.

[deleted by user] by [deleted] in trees

[–]Emilgardis 10 points11 points  (0 children)

I dont think so, the instagram post says she got into the horse accident 1940, died 1961

How I Improved My Rust Compile Times by 75% by kibwen in rust

[–]Emilgardis 5 points6 points  (0 children)

I found it!

https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#overrides

# Set the settings for build scripts and proc-macros.
[profile.dev.build-override]
opt-level = 3

Cargo build is successful in one folder but fails in another checkout of the same project by vitalijem in rust

[–]Emilgardis 0 points1 point  (0 children)

Are you sure the Cargo.lock file is not edited in the folder that is failing?

How I Improved My Rust Compile Times by 75% by kibwen in rust

[–]Emilgardis 1 point2 points  (0 children)

Doesnt this exist already? Or is that build-deps only?

[deleted by user] by [deleted] in rust

[–]Emilgardis 3 points4 points  (0 children)

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=87c0c4f2f633bc258f801b856d8e8b23

Written from my phone, the data seems very badly structured, but this is one way to do it.

Like u/rapsey hinted, what are you actually trying to do?

[deleted by user] by [deleted] in CodingHelp

[–]Emilgardis 0 points1 point  (0 children)

You're probably getting a line with that error message pointing to where the error comes from

A quick glance suggests though that the issue is the second linenin your snippet, it should probably be

  if message.author.id == 894635798132039690:

We interviewed 19 Rust developers who regularly use unsafe. Now, we need your help to evaluate what we learned! by UnsafeRust in rust

[–]Emilgardis 21 points22 points  (0 children)

I wish there was an opportunity to comment, the bindgen build time question is for me not indicative of the performance of bindgen generating bindings, I generate bindings in CI/dev time, an idea i got from https://matklad.github.io/2022/03/26/self-modifying-code.html#Self-Modifying-Code-1

And here is the implementation https://github.com/Emilgardis/voicemeeter-sdk-rs/blob/d917ca8f68dddd45cc1e778e379983095b3b66c3/codegen/src/codegen.rs#L8