Cross-compilation instructions
This commit is contained in:
22
README.md
22
README.md
@@ -115,6 +115,28 @@ cargo fmt
|
||||
cargo clippy
|
||||
```
|
||||
|
||||
## Cross-Compilation
|
||||
|
||||
To build a Linux x86_64 binary from macOS:
|
||||
|
||||
1. Install [cargo-zigbuild](https://github.com/rust-cross/cargo-zigbuild) and [Zig](https://ziglang.org/):
|
||||
```bash
|
||||
cargo install cargo-zigbuild
|
||||
brew install zig
|
||||
```
|
||||
|
||||
2. Add the Linux target:
|
||||
```bash
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
3. Build:
|
||||
```bash
|
||||
cargo zigbuild --release --target x86_64-unknown-linux-gnu
|
||||
```
|
||||
|
||||
The binary will be at `target/x86_64-unknown-linux-gnu/release/log_ingest`.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user