enshwick 1.0.0-alpha.11

The Enshwick Loader's modding API for Enshrouded: the one crate mods are written against
Documentation

enshwick

The modding API of Enshwick Loader for Enshrouded, and the one crate a mod depends on. A mod is a DLL that implements enshwick::Mod, links its hooks while the loader initialises it, and runs inside the game or the dedicated server once the loader arms them.

struct Hello;

impl enshwick::Mod for Hello {
    fn manifest() -> &'static enshwick::abi::Manifest {
        enshwick::manifest!(id: "you.hello", side: SERVER)
    }

    fn init(_load: &mut enshwick::Load<'_>) -> Result<Self, enshwick::Off> {
        enshwick::info!("hello from the server");
        Ok(Self)
    }
}

enshwick::declare_mod!(Hello);

With the test feature, enshwick::test is a fake loader for a mod's unit tests; turn it on under [dev-dependencies] only. The macros come from enshwick-macros, an internal crate this one re-exports. See the modding book.

Licensed under MIT.