diff --git a/Cargo.lock b/Cargo.lock index 83fadda30..cb2824b7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,6 +103,7 @@ dependencies = [ "unicode-normalization", "utime", "zip", + "zstd", ] [[package]] @@ -276,6 +277,9 @@ name = "cc" version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -1178,6 +1182,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.55" @@ -3314,3 +3327,32 @@ dependencies = [ "thiserror", "time", ] + +[[package]] +name = "zstd" +version = "0.10.0+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1365becbe415f3f0fcd024e2f7b45bacfb5bdd055f0dc113571394114e7bdd" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "4.1.4+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f7cd17c9af1a4d6c24beb1cc54b17e2ef7b593dc92f19e9d9acad8b182bbaee" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "1.6.3+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" +dependencies = [ + "cc", + "libc", +] diff --git a/cargo/BUILD.bazel b/cargo/BUILD.bazel index 5b2f76210..92f81d68c 100644 --- a/cargo/BUILD.bazel +++ b/cargo/BUILD.bazel @@ -561,6 +561,15 @@ alias( ], ) +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +) + # Export file for Stardoc support exports_files( [ diff --git a/cargo/crates.bzl b/cargo/crates.bzl index f253078e7..33f7dd693 100644 --- a/cargo/crates.bzl +++ b/cargo/crates.bzl @@ -1041,6 +1041,16 @@ def raze_fetch_remote_crates(): build_file = Label("//cargo/remote:BUILD.itoa-1.0.1.bazel"), ) + maybe( + http_archive, + name = "raze__jobserver__0_1_24", + url = "https://crates.io/api/v1/crates/jobserver/0.1.24/download", + type = "tar.gz", + sha256 = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa", + strip_prefix = "jobserver-0.1.24", + build_file = Label("//cargo/remote:BUILD.jobserver-0.1.24.bazel"), + ) + maybe( http_archive, name = "raze__js_sys__0_3_55", @@ -3110,6 +3120,36 @@ def raze_fetch_remote_crates(): strip_prefix = "zip-0.5.13", build_file = Label("//cargo/remote:BUILD.zip-0.5.13.bazel"), ) + + maybe( + http_archive, + name = "raze__zstd__0_10_0_zstd_1_5_2", + url = "https://crates.io/api/v1/crates/zstd/0.10.0+zstd.1.5.2/download", + type = "tar.gz", + sha256 = "3b1365becbe415f3f0fcd024e2f7b45bacfb5bdd055f0dc113571394114e7bdd", + strip_prefix = "zstd-0.10.0+zstd.1.5.2", + build_file = Label("//cargo/remote:BUILD.zstd-0.10.0+zstd.1.5.2.bazel"), + ) + + maybe( + http_archive, + name = "raze__zstd_safe__4_1_4_zstd_1_5_2", + url = "https://crates.io/api/v1/crates/zstd-safe/4.1.4+zstd.1.5.2/download", + type = "tar.gz", + sha256 = "2f7cd17c9af1a4d6c24beb1cc54b17e2ef7b593dc92f19e9d9acad8b182bbaee", + strip_prefix = "zstd-safe-4.1.4+zstd.1.5.2", + build_file = Label("//cargo/remote:BUILD.zstd-safe-4.1.4+zstd.1.5.2.bazel"), + ) + + maybe( + http_archive, + name = "raze__zstd_sys__1_6_3_zstd_1_5_2", + url = "https://crates.io/api/v1/crates/zstd-sys/1.6.3+zstd.1.5.2/download", + type = "tar.gz", + sha256 = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8", + strip_prefix = "zstd-sys-1.6.3+zstd.1.5.2", + build_file = Label("//cargo/remote:BUILD.zstd-sys-1.6.3+zstd.1.5.2.bazel"), + ) maybe( new_git_repository, diff --git a/cargo/licenses.json b/cargo/licenses.json index 53de5fb19..a56827032 100644 --- a/cargo/licenses.json +++ b/cargo/licenses.json @@ -836,6 +836,15 @@ "license_file": null, "description": "Fast integer primitive to string conversion" }, + { + "name": "jobserver", + "version": "0.1.24", + "authors": "Alex Crichton ", + "repository": "https://github.com/alexcrichton/jobserver-rs", + "license": "Apache-2.0 OR MIT", + "license_file": null, + "description": "An implementation of the GNU make jobserver for Rust" + }, { "name": "js-sys", "version": "0.3.55", @@ -2536,5 +2545,32 @@ "license": "MIT", "license_file": null, "description": "Library to support the reading and writing of zip files." + }, + { + "name": "zstd", + "version": "0.10.0+zstd.1.5.2", + "authors": "Alexandre Bury ", + "repository": "https://github.com/gyscos/zstd-rs", + "license": "MIT", + "license_file": null, + "description": "Binding for the zstd compression library." + }, + { + "name": "zstd-safe", + "version": "4.1.4+zstd.1.5.2", + "authors": "Alexandre Bury ", + "repository": "https://github.com/gyscos/zstd-rs", + "license": "Apache-2.0 OR MIT", + "license_file": null, + "description": "Safe low-level bindings for the zstd compression library." + }, + { + "name": "zstd-sys", + "version": "1.6.3+zstd.1.5.2", + "authors": "Alexandre Bury ", + "repository": "https://github.com/gyscos/zstd-rs", + "license": "Apache-2.0 OR MIT", + "license_file": null, + "description": "Low-level bindings for the zstd compression library." } ] diff --git a/cargo/remote/BUILD.cc-1.0.72.bazel b/cargo/remote/BUILD.cc-1.0.72.bazel index 724138942..f35bc7b1e 100644 --- a/cargo/remote/BUILD.cc-1.0.72.bazel +++ b/cargo/remote/BUILD.cc-1.0.72.bazel @@ -37,6 +37,8 @@ rust_binary( name = "cargo_bin_gcc_shim", srcs = glob(["**/*.rs"]), crate_features = [ + "jobserver", + "parallel", ], crate_root = "src/bin/gcc-shim.rs", data = [], @@ -53,6 +55,7 @@ rust_binary( # buildifier: leave-alone deps = [ ":cc", + "@raze__jobserver__0_1_24//:jobserver", ], ) @@ -60,6 +63,8 @@ rust_library( name = "cc", srcs = glob(["**/*.rs"]), crate_features = [ + "jobserver", + "parallel", ], crate_root = "src/lib.rs", data = [], @@ -75,6 +80,7 @@ rust_library( version = "1.0.72", # buildifier: leave-alone deps = [ + "@raze__jobserver__0_1_24//:jobserver", ], ) diff --git a/cargo/remote/BUILD.jobserver-0.1.24.bazel b/cargo/remote/BUILD.jobserver-0.1.24.bazel new file mode 100644 index 000000000..0ada35afe --- /dev/null +++ b/cargo/remote/BUILD.jobserver-0.1.24.bazel @@ -0,0 +1,79 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT OR Apache-2.0" +]) + +# Generated Targets + +rust_library( + name = "jobserver", + srcs = glob(["**/*.rs"]), + aliases = { + }, + crate_features = [ + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=jobserver", + "manual", + ], + version = "0.1.24", + # buildifier: leave-alone + deps = [ + ] + selects.with_or({ + # cfg(unix) + ( + "@rules_rust//rust/platform:x86_64-apple-darwin", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + "@rules_rust//rust/platform:aarch64-apple-darwin", + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:x86_64-apple-ios", + ): [ + "@raze__libc__0_2_112//:libc", + ], + "//conditions:default": [], + }), +) + +# Unsupported target "client" with type "test" omitted + +# Unsupported target "client-of-myself" with type "test" omitted + +# Unsupported target "helper" with type "test" omitted + +# Unsupported target "make-as-a-client" with type "test" omitted + +# Unsupported target "server" with type "test" omitted diff --git a/cargo/remote/BUILD.zstd-0.10.0+zstd.1.5.2.bazel b/cargo/remote/BUILD.zstd-0.10.0+zstd.1.5.2.bazel new file mode 100644 index 000000000..285f465c0 --- /dev/null +++ b/cargo/remote/BUILD.zstd-0.10.0+zstd.1.5.2.bazel @@ -0,0 +1,68 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT" +]) + +# Generated Targets + +# Unsupported target "benchmark" with type "example" omitted + +# Unsupported target "stream" with type "example" omitted + +# Unsupported target "train" with type "example" omitted + +# Unsupported target "zstd" with type "example" omitted + +# Unsupported target "zstdcat" with type "example" omitted + +rust_library( + name = "zstd", + srcs = glob(["**/*.rs"]), + crate_features = [ + "arrays", + "default", + "legacy", + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=zstd", + "manual", + ], + version = "0.10.0+zstd.1.5.2", + # buildifier: leave-alone + deps = [ + "@raze__zstd_safe__4_1_4_zstd_1_5_2//:zstd_safe", + ], +) diff --git a/cargo/remote/BUILD.zstd-safe-4.1.4+zstd.1.5.2.bazel b/cargo/remote/BUILD.zstd-safe-4.1.4+zstd.1.5.2.bazel new file mode 100644 index 000000000..80bebea02 --- /dev/null +++ b/cargo/remote/BUILD.zstd-safe-4.1.4+zstd.1.5.2.bazel @@ -0,0 +1,93 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT OR Apache-2.0" +]) + +# Generated Targets +# buildifier: disable=out-of-order-load +# buildifier: disable=load-on-top +load( + "@rules_rust//cargo:cargo_build_script.bzl", + "cargo_build_script", +) + +cargo_build_script( + name = "zstd_safe_build_script", + srcs = glob(["**/*.rs"]), + build_script_env = { + }, + crate_features = [ + "arrays", + "legacy", + "std", + ], + crate_root = "build.rs", + data = glob(["**"]), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "manual", + ], + version = "4.1.4+zstd.1.5.2", + visibility = ["//visibility:private"], + deps = [ + "@raze__zstd_sys__1_6_3_zstd_1_5_2//:zstd_sys", + ], +) + +rust_library( + name = "zstd_safe", + srcs = glob(["**/*.rs"]), + crate_features = [ + "arrays", + "legacy", + "std", + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=zstd-safe", + "manual", + ], + version = "4.1.4+zstd.1.5.2", + # buildifier: leave-alone + deps = [ + ":zstd_safe_build_script", + "@raze__libc__0_2_112//:libc", + "@raze__zstd_sys__1_6_3_zstd_1_5_2//:zstd_sys", + ], +) diff --git a/cargo/remote/BUILD.zstd-sys-1.6.3+zstd.1.5.2.bazel b/cargo/remote/BUILD.zstd-sys-1.6.3+zstd.1.5.2.bazel new file mode 100644 index 000000000..cded8b130 --- /dev/null +++ b/cargo/remote/BUILD.zstd-sys-1.6.3+zstd.1.5.2.bazel @@ -0,0 +1,91 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", + "rust_proc_macro", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # MIT from expression "MIT OR Apache-2.0" +]) + +# Generated Targets +# buildifier: disable=out-of-order-load +# buildifier: disable=load-on-top +load( + "@rules_rust//cargo:cargo_build_script.bzl", + "cargo_build_script", +) + +cargo_build_script( + name = "zstd_sys_build_script", + srcs = glob(["**/*.rs"]), + build_script_env = { + }, + crate_features = [ + "legacy", + "std", + ], + crate_root = "build.rs", + data = glob(["**"]), + edition = "2018", + links = "zstd", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "manual", + ], + version = "1.6.3+zstd.1.5.2", + visibility = ["//visibility:private"], + deps = [ + "@raze__cc__1_0_72//:cc", + ], +) + +rust_library( + name = "zstd_sys", + srcs = glob(["**/*.rs"]), + crate_features = [ + "legacy", + "std", + ], + crate_root = "src/lib.rs", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "crate-name=zstd-sys", + "manual", + ], + version = "1.6.3+zstd.1.5.2", + # buildifier: leave-alone + deps = [ + ":zstd_sys_build_script", + "@raze__libc__0_2_112//:libc", + ], +) diff --git a/pylib/rsbridge/cargo/BUILD.bazel b/pylib/rsbridge/cargo/BUILD.bazel index 1d4c107e7..bfc43280a 100644 --- a/pylib/rsbridge/cargo/BUILD.bazel +++ b/pylib/rsbridge/cargo/BUILD.bazel @@ -560,3 +560,12 @@ alias( "manual", ], ) + +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +) diff --git a/rslib/BUILD.bazel b/rslib/BUILD.bazel index b5f3b8eda..f466860a5 100644 --- a/rslib/BUILD.bazel +++ b/rslib/BUILD.bazel @@ -116,6 +116,7 @@ rust_library( "//rslib/cargo:unic_ucd_category", "//rslib/cargo:utime", "//rslib/cargo:zip", + "//rslib/cargo:zstd", "//rslib/cargo:pct_str", "//rslib/i18n:anki_i18n", ] + select({ diff --git a/rslib/Cargo.toml b/rslib/Cargo.toml index e3d9393b7..be6401990 100644 --- a/rslib/Cargo.toml +++ b/rslib/Cargo.toml @@ -97,3 +97,4 @@ tokio-util = { version = "0.6.8", features = ["io"] } pct-str = { git="https://github.com/timothee-haudebourg/pct-str.git", rev="4adccd8d4a222ab2672350a102f06ae832a0572d" } unic-ucd-category = "0.9.0" id_tree = "1.8.0" +zstd = "0.10.0+zstd.1.5.2" diff --git a/rslib/cargo/BUILD.bazel b/rslib/cargo/BUILD.bazel index 1d4c107e7..bfc43280a 100644 --- a/rslib/cargo/BUILD.bazel +++ b/rslib/cargo/BUILD.bazel @@ -560,3 +560,12 @@ alias( "manual", ], ) + +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +) diff --git a/rslib/i18n/cargo/BUILD.bazel b/rslib/i18n/cargo/BUILD.bazel index 1d4c107e7..bfc43280a 100644 --- a/rslib/i18n/cargo/BUILD.bazel +++ b/rslib/i18n/cargo/BUILD.bazel @@ -560,3 +560,12 @@ alias( "manual", ], ) + +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +) diff --git a/rslib/i18n_helpers/cargo/BUILD.bazel b/rslib/i18n_helpers/cargo/BUILD.bazel index 1d4c107e7..bfc43280a 100644 --- a/rslib/i18n_helpers/cargo/BUILD.bazel +++ b/rslib/i18n_helpers/cargo/BUILD.bazel @@ -560,3 +560,12 @@ alias( "manual", ], ) + +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +) diff --git a/rslib/linkchecker/cargo/BUILD.bazel b/rslib/linkchecker/cargo/BUILD.bazel index 1d4c107e7..bfc43280a 100644 --- a/rslib/linkchecker/cargo/BUILD.bazel +++ b/rslib/linkchecker/cargo/BUILD.bazel @@ -560,3 +560,12 @@ alias( "manual", ], ) + +alias( + name = "zstd", + actual = "@raze__zstd__0_10_0_zstd_1_5_2//:zstd", + tags = [ + "cargo-raze", + "manual", + ], +)