Expand description
The engine’s modules as the tools read them (ADR-0009 §2, §4, §6),
for modules and add (crate::contract::modules,
crate::contract::add):
Concerns: the concerns a game answers and their answers, the engine’sdocs/modules.ron;ModuleInfo: what a module’s crate says it answers, its[package.metadata.shuyi], read with its crate into aModuleCrate;Catalog: the two read from an engine checkout, with its skill pack, andengine_root, which finds the checkout a game builds with;- a game’s
Cargo.toml: theshuyifeatures it has on (features_on), and one more turned on (turn_on); - a module’s package folder: the first paragraph of its README
(
readme_paragraph) and its skill (skill_of,copy_skill).
A module’s feature of the shuyi crate is its crate’s name without
shuyi- (feature_of).
Structs§
- Answered
- One concern a module answers, and its answer.
- Catalog
- What the tools know of an engine checkout: its concerns, the modules it builds and its skill pack.
- Choice
- One answer to a concern.
- Concern
- A question every game answers one way or another.
- Concerns
- The concerns a game answers,
docs/modules.ron. - Module
Crate - A module’s crate: its name, its package folder and its metadata.
- Module
Info - A module’s
[package.metadata.shuyi](ADR-0009 §4): what it answers, what it is built for, and what it sits beside.
Enums§
- Skill
Copy - What
copy_skilldid. - Status
- Whether an answer or a module is built.
Constants§
- CONCERNS
- The concerns, from the engine’s root.
- DEFAULT_
CRATES - The crates of the default engine, which are no modules.
- SKILLS
- Where a game keeps its agent’s skills, from its folder.
Functions§
- copy_
skill - Copies the skill folder
skillinto the skills of the game atgameasname: its regular files, at any depth (a link is skipped). - engine_
root - The engine checkout the game at
gamebuilds with: the folder above theshuyicrate itsCargo.tomlnames by path, or else the one cargo resolved it to (cargo metadata, run through theCARGOvariable). - feature_
of - The feature of the
shuyicrate that turns on modulename: its name withoutshuyi-(physics). - features_
on - The features of the
shuyicrate aCargo.toml’s text turns on. - installs_
modules - Whether a Rust file of the game at
game(outsidetarget/and hidden folders) namesshuyi::enabled_modules, which installs the modules its features turn on. - module_
of - The module that feature
featureof theshuyicrate turns on. - modules_
of_ features - The modules the
shuyicrate’sCargo.toml(manifest) has a feature for, one a feature butdefault, by name, with no metadata. - readme_
paragraph - The first paragraph of the README in package folder
dir, after its title: what the module is for (ADR-0009 §4). - skill_
of - The skill of the module
namein package folderdir: its ownskill/folder, or the one named for it in the skill pack of the repository it is in (skills/<name>, two folders up), whichever holds aSKILL.md. - turn_on
- A
Cargo.toml’s text with featurefeatureof theshuyicrate turned on, its layout kept;Noneif it is already on.