Skip to content

Commit db78e00

Browse files
committed
chore(#50): prepare MacOS intel/arm compilation
1 parent 9004d35 commit db78e00

File tree

5 files changed

+44
-90
lines changed

5 files changed

+44
-90
lines changed

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"rust-lang.rust-analyzer",
4+
"skellock.just"
5+
]
6+
}

Cargo.lock

Lines changed: 0 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ serde_json = "1.0"
2424
array2d = "0.3.0"
2525
ctrlc = "3.4.2"
2626
indexmap = "2.2.3"
27-
actix-web = "4.5.1"
27+
# Must opt out of compress-zstd, because it will fail cross compilation
28+
# list of actix-web features: https://docs.rs/actix-web/latest/actix_web/#crate-features
29+
actix-web = { version = "4.5.1", default-features = false, features = [
30+
"macros",
31+
"compress-gzip",
32+
] }
2833
actix-web-static-files = "4.0.1"
2934
static-files = "0.2.3"
3035
futures-util = "0.3.30"

PUBLISHING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Publishing
2+
3+
This document is reserved for the publishing part - you don't need it as a consumer or as a contributer, this is for me.
4+
5+
I share it because, some people might find it useful and other might find ways to improve it.
6+
7+
## Setup
8+
9+
### Just
10+
11+
You'll need the task runner [just](https://github.com/casey/just) - see the [install section](https://github.com/casey/just?tab=readme-ov-file#packages).
12+
13+
If you are on MacOS, you can install it with Homebrew:
14+
15+
```sh
16+
brew install just
17+
```
18+
19+
### Compilation targets
20+
21+
Whether you compiling from intel or arm, you will need to add the missing target - see the installed targets: `rustup target list|grep installed`.
22+
23+
```sh
24+
rustup target install x86_64-apple-darwin # if you're on arm and missing the intel target
25+
rustup target install aarch64-apple-darwin # if you're on intel and missing the arm target
26+
```

justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
default:
2+
@echo "Call just --list to see available tasks"
3+
build-x86-apple:
4+
cargo build --release --target x86_64-apple-darwin
5+
build-arm-apple:
6+
cargo build --release --target aarch64-apple-darwin

0 commit comments

Comments
 (0)