All Projects → sgeisler → Cargo Remote

sgeisler / Cargo Remote

Licence: mit
cargo subcommand to compile rust projects remotely

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Cargo Remote

Shadow Rs
A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
Stars: ✭ 117 (+34.48%)
Mutual labels:  build, cargo
cargo-limit
Cargo with less noise: warnings are skipped until errors are fixed, Neovim integration, etc.
Stars: ✭ 105 (+20.69%)
Mutual labels:  build, cargo
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+928.74%)
Mutual labels:  build, cargo
Cargo Contribute
Cargo subcommand for contributing to your dependencies
Stars: ✭ 56 (-35.63%)
Mutual labels:  cargo
Tarpaulin
A code coverage tool for Rust projects
Stars: ✭ 1,097 (+1160.92%)
Mutual labels:  cargo
Cols Agent Tasks
Colin's ALM Corner Custom Build Tasks
Stars: ✭ 70 (-19.54%)
Mutual labels:  build
Postinstall Build
Helper for conditionally building your npm package on postinstall
Stars: ✭ 87 (+0%)
Mutual labels:  build
Vim Crates
Handle Cargo dependencies like a Rustavimean.
Stars: ✭ 54 (-37.93%)
Mutual labels:  cargo
Irext
Universal IR Remote Control Solution
Stars: ✭ 1,240 (+1325.29%)
Mutual labels:  remote
Awesome Online Earning
💰Ways to earn extra
Stars: ✭ 70 (-19.54%)
Mutual labels:  remote
Rust Python Ext
Distutils helpers for rust Python extensions
Stars: ✭ 69 (-20.69%)
Mutual labels:  cargo
Ansible Phoenix Build
Sample app with full build and deploy setup of a Phoenix app using ansible
Stars: ✭ 59 (-32.18%)
Mutual labels:  build
Scritch
A small CLI to help you write sharable scripts for your team
Stars: ✭ 74 (-14.94%)
Mutual labels:  build
Simple Mpv Webui
A web based user interface with controls for the mpv mediaplayer.
Stars: ✭ 58 (-33.33%)
Mutual labels:  remote
Auxpack
A dashboard for monitoring Webpack build stats.
Stars: ✭ 86 (-1.15%)
Mutual labels:  build
Remote jobs
A list of websites to find remote dev jobs.
Stars: ✭ 55 (-36.78%)
Mutual labels:  remote
Projectbuilder
A tool for easy automating and customizing build process for Unity.
Stars: ✭ 80 (-8.05%)
Mutual labels:  build
Nat
nat - the 'ls' replacement you never knew you needed
Stars: ✭ 1,129 (+1197.7%)
Mutual labels:  cargo
Ip Kvm Interface
DIY IP-KVM for Remote Desktop Access
Stars: ✭ 62 (-28.74%)
Mutual labels:  remote
Sshremotekeys
Managing SSH keys remotely to control access to hosts
Stars: ✭ 70 (-19.54%)
Mutual labels:  remote

Cargo Remote

Use with caution, I didn't test this software well and it is a really hacky (at least for now). If you want to test it please create a VM or at least a separate user on your build host

Why I built it

One big annoyance when working on rust projects on my notebook are the compile times. Since I'm using rust nightly for some of my projects I have to recompile rather often. Currently there seem to be no good remote-build integrations for rust, so I decided to build one my own.

Planned capabilities

This first version is very simple (could have been a bash script), but I intend to enhance it to a point where it detects compatibility between local and remote versions, allows (nearly) all cargo commands and maybe even load distribution over multiple machines.

Usage

For now only cargo remote [FLAGS] [OPTIONS] <command> works: it copies the current project to a temporary directory (~/remote-builds/<project_name>) on the remote server, calls cargo <command> remotely and optionally (-c) copies back the resulting target folder. This assumes that server and client are running the same rust version and have the same processor architecture. On the client ssh and rsync need to be installed.

If you want to pass remote flags you have to end the options/flags section using --. E.g. to build in release mode and copy back the result use:

cargo remote -c -- build --release

Configuration

You can place a config file called .cargo-remote.toml in the same directory as your Cargo.toml or at ~/.config/cargo-remote/cargo-remote.toml. There you can define a default remote build host and user. It can be overridden by the -r flag.

Example config file:

remote = "[email protected]"

Flags and options

USAGE:
    cargo remote [FLAGS] [OPTIONS] <command> [remote options]...

FLAGS:
    -c, --copy-back          Transfer the target folder back to the local machine
        --help               Prints help information
    -h, --transfer-hidden    Transfer hidden files and directories to the build server
    -V, --version            Prints version information

OPTIONS:
    -b, --build-env <build_env>              Set remote environment variables. RUST_BACKTRACE, CC, LIB, etc.  [default:
                                             RUST_BACKTRACE=1]
    -e, --env <env>                          Environment profile. default_value = /etc/profile [default: /etc/profile]
        --manifest-path <manifest_path>      Path to the manifest to execute [default: Cargo.toml]
    -r, --remote <remote>                    Remote ssh build server
    -d, --rustup-default <rustup_default>    Rustup default (stable|beta|nightly) [default: stable]

ARGS:
    <command>              cargo command that will be executed remotely
    <remote options>...    cargo options and flags that will be applied remotely

How to install

git clone https://github.com/sgeisler/cargo-remote
cargo install --path cargo-remote/

MacOS Problems

It was reported that the rsync version shipped with MacOS doesn't support the progress flag and thus fails when cargo-remote tries to use it. You can install a newer version by running

brew install rsync

See also #10.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].