Skip to main content

Crate shuyi

Crate shuyi 

Source
Expand description

Shuyi Engine, by its front door (ADR-0009 §6). A game depends on this crate alone and turns on the features of the modules it wants, each off by default; docs/modules.md lists them by concern, and shuyi add <module> turns one on.

  • core, assets, ui, platform and app: the default engine’s crates, shuyi-core to shuyi-app, under short names (app, the macroquad backend, on every target but WASI, which has no window, and with its feature, on by default; a game on a device without std turns the default features off);
  • prelude: what a game on the short path names, with run_game;
  • enabled_modules: the Module of each module turned on, which the game installs once.

Re-exports§

pub use shuyi_app as app;
pub use shuyi_assets as assets;
pub use shuyi_core as core;
pub use shuyi_platform as platform;
pub use shuyi_ui as ui;

Modules§

prelude
What a game on the short path names (ADR-0036): shuyi-platform’s prelude, and run_game, which runs it from a plain main.

Functions§

enabled_modules
The Module of each module whose feature is on, made with its defaults, in the catalog’s order: empty with no feature on. A game installs them once, with Game::with_modules or BasicGame::modules, so turning a module on needs no change to its code. A module that needs arguments is not here: the game installs it, as its README says.