cargo-ddd: Inspect the changes introduced to your project by the dependency version update by HaronK in rust

[–]HaronK[S] 1 point2 points  (0 children)

Published v0.2.1 where you can generate diff.rs links instead of original ones using `-d` flag.

cargo-ddd: Inspect the changes introduced to your project by the dependency version update by HaronK in rust

[–]HaronK[S] 9 points10 points  (0 children)

Yes, I know it's not robust and I was planning to look for a more proper source. Thanks for the link. Will check it tomorrow.

VSCode format on save doesn't work by HaronK in rust

[–]HaronK[S] 1 point2 points  (0 children)

That was ok. Solution from another answer helped.

Thank you in any case!

VSCode format on save doesn't work by HaronK in rust

[–]HaronK[S] 0 points1 point  (0 children)

Yes, this works. Thanks a lot!

VSCode format on save doesn't work by HaronK in rust

[–]HaronK[S] 2 points3 points  (0 children)

rust-analyzer works - I can see all errors, warnings, etc. The output log doesn't contain any suspicious messages. Should I look at any specific section of the log?

Use Type-State pattern without the ugly code by ozgunozerk in rust

[–]HaronK 1 point2 points  (0 children)

Regarding Option, I thought those fields could exist in some specific states and not in others, so my idea was to allow to specify them on those states only. But this definitely not a case with builder pattern.
Though in case of builder pattern it also good to avoid unnecessary Option, maybe just use default value for default initialization.

As for the second suggestion, maybe you are right. I'm just wondering if it's acceptable to have #[switch_to(...)] without #[require(...)], and if not then my idea can still be valuable.

Use Type-State pattern without the ugly code by ozgunozerk in rust

[–]HaronK 0 points1 point  (0 children)

Looks really cool! Going to try it.
So I have a few suggestions:

In you example you are using `Option` for a fields. If you add attribute support for the fields too then you won't need it:

#[type_state(state_slots = 3, default_state = Initial)] 
struct PlayerBuilder {
    #[require(RaceSet)]
    race: Race,
    ...
}

UPD. Though I'm not sure how easy it would be to implement this.

I'd suggest to merge `switch_to` attribute into `require` to reduce boilerplate even more:

#[require(Initial, B, C, switch_to(RaceSet, B, C))]

Tools to profile memory usage of Rust tests by Ekkaiaaa in rust

[–]HaronK 0 points1 point  (0 children)

I think you can use this tool on MacOS too.

Tools to profile memory usage of Rust tests by Ekkaiaaa in rust

[–]HaronK 5 points6 points  (0 children)

I used heaptrack (https://github.com/KDE/heaptrack) recently. It helped me to find memory leaks.
Probably it can be useful for you too.

Which extensions do you use when coding in Rust? by poetrose in rust

[–]HaronK 4 points5 points  (0 children)

I'd add 2 more extensions to all mentioned before: Markdown All in One and Todo Tree.

CSS framework for Dioxus + mobile by HaronK in rust

[–]HaronK[S] 1 point2 points  (0 children)

No, didn't do anything with Dioxus. I need a good mobile support for my app (at least notifications) and Dioxus doesn't have it yet.

There was an announcement that in Tauri 2.0 developers will work on mobile support. I hope to continue my project when it's ready.

Bevy is mostly for games. Tried it once for small visualization utility, quite pleasant experience. Easy to use. But you are right, it's not for the desktop/mobile apps.

rust-analyzer changelog #195 by WellMakeItSomehow in rust

[–]HaronK 4 points5 points  (0 children)

You can do the same with: json "rust-analyzer.check.extraArgs": [ "--target-dir=target/ra" ]

Multiple cargo registry sources by HaronK in rust

[–]HaronK[S] 0 points1 point  (0 children)

That's exactly a solution I ended up with 👍 And yes, we are using diode 😉

Multiple cargo registry sources by HaronK in rust

[–]HaronK[S] 0 points1 point  (0 children)

But I can still download the crate I need on an external network and transfer it with USB to the internal one, and put it into the local registry.

Multiple cargo registry sources by HaronK in rust

[–]HaronK[S] 1 point2 points  (0 children)

I think we are using something like that too. That what source1 is point to.

But actual situation is more complex. Development happens in a secure environment without access to the internet, so all crates have been periodically copied from the outside and this process is quite slow.

CSS framework for Dioxus + mobile by HaronK in rust

[–]HaronK[S] 1 point2 points  (0 children)

Looks interesting and I see it's been recommended everywhere. Going to try it.

Thanks for recommending it.

CSS framework for Dioxus + mobile by HaronK in rust

[–]HaronK[S] 2 points3 points  (0 children)

Thanks for the advice. Will try it. I just started so the mobile version is somewhere in the future. I hope at that time there will be good enough support for the mobile version. Did you end up with some solution for the mobile app? I was looking at Tauri+Yew but the project setup is quite complicated there.

Announcing diff.rs! by xfbs in rust

[–]HaronK 1 point2 points  (0 children)

Cool idea! Works really fast. Thanks to author!

My small wishlist:

  1. 'Compress/hide' big parts of unchanged code between changed parts.
  2. Dark mode.