A CLI tool for developing, packaging, and hosting plugins for the Ito application.
cargo install --path .Scaffold a new plugin project. Supported types are manga, anime, and novel.
ito-pkg new <plugin-name> --type <type>
# Or use the short flag
ito-pkg new <plugin-name> -t <type>Example:
ito-pkg new my-manga-source -t mangaThis creates a new directory with:
Cargo.toml: Configured forcdylibcompilation.Cargo.lock: Generated withcargo generate-lockfile, becausepackbuilds with--locked.manifest.json: Plugin metadata.src/lib.rs: Starter code implementing the provider trait.
Navigate to your plugin directory and implement the required trait methods in src/lib.rs.
Add an icon to your plugin by placing an icon.png file in the project root.
Compile your plugin to WebAssembly and bundle it into an .ito file.
ito-pkg pack [--path <dir>] [--expect-abi <n>]The build runs cargo build --locked, so it fails instead of re-resolving a stale or missing
Cargo.lock (ito-pkg new generates one; commit it). With --expect-abi <n> (or
ITO_EXPECTED_ABI=<n>, where an empty value counts as unset), pack fails unless the compiled
module is built for ABI n.
Output:
target/wasm32-unknown-unknown/release/<name>.wasm: The compiled binary.<name>.ito: The final distributable package containing the Wasm binary, manifest, and icon.
pack reads the compiled module and records in the packaged manifest (not in your
manifest.json) what Ito needs to know before running it:
abi: the ABI version the plugin was built for (itsito_abi_versionexport; 1 for plugins built before the export existed).kinds: the media kinds the plugin serves (manga,anime,novel), from itsito_supported_kindsexport, which ABI 2 plugins must have.typestays your primary kind when it is one of them and becomes the first otherwise; older plugins serve theirtypealone.imports: every host function the plugin imports, asmodule.name.sdk: the ito-rs version fromCargo.lock.
It refuses a module that imports functions no Ito host provides, a module with a start section (code that would run at instantiation, outside any export), and an ABI 2 or later module that names no known kind. The repository index carries the same fields, so Ito can refuse a plugin it can't run before downloading it.
Check the contents and validity of an .ito file: the manifest, that main.wasm imports only
functions Ito hosts provide, and that the manifest's abi, kinds, type and imports match
the module. Unlike older versions, verify fails when the manifest has no abi or imports.
ito-pkg verify <path-to-ito-file> [--expect-abi <n>]With --expect-abi <n> (or ITO_EXPECTED_ABI=<n>), verify also fails unless main.wasm is
built for ABI n.
Organize multiple .ito files into a static repository structure that the Ito app can consume.
# Create a folder for your built plugins
mkdir plugins
mv *.ito plugins/
# Build the repository
ito-pkg repo --input plugins --output public --url "http://localhost:8080"This generates:
public/index.json: Repository index.public/index.min.json: Minified index.public/packages/: Directory containing.itofiles.public/icons/: Directory containing extracted icons.
repo refuses any package whose manifest has no abi, so a package that was not built by
ito-pkg pack can't reach the index.
Host your repository locally for testing.
ito-pkg serve --path public --port 8080Add http://localhost:8080/index.json to the Ito app to install your plugins.