fidius-cli Rust¶
Structs¶
fidius-cli::Cli¶
private
Derives: Parser
Fields¶
| Name | Type | Description |
|---|---|---|
command |
Commands |
Enums¶
fidius-cli::Commands private¶
Variants¶
InitInterface- Scaffold a new plugin interface crateInitPlugin- Scaffold a new plugin implementation crateInitHost- Scaffold a new host application crate that uses the typed ClientKeygen- Generate an Ed25519 signing keypairSign- Sign a plugin dylibVerify- Verify a plugin dylib signatureInspect- Inspect a plugin dylib's registryTest- Smoke-test a plugin: build, load, and invoke each method with a zero-arg inputPackage- Package management commandsPythonStub- Generate a Python stub for an interface trait so a Python plugin author has type-hinted method signatures plus the matching__interface_hash__constant.Wit- Generate the WIT for a WASM plugin crate from its source (thebuild.rsfidius_build::emit_wit()does this automatically; this is for CI/manual use).
fidius-cli::PackageCommands private¶
Variants¶
Validate- Validate a package manifestBuild- Build a package (compile the cdylib)Inspect- Inspect a package manifestSign- Sign a package manifestVerify- Verify a package manifest signaturePack- Pack a package directory into a .fid archiveUnpack- Unpack a .fid archive
Functions¶
fidius-cli::main¶
private
Source
fn main() {
let cli = Cli::parse();
let result = match cli.command {
Commands::InitInterface {
name,
trait_name,
path,
version,
extension,
} => commands::init_interface(
&name,
&trait_name,
path.as_deref(),
version.as_deref(),
extension.as_deref(),
),
Commands::InitPlugin {
name,
interface,
trait_name,
path,
version,
} => commands::init_plugin(
&name,
&interface,
&trait_name,
path.as_deref(),
version.as_deref(),
),
Commands::InitHost {
name,
interface,
trait_name,
path,
version,
} => commands::init_host(
&name,
&interface,
&trait_name,
path.as_deref(),
version.as_deref(),
),
Commands::Keygen { out } => commands::keygen(&out),
Commands::Sign { key, dylib } => commands::sign(&key, &dylib),
Commands::Verify { key, dylib } => commands::verify(&key, &dylib),
Commands::Inspect { dylib } => commands::inspect(&dylib),
Commands::Test { dir, debug } => commands::test(&dir, !debug),
Commands::Package { command } => match command {
PackageCommands::Validate { dir } => commands::package_validate(&dir),
PackageCommands::Build { dir, debug } => commands::package_build(&dir, !debug),
PackageCommands::Inspect { dir } => commands::package_inspect(&dir),
PackageCommands::Sign { key, dir } => commands::package_sign(&key, &dir),
PackageCommands::Verify { key, dir } => commands::package_verify(&key, &dir),
PackageCommands::Pack {
dir,
output,
precompile,
} => commands::package_pack(&dir, output.as_deref(), precompile),
PackageCommands::Unpack { archive, dest } => {
commands::package_unpack(&archive, dest.as_deref())
}
},
Commands::PythonStub {
interface,
out,
trait_name,
} => commands::python_stub(&interface, &out, trait_name.as_deref()),
Commands::Wit { dir } => commands::wit(dir.as_deref()),
};
if let Err(e) = result {
eprintln!("error: {e}");
process::exit(1);
}
}