Skip to content

Instantly share code, notes, and snippets.

@Scoubi
Last active February 7, 2024 18:34
Show Gist options
  • Save Scoubi/20b99c424e446227cb07c5da5b4a3ad4 to your computer and use it in GitHub Desktop.
Save Scoubi/20b99c424e446227cb07c5da5b4a3ad4 to your computer and use it in GitHub Desktop.

Revisions

  1. Scoubi revised this gist Dec 25, 2023. 3 changed files with 19 additions and 19 deletions.
    16 changes: 0 additions & 16 deletions Linux
    Original file line number Diff line number Diff line change
    @@ -1,16 +0,0 @@
    1. brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu
    1. brew install x86_64-linux-gnu-binutils
    1. rustup target add x86_64-unknown-linux-gnu
    1. Edit ~/.cargo/config and add
    ```
    [target.x86_64-unknown-linux-gnu]
    linker = "x86_64-unknown-linux-gnu-gcc"
    ```
    1. source ~/.cargo/config
    1. Edit Cargo.toml and include OpenSSL crate dependency **This is the part missing from many how-to**
    ```
    [dependencies]
    openssl = { version = "0.10", features = ["vendored"] }
    ```

    cargo build --target x86_64-unknown-linux-gnu --release
    16 changes: 16 additions & 0 deletions Linux.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    1. `brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu`
    2. `brew install x86_64-linux-gnu-binutils`
    3. `rustup target add x86_64-unknown-linux-gnu`
    4. Edit `~/.cargo/config` and add
    ```
    [target.x86_64-unknown-linux-gnu]
    linker = "x86_64-unknown-linux-gnu-gcc"
    ```
    5. `source ~/.cargo/config`
    6. Edit `Cargo.toml` and include OpenSSL crate dependency **This is the part missing from many how-to**
    ```
    [dependencies]
    openssl = { version = "0.10", features = ["vendored"] }
    ```

    cargo build --target x86_64-unknown-linux-gnu --release
    6 changes: 3 additions & 3 deletions Windows → Windows.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    1. brew install mingw-w64
    1. `brew install mingw-w64`
    1. I think I needed to install cmake
    `brew install cmake`
    1. Edit ~/.cargo/config and add
    1. Edit `~/.cargo/config` and add
    ```
    [target.x86_64-pc-windows-gnu]
    linker = "x86_64-w64-mingw32-gcc"
    ```
    1. source ~/.cargo/config
    4. `source ~/.cargo/config`

    cargo build --target=x86_64-pc-windows-gnu --release
  2. Scoubi created this gist Dec 21, 2023.
    16 changes: 16 additions & 0 deletions Linux
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    1. brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu
    1. brew install x86_64-linux-gnu-binutils
    1. rustup target add x86_64-unknown-linux-gnu
    1. Edit ~/.cargo/config and add
    ```
    [target.x86_64-unknown-linux-gnu]
    linker = "x86_64-unknown-linux-gnu-gcc"
    ```
    1. source ~/.cargo/config
    1. Edit Cargo.toml and include OpenSSL crate dependency **This is the part missing from many how-to**
    ```
    [dependencies]
    openssl = { version = "0.10", features = ["vendored"] }
    ```

    cargo build --target x86_64-unknown-linux-gnu --release
    11 changes: 11 additions & 0 deletions Windows
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    1. brew install mingw-w64
    1. I think I needed to install cmake
    `brew install cmake`
    1. Edit ~/.cargo/config and add
    ```
    [target.x86_64-pc-windows-gnu]
    linker = "x86_64-w64-mingw32-gcc"
    ```
    1. source ~/.cargo/config

    cargo build --target=x86_64-pc-windows-gnu --release