Ralith / Ralith/hecs

Query for per-component access

Open
#271 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
1.4k
Forks
107
Avg merge
2h
Merged PRs (30d)
6

Description

There is Archetype::access method for a query, and it can tell if the entities are mutated or not. What I want is a way to enforce borrowing rules at run-time, when implementing a scheduler. This means, for example, that query A can mutate component X, while query B mutates component Y, at the same time. The current access API would just tell me that both A and B mutate the entities, which is insufficient to know if they can be done together.

The function I need would return a list (or an iterator) of pairs (component, access) for a given query.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented Archetype::access method and the query API described in the issue. Determine how a query can expose each component with its access mode, then verify that the result lets a scheduler distinguish disjoint component mutations. Done means the API returns the requested component/access pairs for a query.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.