sgeisler / cargo-remote Goto Github PK
View Code? Open in Web Editor NEWcargo subcommand to compile rust projects remotely
License: MIT License
cargo subcommand to compile rust projects remotely
License: MIT License
This is awesome! Thank you. How do I compile this with catflap and cargo watch for continuous builds?
Note that the version flag of rsync that comes with OSX by default errors out on the --info=progress2 flag, so you have to call it with env PATH=/usr/bin/local:$PATH cargo remote -r user@build-server build
Cargo remote seems to be expecting the target directory to be in the current crate's directory. In a workspace the target directory is in the workspace root. This is causing build failure when building a workspace.
E.g. I need to set PKG_CONFIG_ALLOW_CROSS=1 on remote host to specify --target=...
Hi @sgeisler ,
I have download cargo-remote source code and compiled it, there is an error:
error[E0433]: failed to resolve: could not find `BaseDirectories` in `xdg`
--> src\config.rs:69:41
|
69 | if let Some(config_file) = xdg::BaseDirectories::with_prefix("cargo-remote")
| ^^^^^^^^^^^^^^^ could not find `BaseDirectories` in `xdg`
Would you like to take a look at this, thanks a lot.
OS: Windows 10
Cargo: 1.52.0
would be very nice having cargo
(and maybe rls
and rustc
, later) used with usual syntax but remotely. That need providing proxy executables.
rustup
already does similar thing: proxy-ing different toolchains.
cargo-remote could ideally just add another toolcahain representing the remote one.
Also that would provide all IDEs with the remote power at no cost.
I have a bunch of binary resources in my project folder because reasons, which I don't want to transfer to the remote target. How can I exclude them?
Hello,
currently, there is no way to pass to cargo remote
via cmd line a path to RSA identity key. This implies the default one (ie in most cases ~/.ssh/id_rsa
) is chosen by cargo remote
when ssh
to a remote server. But sometimes one needs to have the possibility to use a non-default RSA identity file (e.g. user can have more than one such file in ~/.ssh
).
Therefore proposed feature would be to add -i <file>
cmd line flag to cargo remote
and add logic that passes it as -i <file>
to ssh
under the hood. Also, it'd be nice to have support to add a setting like ident = <path>
to cargo-remote.toml
file (and cmd line param overwrites it).
Marcin
help says:
cargo remote [FLAGS] [OPTIONS] <command> [remote options]...
but
$ cargo remote build --message-format human
error: Found argument '--message-format' which wasn't expected, or isn't valid in this context
it seems that putting --
helps a bit
Dependencies which lie in folders outside the project aren't transferred to the building machine.
This case is useful for working with local versions of dependencies, e.g. for debugging. It is possible to just copy outer folder into the project, but sometimes not that easy, e.g. when both projects use workspaces.
Steps to reproduce:
$ cargo init main
$ cargo init dep
$ echo 'dep = { path = "../dep" }' >> main/Cargo.toml
$ cd main/
$ cargo build
Compiling main v0.1.0 (/home/kirill/Code/Parity/tmp/main)
Finished dev [unoptimized + debuginfo] target(s) in 0.23s
$ cargo remote -r build-host -- build
2020-02-25 15:59:13,538 INFO [cargo_remote] Project dir: "/home/kirill/Code/Parity/tmp/main"
2020-02-25 15:59:13,538 INFO [cargo_remote] Transferring sources to build server.
501 100% 36.01kB/s 0:00:00 (xfr#3, to-chk=0/5)
2020-02-25 15:59:13,751 INFO [cargo_remote] Build ENV: "RUST_BACKTRACE=1"
2020-02-25 15:59:13,751 INFO [cargo_remote] Environment profile: "/etc/profile"
2020-02-25 15:59:13,751 INFO [cargo_remote] Build path: "~/remote-builds/18053543074719935937/"
2020-02-25 15:59:13,751 INFO [cargo_remote] Starting build process.
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.41.0 (5e1a79984 2020-01-27)
error: failed to load source for a dependency on `dep`
Caused by:
Unable to update /home/kirillt/remote-builds/dep
Caused by:
failed to read `/home/kirillt/remote-builds/dep/Cargo.toml`
Caused by:
No such file or directory (os error 2)
Connection to 192.168.2.5 closed.
2020-02-25 15:59:14,025 INFO [cargo_remote] Transferring Cargo.lock file back to client.
0 0% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/1)
Great project! I'm trying to get it to work and I ran into the cargo install missing crti.o and Scrt1.o, the solution was to install libc6-dev via apt. Just thought I'd let you know so you can add that to the README
The thing what really helped cargo-remote
to work on macos is
brew install rsync
The patch #3 didn't help at all. Neither before nor after brew install rsync
.
Please follow @kianenigma advice there.
why pointing Environment profile: "/etc/profile" instead of "source $HOME/.cargo/env" just like https://www.rust-lang.org suggests?
thank you!
I am trying to use the program however I do not know how to specify the port used for communication. It seems to always be 22 but the port for connection is 23. How do I change it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.