Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 2.26 KB

README.md

File metadata and controls

59 lines (50 loc) · 2.26 KB

cargo-docker

Simple rust compiler with lede cross platform sdk using docker. It is single bash script, that uses docker.io/maron/cargo-lede-sdk docker image to compile rust project in pwd.

Install:

sudo sh -c 'curl "https://raw.githubusercontent.com/maroun2/cargo-docker/main/cargo-docker" > /usr/local/bin/cargo-docker && chmod +x /usr/local/bin/cargo-docker'

Usage:

$ cargo-docker

Output:

Rust's package manager

USAGE:
    cargo [+toolchain] [OPTIONS] [SUBCOMMAND]

OPTIONS:
    -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                 Do not print cargo log messages
        --color <WHEN>          Coloring: auto, always, never
        --frozen                Require Cargo.lock and cache are up to date
        --locked                Require Cargo.lock is up to date
        --offline               Run without accessing the network
        --config <KEY=VALUE>    Override a configuration value (unstable)
    -Z <FLAG>                   Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for
                                details
    -h, --help                  Print help information

Some common cargo commands are (see all commands with --list):
    build, b    Compile the current package
    check, c    Analyze the current package and report errors, but don't build object files
    clean       Remove the target directory
    doc, d      Build this package's and its dependencies' documentation
    new         Create a new cargo package
    init        Create a new cargo package in an existing directory
    run, r      Run a binary or example of the local package
    test, t     Run the tests
    bench       Run the benchmarks
    update      Update dependencies listed in Cargo.lock
    search      Search registry for crates
    publish     Package and upload this package to the registry
    install     Install a Rust binary. Default location is $HOME/.cargo/bin
    uninstall   Uninstall a Rust binary

Uninstall

sudo sh -c 'curl "rm /usr/local/bin/cargo-docker && docker rmi maron/cargo-lede-sdk:1.60.0'