Add scripts to build for x86_64 linux too
This commit is contained in:
parent
60b7d4a531
commit
27145c758c
5 changed files with 138 additions and 11 deletions
100
Cargo.lock
generated
100
Cargo.lock
generated
|
|
@ -617,6 +617,21 @@ dependencies = [
|
|||
"want",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper-rustls"
|
||||
version = "0.22.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"hyper",
|
||||
"log",
|
||||
"rustls",
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper-tls"
|
||||
version = "0.5.0"
|
||||
|
|
@ -1323,6 +1338,7 @@ dependencies = [
|
|||
"http",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"hyper-rustls",
|
||||
"hyper-tls",
|
||||
"ipnet",
|
||||
"js-sys",
|
||||
|
|
@ -1332,18 +1348,36 @@ dependencies = [
|
|||
"native-tls",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustls",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-rustls",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"webpki-roots",
|
||||
"winreg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.16.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"spin",
|
||||
"untrusted",
|
||||
"web-sys",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rqbit"
|
||||
version = "1.1.0"
|
||||
|
|
@ -1357,11 +1391,23 @@ dependencies = [
|
|||
"parse_duration",
|
||||
"pretty_env_logger",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"size_format",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.19.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"log",
|
||||
"ring",
|
||||
"sct",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.5"
|
||||
|
|
@ -1396,6 +1442,16 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "sct"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "security-framework"
|
||||
version = "2.4.2"
|
||||
|
|
@ -1522,6 +1578,12 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spin"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.0"
|
||||
|
|
@ -1640,6 +1702,17 @@ dependencies = [
|
|||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-rustls"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
|
||||
dependencies = [
|
||||
"rustls",
|
||||
"tokio",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-stream"
|
||||
version = "0.1.7"
|
||||
|
|
@ -1788,6 +1861,12 @@ version = "0.2.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.2.2"
|
||||
|
|
@ -1966,6 +2045,25 @@ dependencies = [
|
|||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki"
|
||||
version = "0.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webpki-roots"
|
||||
version = "0.21.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940"
|
||||
dependencies = [
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
|
|
|
|||
34
Makefile
34
Makefile
|
|
@ -18,16 +18,42 @@ install: build-release
|
|||
$(MAKE) sign-release
|
||||
install target/release/rqbit "$(HOME)/bin/"
|
||||
|
||||
@PHONY: release-all
|
||||
release-all:
|
||||
@PHONY: release-macos-universal
|
||||
release-macos-universal:
|
||||
cargo build --target aarch64-apple-darwin --release
|
||||
cargo build --target x86_64-apple-darwin --release
|
||||
# brew install mingw-w64 for this to work
|
||||
lipo \
|
||||
./target/aarch64-apple-darwin/release/rqbit \
|
||||
./target/x86_64-apple-darwin/release/rqbit \
|
||||
-create \
|
||||
-output ./target/x86_64-apple-darwin/release/rqbit-osx-universal
|
||||
|
||||
@PHONY: release-windows
|
||||
release-windows:
|
||||
# prereqs:
|
||||
# brew install mingw-w64
|
||||
cargo build --target x86_64-pc-windows-gnu --release
|
||||
|
||||
@PHONY: release-linux
|
||||
release-linux:
|
||||
# prereqs:
|
||||
# brew tap messense/macos-cross-toolchains
|
||||
# brew install x86_64-unknown-linux-gnu
|
||||
# features are so that we don't need to cross-compile openssl
|
||||
export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc && \
|
||||
export CXX_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-g++ && \
|
||||
export AR_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-ar && \
|
||||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc && \
|
||||
cargo build --release --target=x86_64-unknown-linux-gnu --no-default-features \
|
||||
--features=sha1-rust,rust-tls
|
||||
|
||||
|
||||
@PHONY: release-all
|
||||
release-all: release-windows release-linux release-macos-universal
|
||||
rm -rf /tmp/rqbit-release
|
||||
mkdir -p /tmp/rqbit-release
|
||||
lipo ./target/aarch64-apple-darwin/release/rqbit ./target/x86_64-apple-darwin/release/rqbit -create -output /tmp/rqbit-release/rqbit-osx-universal
|
||||
cp ./target/x86_64-pc-windows-gnu/release/rqbit.exe /tmp/rqbit-release
|
||||
cp ./target/x86_64-apple-darwin/release/rqbit-osx-universal /tmp/rqbit-release
|
||||
cp ./target/x86_64-unknown-linux-gnu/release/rqbit /tmp/rqbit-release/rqbit-linux-x86_64
|
||||
|
||||
echo "The release was built in /tmp/rqbit-release"
|
||||
|
|
@ -9,7 +9,7 @@ edition = "2018"
|
|||
default = ["sha1-system"]
|
||||
sha1-system = ["sha1w/sha1-system"]
|
||||
sha1-openssl = ["sha1w/sha1-openssl"]
|
||||
sha1-rust = ["sha1w/sha1-openssl"]
|
||||
sha1-rust = ["sha1w/sha1-rust"]
|
||||
|
||||
[dependencies]
|
||||
serde = {version = "1", features=["derive"]}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ authors = ["Igor Katson <igor.katson@gmail.com>"]
|
|||
edition = "2018"
|
||||
|
||||
[features]
|
||||
default = ["sha1-system"]
|
||||
default = ["sha1-system", "default-tls"]
|
||||
sha1-system = ["sha1w/sha1-system"]
|
||||
sha1-openssl = ["sha1w/sha1-openssl"]
|
||||
sha1-rust = ["sha1w/sha1-openssl"]
|
||||
sha1-rust = ["sha1w/sha1-rust"]
|
||||
default-tls = ["reqwest/default-tls"]
|
||||
rust-tls = ["reqwest/rustls-tls"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
@ -28,7 +30,7 @@ serde_json = "1"
|
|||
anyhow = "1"
|
||||
|
||||
regex = "1"
|
||||
reqwest = "0.11"
|
||||
reqwest = {version="0.11", default-features=false}
|
||||
urlencoding = "1"
|
||||
byteorder = "1"
|
||||
bincode = "1"
|
||||
|
|
|
|||
|
|
@ -6,10 +6,12 @@ authors = ["Igor Katson <igor.katson@gmail.com>"]
|
|||
edition = "2018"
|
||||
|
||||
[features]
|
||||
default = ["sha1-system"]
|
||||
default = ["sha1-system", "default-tls"]
|
||||
sha1-system = ["librqbit/sha1-system"]
|
||||
sha1-openssl = ["librqbit/sha1-openssl"]
|
||||
sha1-rust = ["librqbit/sha1-rust"]
|
||||
default-tls = ["librqbit/default-tls"]
|
||||
rust-tls = ["librqbit/rust-tls"]
|
||||
|
||||
[dependencies]
|
||||
librqbit = {path="../librqbit", default-features=false}
|
||||
|
|
@ -19,7 +21,6 @@ anyhow = "1"
|
|||
clap = "3.0.0-beta.2"
|
||||
log = "0.4"
|
||||
pretty_env_logger = "0.4"
|
||||
reqwest = "0.11"
|
||||
regex = "1"
|
||||
futures = "0.3"
|
||||
parse_duration = "2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue