| 0.3.0 |  | 
|---|---|
| 0.2.0 |  | 
| 0.1.0 |  | 
| 0.0.1 |  | 
| 0.0.0 |  | 
#64 在 #pack
6KB
106 代码行
cargo-app
cargo子命令,用于将二进制文件打包成MacOS .app包
安装
建议使用cargo install进行安装
cargo install cargo-app
以更新到最新版本
cargo install cargo-app --force
用法
USAGE:
    cargo-app [SUBCOMMAND]
FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
SUBCOMMANDS:
    help    Prints this message or the help of the given subcommand(s)
    pack    Generate .app bundle according to configs in Cargo.toml
示例
根据Cargo.toml中的配置生成.app包
cargo app
配置
[package.metadata.app]
# path to the bundle, defaults to {{package_name}}.app
out         = "yo.app"
# path to the binary file, defaults to "target/x86_64-apple-darwin/release/{{package_name}}"
bin          = "yo"
# name of the bundle
name         = "yo"
# display name of the bundle
display_name = "YO"
# bundle identifier
identifier   = "com.company.yo"
# path of the bundle icon file
icon         = "icon.icns"
# bundle version
version      = "0.0.0"
# paths to copy to the Resources folder
resources    = []
# paths to copy to the Frameworks folder
frameworks   = []
依赖
~5MB
~90K SLoC