A crate on top finds its own benilla-config/ through config_dir (#809)
A crate built on benilla through `run_with` has its own `benilla-config/`, but could not ask where it is: `local_state::home` is crate-private. A crate that ships an addon has to write it into that folder's `AddOns/`, where benilla discovers addons and resolves their art and fonts, so without the path it needed a fork. - `benilla_app::config_dir()` answers `local_state::home()`, asked from `run_with` on, since a dev build resolves it from the launcher's folder set there. - CONTRIBUTING's "Building on top" says a crate's files and addons go there, and names `run_with` and this folder as the two seams opened for crates alone. - The example launcher logs its `AddOns/` folder through it, so the example, which clippy and the tests build, is the outside caller that keeps it public. No 1.12.1 behaviour changes. Fixes #807 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f8493febb0
commit
85980939f5
@@ -40,11 +40,13 @@ A feature 1.12.1 does not have lives in a crate of its own that adds its Bevy pl
|
||||
`benilla_app::run_with`, as `crates/benilla-app/examples/extended_launcher.rs` shows, or in a
|
||||
fork. A client started through `run_with` says `extended` in its build line, so its reports read
|
||||
apart from stock benilla's. The crate keeps its own settings, never rows in benilla's CVar table,
|
||||
which every addon reads.
|
||||
which every addon reads, and its files go under `benilla_app::config_dir()`, its own
|
||||
`benilla-config/`: an addon it ships is written into that folder's `AddOns/` and loads as any
|
||||
addon does.
|
||||
|
||||
benilla opens a piece of itself to such a crate only when its own 1.12.1 work creates that piece,
|
||||
never for the crate alone, and promises no stable API: a crate pins the benilla revision it
|
||||
builds on. What a crate cannot reach stays a fork's.
|
||||
Past `run_with` and that folder, benilla opens a piece of itself to such a crate only when its own
|
||||
1.12.1 work creates that piece, never for the crate alone, and promises no stable API: a crate
|
||||
pins the benilla revision it builds on. What a crate cannot reach stays a fork's.
|
||||
|
||||
## How a change is judged
|
||||
|
||||
|
||||
Reference in New Issue
Block a user