Skip to content
This repository was archived by the owner on Dec 3, 2020. It is now read-only.

Commit f5bdad0

Browse files
committed
release to darwin and windows
1 parent f47af7e commit f5bdad0

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

Cargo.toml

+28-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ itertools = "0.9.0"
2525

2626
[dependencies.async-std]
2727
version = "1.5.0"
28+
features = ["unstable", "attributes"]
2829

2930
[features]
30-
suppport_int32_setting_type = ["multiwii_serial_protocol_v2/suppport_int32_setting_type", "async_msp_lib/suppport_int32_setting_type"]
31+
suppport_int32_setting_type = ["multiwii_serial_protocol_v2/suppport_int32_setting_type", "async_msp_lib/suppport_int32_setting_type"]
32+
33+
[tasks.clean]
34+
command = "cargo"
35+
args = ["clean"]
36+
37+
[tasks.release]
38+
command = "cargo"
39+
args = ["build", "--release"]
40+
dependencies = ["clean"]
41+
42+
[tasks.release-darwin]
43+
command = "docker"
44+
args = ["run", "--rm", "--volume", "${PWD}:/root/src", "--workdir", "/root/src", "joseluisq/rust-linux-darwin-builder:1.43.0", "cargo", "build", "--release", "--target", "x86_64-apple-darwin"]
45+
dependencies = ["clean"]
46+
47+
[tasks.release-windows]
48+
command = "cross"
49+
args = ["build", "--target", "x86_64-pc-windows-gnu", "--release"]
50+
dependencies = ["clean"]
51+
52+
[tasks.release-all]
53+
dependencies = [
54+
"release",
55+
"release-darwin",
56+
"release-windows",
57+
]

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,31 @@ binary will end up in `./target/release/async_msp_cli`.
119119

120120

121121
Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org).
122+
123+
124+
### Build
125+
126+
prerequisites
127+
128+
``` bash
129+
install docker
130+
cargo install cross
131+
cargo install --force cargo-make
132+
cargo make --makefile ./Cargo.toml release-darwin
133+
export PATH=$HOME/.cargo/bin:$PATH
134+
```
135+
136+
debug build
137+
```
138+
cargo build
139+
140+
```
141+
142+
build all relases
143+
```
144+
cargo make --makefile ./Cargo.toml release-all
145+
```
146+
147+
148+
149+

0 commit comments

Comments
 (0)