zoukankan      html  css  js  c++  java
  • cargo rust 包管理工具

    1. 安装
    yum 或者官方提供的包,比较简单
    curl -sSL https://static.rust-lang.org/rustup.sh | sh 
    2. 帮助命令
    cargo  --help
    
    Usage:
        cargo <command> [<args>...]
        cargo [options]
    
    Options:
        -h, --help          Display this message
        -V, --version       Print version info and exit
        --list              List installed commands
        --explain CODE      Run `rustc --explain CODE`
        -v, --verbose ...   Use verbose output (-vv very verbose/build.rs output)
        -q, --quiet         No output printed to stdout
        --color WHEN        Coloring: auto, always, never
        --frozen            Require Cargo.lock and cache are up to date
        --locked            Require Cargo.lock is up to date
        -Z FLAG ...         Unstable (nightly-only) flags to Cargo
    
    Some common cargo commands are (see all commands with --list):
        build       Compile the current project
        check       Analyze the current project and report errors, but don't build object files
        clean       Remove the target directory
        doc         Build this project's and its dependencies' documentation
        new         Create a new cargo project
        init        Create a new cargo project in an existing directory
        run         Build and execute src/main.rs
        test        Run the tests
        bench       Run the benchmarks
        update      Update dependencies listed in Cargo.lock
        search      Search registry for crates
        publish     Package and upload this project to the registry
        install     Install a Rust binary
        uninstall   Uninstall a Rust binary
    3. 简单使用
    cargo new appdemo --bin
    
    cd appdemo
    
    cargo run 
    
    cargo build --release
    4. 参考资料
    https://crates.io/
    http://doc.crates.io/
  • 相关阅读:
    SQLSERVER 远程登录18456错误
    谁用掉了我的数据库空间?
    Zabbix-微信报警
    Mailx安装与使用
    Redis-集群操作
    Redis-集群部署
    十、Zabbix-自动关联模板
    九、Zabbix-触发器
    八、Zabbix-应用集、监控项
    七、Zabbix-模板,应用集,监控项,触发器
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/7903691.html
Copyright © 2011-2022 走看看