mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00

The coarsetime crate already had us limited to 10.12+, and the wheel had just not been updated to reflect that. Increased to 10.13, as that's the minimum the Qt 5.14 libraries support.
47 lines
1 KiB
Text
47 lines
1 KiB
Text
load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")
|
|
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
|
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
|
load("//rslib:rustfmt.bzl", "rustfmt_fix", "rustfmt_test")
|
|
|
|
cargo_build_script(
|
|
name = "build_script",
|
|
srcs = ["build.rs"],
|
|
)
|
|
|
|
rust_library(
|
|
name = "rsbridge",
|
|
srcs = ["lib.rs"],
|
|
crate_type = "cdylib",
|
|
rustc_flags = selects.with_or({
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-apple-darwin",
|
|
): [
|
|
"-Clink-arg=-undefined",
|
|
"-Clink-arg=dynamic_lookup",
|
|
"-Clink-arg=-mmacosx-version-min=10.13",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = [
|
|
"//pylib:__subpackages__",
|
|
],
|
|
deps = [
|
|
":build_script",
|
|
"//pylib/rsbridge/cargo:pyo3",
|
|
"//rslib:anki",
|
|
],
|
|
)
|
|
|
|
rustfmt_test(
|
|
name = "format_check",
|
|
srcs = glob([
|
|
"*.rs",
|
|
]),
|
|
)
|
|
|
|
rustfmt_fix(
|
|
name = "format",
|
|
srcs = glob([
|
|
"*.rs",
|
|
]),
|
|
)
|