Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/codedcosmos/cross-compile-example

A cross compile example in Rust
https://github.com/codedcosmos/cross-compile-example

Last synced: about 2 months ago
JSON representation

A cross compile example in Rust

Awesome Lists containing this project

README

        

# Cross Compile Example
### Cross compiles C++ & GLFW with Rust, to Arm/x86 linux x64
(And Hopefully windows via mingw)

This currently doesn't work and I'm uploading it early so I can share it and get some assistance.

### Setup Commands
```
rustup target add x86_64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-pc-windows-gnu
```

```
sudo apt install libssl-dev libglfw3 libglfw3-dev clang gcc g++ cmake build-essential
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
```

### Running
Build - Linux 64-bit x86
```
cargo build --release --target x86_64-unknown-linux-gnu
```

Build - Linux 64-bit ARM
```
cargo build --release --target aarch64-unknown-linux-gnu
```

Build - Windows 64-bit x86
```
cargo build --release --target x86_64-pc-windows-gnu
```