3 个不稳定版本

0.2.0 2024 年 2 月 22 日
0.1.1 2023 年 12 月 15 日
0.1.0 2023 年 9 月 25 日

10#entrypoint


用于 entrypoint

MIT 许可证

12KB
121 代码行

entrypoint_macros

Crates.io Crates.io Documentation License

此crate不应直接导入,而应通过entrypointmacros功能访问。

贡献

在执行任何其他操作之前:打开一个问题


lib.rs:

宏以提高entrypoint的易用性

此crate不应直接导入,而应通过entrypointmacros功能访问。

示例

use entrypoint::prelude::*;

#[derive(clap::Parser, DotEnvDefault, LoggerDefault, Debug)]
struct Args {}

// this function replaces `main()`
#[entrypoint::entrypoint]
fn main(args: Args) -> entrypoint::anyhow::Result<()> {
    info!("entrypoint input args: {:#?}", args);
    Ok(())
}

依赖关系

~305–760KB
~18K SLoC