mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
add strum crate
This commit is contained in:
parent
0207f6c0ab
commit
265e91c13f
8 changed files with 190 additions and 5 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -95,6 +95,7 @@ dependencies = [
|
||||||
"slog-async",
|
"slog-async",
|
||||||
"slog-envlogger",
|
"slog-envlogger",
|
||||||
"slog-term",
|
"slog-term",
|
||||||
|
"strum",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
"unic-langid",
|
"unic-langid",
|
||||||
|
@ -2344,6 +2345,27 @@ dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum"
|
||||||
|
version = "0.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c"
|
||||||
|
dependencies = [
|
||||||
|
"strum_macros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum_macros"
|
||||||
|
version = "0.20.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149"
|
||||||
|
dependencies = [
|
||||||
|
"heck",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.4.0"
|
version = "2.4.0"
|
||||||
|
|
|
@ -2371,6 +2371,26 @@ def raze_fetch_remote_crates():
|
||||||
build_file = Label("//cargo/remote:BUILD.string_cache_codegen-0.5.1.bazel"),
|
build_file = Label("//cargo/remote:BUILD.string_cache_codegen-0.5.1.bazel"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "raze__strum__0_20_0",
|
||||||
|
url = "https://crates.io/api/v1/crates/strum/0.20.0/download",
|
||||||
|
type = "tar.gz",
|
||||||
|
sha256 = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c",
|
||||||
|
strip_prefix = "strum-0.20.0",
|
||||||
|
build_file = Label("//cargo/remote:BUILD.strum-0.20.0.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "raze__strum_macros__0_20_1",
|
||||||
|
url = "https://crates.io/api/v1/crates/strum_macros/0.20.1/download",
|
||||||
|
type = "tar.gz",
|
||||||
|
sha256 = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149",
|
||||||
|
strip_prefix = "strum_macros-0.20.1",
|
||||||
|
build_file = Label("//cargo/remote:BUILD.strum_macros-0.20.1.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "raze__subtle__2_4_0",
|
name = "raze__subtle__2_4_0",
|
||||||
|
|
|
@ -2150,6 +2150,24 @@
|
||||||
"license_file": null,
|
"license_file": null,
|
||||||
"description": "A codegen library for string-cache, developed as part of the Servo project."
|
"description": "A codegen library for string-cache, developed as part of the Servo project."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "strum",
|
||||||
|
"version": "0.20.0",
|
||||||
|
"authors": "Peter Glotfelty <peter.glotfelty@microsoft.com>",
|
||||||
|
"repository": "https://github.com/Peternator7/strum",
|
||||||
|
"license": "MIT",
|
||||||
|
"license_file": null,
|
||||||
|
"description": "Helpful macros for working with enums and strings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "strum_macros",
|
||||||
|
"version": "0.20.1",
|
||||||
|
"authors": "Peter Glotfelty <peter.glotfelty@microsoft.com>",
|
||||||
|
"repository": "https://github.com/Peternator7/strum",
|
||||||
|
"license": "MIT",
|
||||||
|
"license_file": null,
|
||||||
|
"description": "Helpful macros for working with enums and strings"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "subtle",
|
"name": "subtle",
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
|
|
58
cargo/remote/BUILD.strum-0.20.0.bazel
vendored
Normal file
58
cargo/remote/BUILD.strum-0.20.0.bazel
vendored
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
"""
|
||||||
|
@generated
|
||||||
|
cargo-raze crate build file.
|
||||||
|
|
||||||
|
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||||
|
"""
|
||||||
|
|
||||||
|
# buildifier: disable=load
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_rust//rust:rust.bzl",
|
||||||
|
"rust_binary",
|
||||||
|
"rust_library",
|
||||||
|
"rust_test",
|
||||||
|
)
|
||||||
|
|
||||||
|
# buildifier: disable=load
|
||||||
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "strum",
|
||||||
|
srcs = glob(["**/*.rs"]),
|
||||||
|
crate_features = [
|
||||||
|
"derive",
|
||||||
|
"strum_macros",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
crate_type = "lib",
|
||||||
|
data = [],
|
||||||
|
edition = "2018",
|
||||||
|
proc_macro_deps = [
|
||||||
|
"@raze__strum_macros__0_20_1//:strum_macros",
|
||||||
|
],
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-raze",
|
||||||
|
"manual",
|
||||||
|
],
|
||||||
|
version = "0.20.0",
|
||||||
|
# buildifier: leave-alone
|
||||||
|
deps = [
|
||||||
|
],
|
||||||
|
)
|
57
cargo/remote/BUILD.strum_macros-0.20.1.bazel
vendored
Normal file
57
cargo/remote/BUILD.strum_macros-0.20.1.bazel
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
"""
|
||||||
|
@generated
|
||||||
|
cargo-raze crate build file.
|
||||||
|
|
||||||
|
DO NOT EDIT! Replaced on runs of cargo-raze
|
||||||
|
"""
|
||||||
|
|
||||||
|
# buildifier: disable=load
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_rust//rust:rust.bzl",
|
||||||
|
"rust_binary",
|
||||||
|
"rust_library",
|
||||||
|
"rust_test",
|
||||||
|
)
|
||||||
|
|
||||||
|
# buildifier: disable=load
|
||||||
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "strum_macros",
|
||||||
|
srcs = glob(["**/*.rs"]),
|
||||||
|
crate_features = [
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
crate_type = "proc-macro",
|
||||||
|
data = [],
|
||||||
|
edition = "2018",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-raze",
|
||||||
|
"manual",
|
||||||
|
],
|
||||||
|
version = "0.20.1",
|
||||||
|
# buildifier: leave-alone
|
||||||
|
deps = [
|
||||||
|
"@raze__heck__0_3_2//:heck",
|
||||||
|
"@raze__proc_macro2__1_0_24//:proc_macro2",
|
||||||
|
"@raze__quote__1_0_9//:quote",
|
||||||
|
"@raze__syn__1_0_62//:syn",
|
||||||
|
],
|
||||||
|
)
|
|
@ -66,9 +66,9 @@ rust_library(
|
||||||
compile_data = _anki_compile_data,
|
compile_data = _anki_compile_data,
|
||||||
crate_features = _anki_features,
|
crate_features = _anki_features,
|
||||||
proc_macro_deps = [
|
proc_macro_deps = [
|
||||||
|
"//rslib/cargo:async_trait",
|
||||||
"//rslib/cargo:serde_derive",
|
"//rslib/cargo:serde_derive",
|
||||||
"//rslib/cargo:serde_repr",
|
"//rslib/cargo:serde_repr",
|
||||||
"//rslib/cargo:async_trait",
|
|
||||||
],
|
],
|
||||||
rustc_env = _anki_rustc_env,
|
rustc_env = _anki_rustc_env,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
@ -113,6 +113,7 @@ rust_library(
|
||||||
"//rslib/cargo:slog_async",
|
"//rslib/cargo:slog_async",
|
||||||
"//rslib/cargo:slog_envlogger",
|
"//rslib/cargo:slog_envlogger",
|
||||||
"//rslib/cargo:slog_term",
|
"//rslib/cargo:slog_term",
|
||||||
|
"//rslib/cargo:strum",
|
||||||
"//rslib/cargo:tempfile",
|
"//rslib/cargo:tempfile",
|
||||||
"//rslib/cargo:tokio",
|
"//rslib/cargo:tokio",
|
||||||
"//rslib/cargo:unic_langid",
|
"//rslib/cargo:unic_langid",
|
||||||
|
|
|
@ -23,6 +23,9 @@ env_logger = "0.8.1"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# pinned as any changes could invalidate sqlite indexes
|
# pinned as any changes could invalidate sqlite indexes
|
||||||
unicase = "=2.6.0"
|
unicase = "=2.6.0"
|
||||||
|
# transitive dependency; 0.1.7 is currently broken on Windows (perhaps
|
||||||
|
# only in Bazel)
|
||||||
|
proc-macro-nested = "=0.1.6"
|
||||||
|
|
||||||
askama = "0.10.1"
|
askama = "0.10.1"
|
||||||
async-compression = { version = "0.3.5", features = ["stream", "gzip"] }
|
async-compression = { version = "0.3.5", features = ["stream", "gzip"] }
|
||||||
|
@ -75,10 +78,7 @@ unicode-normalization = "0.1.13"
|
||||||
utime = "0.3.1"
|
utime = "0.3.1"
|
||||||
zip = { version = "0.5.6", default-features = false, features = ["deflate", "time"] }
|
zip = { version = "0.5.6", default-features = false, features = ["deflate", "time"] }
|
||||||
async-trait = "0.1.42"
|
async-trait = "0.1.42"
|
||||||
|
|
||||||
# transitive dependency; 0.1.7 is currently broken on Windows (perhaps
|
|
||||||
# only in Bazel)
|
|
||||||
proc-macro-nested = "=0.1.6"
|
|
||||||
ammonia = "3.1.0"
|
ammonia = "3.1.0"
|
||||||
pulldown-cmark = "0.8.0"
|
pulldown-cmark = "0.8.0"
|
||||||
fnv = "1.0.7"
|
fnv = "1.0.7"
|
||||||
|
strum = { version = "0.20.0", features = ["derive"] }
|
||||||
|
|
|
@ -426,6 +426,15 @@ alias(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
alias(
|
||||||
|
name = "strum",
|
||||||
|
actual = "@raze__strum__0_20_0//:strum",
|
||||||
|
tags = [
|
||||||
|
"cargo-raze",
|
||||||
|
"manual",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
alias(
|
alias(
|
||||||
name = "tempfile",
|
name = "tempfile",
|
||||||
actual = "@raze__tempfile__3_2_0//:tempfile",
|
actual = "@raze__tempfile__3_2_0//:tempfile",
|
||||||
|
|
Loading…
Reference in a new issue