Add static vc runtime

This commit is contained in:
ByteDream 2022-11-30 19:25:21 +01:00
parent 6ecd23bcd0
commit 12d49a27e4
3 changed files with 9 additions and 3 deletions

6
Cargo.lock generated
View file

@ -269,6 +269,7 @@ dependencies = [
"clap_complete", "clap_complete",
"clap_mangen", "clap_mangen",
"crunchy-cli-core", "crunchy-cli-core",
"static_vcruntime",
"tokio", "tokio",
] ]
@ -297,7 +298,7 @@ dependencies = [
[[package]] [[package]]
name = "crunchyroll-rs" name = "crunchyroll-rs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3e9f7bfaab68649ecdb486aee0b15fe658d51917" source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3d455ebca34cfa83df39777f3e1414cee4f84002"
dependencies = [ dependencies = [
"aes", "aes",
"cbc", "cbc",
@ -313,14 +314,13 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"smart-default", "smart-default",
"static_vcruntime",
"tokio", "tokio",
] ]
[[package]] [[package]]
name = "crunchyroll-rs-internal" name = "crunchyroll-rs-internal"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3e9f7bfaab68649ecdb486aee0b15fe658d51917" source = "git+https://github.com/crunchy-labs/crunchyroll-rs#3d455ebca34cfa83df39777f3e1414cee4f84002"
dependencies = [ dependencies = [
"darling", "darling",
"quote", "quote",

View file

@ -28,6 +28,9 @@ clap_mangen = "0.2"
# specified in this Cargo.toml [features]. # specified in this Cargo.toml [features].
crunchy-cli-core = { path = "./crunchy-cli-core", features = ["static-curl", "static-ssl"] } crunchy-cli-core = { path = "./crunchy-cli-core", features = ["static-curl", "static-ssl"] }
[target.'cfg(all(windows, target_env = "msvc"))'.build-dependencies]
static_vcruntime = "2.0"
[profile.release] [profile.release]
strip = true strip = true
opt-level = "z" opt-level = "z"

View file

@ -3,6 +3,9 @@ use clap_complete::shells;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
fn main() -> std::io::Result<()> { fn main() -> std::io::Result<()> {
#[cfg(all(windows, target_env = "msvc"))]
static_vcruntime::metabuild();
// note that we're using an anti-pattern here / violate the rust conventions. build script are // note that we're using an anti-pattern here / violate the rust conventions. build script are
// not supposed to write outside of 'OUT_DIR'. to have the generated files in the build "root" // not supposed to write outside of 'OUT_DIR'. to have the generated files in the build "root"
// (the same directory where the output binary lives) is much simpler than in 'OUT_DIR' since // (the same directory where the output binary lives) is much simpler than in 'OUT_DIR' since