Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviews #2

Open
wants to merge 20 commits into
base: capstone
Choose a base branch
from
Open

Reviews #2

wants to merge 20 commits into from

Conversation

JekiXD
Copy link
Owner

@JekiXD JekiXD commented Apr 10, 2024

No description provided.

Copy link

@YBoy-git YBoy-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust part looks good, didn't check wgsl part as I'm not a friend with it.

Copy link

@vsmysle vsmysle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting project! You've done a great job simulating water droplets with the wgpu library 😃

Here are some suggestions for improvement:

  • While default configuration values in the code are fine, enhancing your solution to fetch these values from a configuration file (e.g. settings.toml) or environmental variables would be fantastic.
  • Consider consolidating both the UI and simulation into a single crate as their functionalities are closely related. However, if you anticipate adding alternative ways to interact with the simulation in the future (e.g., updating configurations from a website), maintaining separate crates might be preferable.
  • Hardcoding the TCP port and address might lead to program panics if any other service is bound to port 12345. Providing flexibility in port selection (e.g via config / cli ) could resolve this issue.
  • Currently, the entire settings is serialized and sent to the simulation even when only one value is updated in the UI. Consider optimizing this process by transmitting only delta updates from the UI to the simulation.
  • Solution crashes the window manager on macOS. It is worth to debug it and find the root cause of this issue.
  • In main.rs, consider spawning multiple threads for different parts of the simulation instead of spawning commands. This approach could enhance performance and resource utilization.

@VictoriaGrasshopper
Copy link

Screenshot 2024-04-14 at 16 08 40 Screenshot 2024-04-14 at 16 08 46 Screenshot 2024-04-14 at 16 08 49 🤩🤩🤩

Comment on lines +4 to +9
let mut simulation_process = Command::new("target/debug/simulation")
.env("RUST_LOG", "error")
.spawn()
.expect("Failed to spawn simulation");

let mut gui_process = Command::new("target/debug/settings_ui")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Is it possible to make it also build/run with --release flag? I see you've hardcoded the debug build. I suspect it may be a bit more performant?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt it's going to change much, because main logic happens on the GPU. CPU only handles setup.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair!

@NamesMark
Copy link

Satisfying

зображення

зображення

зображення

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants