Skip to content

Commit

Permalink
Use zigbuild for cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
RMcTn committed Sep 17, 2023
1 parent c303dc5 commit fbc332c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
21 changes: 16 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ Pulls emails, postcodes, and addresses to check from the sqlite database file gi

```
brew install geckodriver
brew install zig
cargo install cargo-zigbuild
```

Run ```geckodriver``` before running the program



## Required ENV vars
See https://docs.aws.amazon.com/ses/latest/dg/setting-up.html for AWS related credentials

Expand Down
2 changes: 2 additions & 0 deletions build-for-x64-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
cargo zigbuild --target x86_64-unknown-linux-gnu --release
3 changes: 1 addition & 2 deletions deploy_to_host.sh → deploy_binary_to_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
if [ -z $1 ]; then
echo "Need to provide a host";
else
scp -r Cargo.toml Cargo.lock build.rs docker-compose.yml Dockerfile root@$1:/root/what-bin-is-it
scp -r scraper bin_stuff server migrations .sqlx root@$1:/root/what-bin-is-it
scp -r ./target/x86_64-unknown-linux-gnu/release/server root@$1:/root/what-bin-is-it/
fi
1 change: 1 addition & 0 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ scraper = { path = "../scraper" }
log = "0.4.20"
env_logger = "0.10.0"
clokwerk = "0.4.0"
openssl = { version = "0.10.57", features = ["vendored"] } # Need to vendor for cross compiling

0 comments on commit fbc332c

Please sign in to comment.