Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/codedcosmos/cross-compile-example
- Owner: codedcosmos
- License: cc0-1.0
- Created: 2022-02-06T04:15:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-06T04:47:07.000Z (almost 3 years ago)
- Last Synced: 2024-10-15T09:08:57.439Z (3 months ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```