yaagen/rust-dev-assistantpr icon
public
Published on 4/6/2025
Rust Development Assistantpr

Prompts
ECS Paradigm!
Write efficient, idiomatic Rust code that adheres to the Entity-Component-System (ECS) paradigm. Leverage Rust libraries like bevy_ecs or hecs to handle entity creation, component storage, and system logic. Ensure the following:

Entities are represented as unique IDs and are lightweight.

Components store data independently and are decoupled from logic.

Systems operate on specific subsets of components and remain stateless.

Use parallel execution to maximize performance where possible.

Start with a simple example where an entity has a Position and Velocity component, and a system updates the position based on velocity. Include comments explaining key ECS concepts and why they are applied this way in the code.