Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created May 13, 2016 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveklabnik/0b2736642ddd4669260bd7fbb9a70787 to your computer and use it in GitHub Desktop.
Save steveklabnik/0b2736642ddd4669260bd7fbb9a70787 to your computer and use it in GitHub Desktop.
$ uname -a
Linux my-machine 3.16.0-4-amd64
$ rustup target add x86_64-unknown-linux-muslinfo: downloading component 'rust-std' for 'x86_64-unknown-linux-musl'
13.6 MiB / 13.6 MiB (100 %) 3.4 MiB/s ETA: 0 s
info: installing component 'rust-std' for 'x86_64-unknown-linux-musl'
$ cargo new --bin hello-world
$ cd hello-world
$ cargo build --target=x86_64-unknown-linux-musl
Compiling hello-world v0.1.0 (file:///home/steve/tmp/hello-world)
$ ldd target/x86_64-unknown-linux-musl/debug/hello-world
not a dynamic executable
$ scp target/x86_64-unknown-linux-musl/debug/hello-world other-host:hello-world
hello-world 100% 622KB 621.9KB/s 00:00
$ ssh other-host
$ uname -a
Linux other-host 3.2.0-4-amd64
$ ./hello-world
Hello, world!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment