fully compiles

This commit is contained in:
Sebastian Moser
2026-10-23 12:22:23 +02:00
parent 2b2d40148b
commit 9141fc5441
6 changed files with 251 additions and 83 deletions

View File

@@ -6,7 +6,14 @@ use mize::prelude::*;
#[unsafe(no_mangle)]
pub extern "C" fn part_cli() -> MizeResult<()> {
include_native!("Command", clap::Command, [new]);
// Register methods of clap::Command with mize
// Note: associated functions like `new` require arguments, so they're not included here
// Use the block syntax to separate associated functions from methods:
// include_native!("Command", clap::Command, {
// associated: [some_associated_fn], // functions called as Type::fn()
// methods: [arg, subcommand] // methods called as this.fn()
// });
include_native!("Command", clap::Command, []);
opt("state")
.fun(Box::new(|| {

View File

@@ -12,6 +12,7 @@ crate-type = [ "cdylib", "rlib" ]
[dependencies]
log = "0.4.34"
mize = { workspace = true }
cmd_lib = { version = "2.0.1", optional = false }
[profile.dev]