c521753057
* Add crate snafu * Replace all inline structs in AnkiError * Derive Snafu on AnkiError * Use snafu for card type errors * Use snafu whatever error for InvalidInput * Use snafu for NotFoundError and improve message * Use snafu for FileIoError to attach context Remove IoError. Add some context-attaching helpers to replace code returning bare io::Errors. * Add more context-attaching io helpers * Add message, context and backtrace to new snafus * Utilize error context and backtrace on frontend * Rename LocalizedError -> BackendError. * Remove DocumentedError. * Have all backend exceptions inherit BackendError. * Rename localized(_description) -> message * Remove accidentally committed experimental trait * invalid_input_context -> ok_or_invalid * ensure_valid_input! -> require! * Always return `Err` from `invalid_input!` Instead of a Result to unwrap, the macro accepts a source error now. * new_tempfile_in_parent -> new_tempfile_in_parent_of * ok_or_not_found -> or_not_found * ok_or_invalid -> or_invalid * Add crate convert_case * Use unqualified lowercase type name * Remove uses of snafu::ensure * Allow public construction of InvalidInputErrors (dae) Needed to port the AnkiDroid changes. * Make into_protobuf() public (dae) Also required for AnkiDroid. Not sure why it worked previously - possible bug in older Rust version?
155 lines
4.3 KiB
Plaintext
Vendored
155 lines
4.3 KiB
Plaintext
Vendored
"""
|
|
@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 = "native_tls_build_script",
|
|
srcs = glob(["**/*.rs"]),
|
|
build_script_env = {
|
|
},
|
|
crate_features = [
|
|
],
|
|
crate_root = "build.rs",
|
|
data = glob(["**"]),
|
|
edition = "2015",
|
|
rustc_flags = [
|
|
"--cap-lints=allow",
|
|
],
|
|
tags = [
|
|
"cargo-raze",
|
|
"manual",
|
|
],
|
|
version = "0.2.10",
|
|
visibility = ["//visibility:private"],
|
|
deps = [
|
|
] + selects.with_or({
|
|
# cfg(any(target_os = "macos", target_os = "ios"))
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-apple-darwin",
|
|
"@rules_rust//rust/platform:aarch64-apple-darwin",
|
|
"@rules_rust//rust/platform:aarch64-apple-ios",
|
|
"@rules_rust//rust/platform:x86_64-apple-ios",
|
|
): [
|
|
"@raze__security_framework_sys__2_6_1//:security_framework_sys",
|
|
],
|
|
"//conditions:default": [],
|
|
}) + selects.with_or({
|
|
# cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
|
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
|
|
): [
|
|
"@raze__openssl_sys__0_9_75//:openssl_sys",
|
|
],
|
|
"//conditions:default": [],
|
|
}) + selects.with_or({
|
|
# cfg(target_os = "windows")
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
|
|
): [
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
# Unsupported target "google-connect" with type "example" omitted
|
|
|
|
# Unsupported target "simple-server" with type "example" omitted
|
|
|
|
# Unsupported target "simple-server-pkcs8" with type "example" omitted
|
|
|
|
rust_library(
|
|
name = "native_tls",
|
|
srcs = glob(["**/*.rs"]),
|
|
aliases = {
|
|
},
|
|
crate_features = [
|
|
],
|
|
crate_root = "src/lib.rs",
|
|
data = [],
|
|
edition = "2015",
|
|
rustc_flags = [
|
|
"--cap-lints=allow",
|
|
],
|
|
tags = [
|
|
"cargo-raze",
|
|
"crate-name=native-tls",
|
|
"manual",
|
|
],
|
|
version = "0.2.10",
|
|
# buildifier: leave-alone
|
|
deps = [
|
|
":native_tls_build_script",
|
|
] + selects.with_or({
|
|
# cfg(any(target_os = "macos", target_os = "ios"))
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-apple-darwin",
|
|
"@rules_rust//rust/platform:aarch64-apple-darwin",
|
|
"@rules_rust//rust/platform:aarch64-apple-ios",
|
|
"@rules_rust//rust/platform:x86_64-apple-ios",
|
|
): [
|
|
"@raze__lazy_static__1_4_0//:lazy_static",
|
|
"@raze__libc__0_2_133//:libc",
|
|
"@raze__security_framework__2_7_0//:security_framework",
|
|
"@raze__security_framework_sys__2_6_1//:security_framework_sys",
|
|
"@raze__tempfile__3_3_0//:tempfile",
|
|
],
|
|
"//conditions:default": [],
|
|
}) + selects.with_or({
|
|
# cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
|
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
|
|
): [
|
|
"@raze__log__0_4_17//:log",
|
|
"@raze__openssl__0_10_41//:openssl",
|
|
"@raze__openssl_probe__0_1_5//:openssl_probe",
|
|
"@raze__openssl_sys__0_9_75//:openssl_sys",
|
|
],
|
|
"//conditions:default": [],
|
|
}) + selects.with_or({
|
|
# cfg(target_os = "windows")
|
|
(
|
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc",
|
|
): [
|
|
"@raze__schannel__0_1_20//:schannel",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|