graphql-engine/v3/crates/lang-graphql/Cargo.toml
Samir Talwar 5d619a540f Replace lazy_static with stdlib equivalents. (#758)
### What

The `lazy_static` macro is poorly maintained, fairly bloated, and has
been mostly superseded by
[`OnceLock`](https://doc.rust-lang.org/stable/std/sync/struct.OnceLock.html)
in the stdlib.

### How

1. I turned a couple of `static ref` values into `const`, sometimes by
creating `const fn` equivalents to other functions.
2. I inlined static behavior to construct a JSON pointer into some
tests, where we don't care too much about losing a few milliseconds.
3. For the rest, I replaced `lazy_static` with a `static OnceLock` and a
call to `OnceLock::get_or_init`.

V3_GIT_ORIGIN_REV_ID: 18e4150a5fb24fe71f6ed77fe6178b7942405aa3
2024-06-26 12:45:41 +00:00

58 lines
1.3 KiB
TOML

[package]
name = "lang-graphql"
version.workspace = true
edition.workspace = true
license.workspace = true
[lib]
bench = false
[[bench]]
name = "lexer"
harness = false
[[bench]]
name = "parser"
harness = false
[[bench]]
name = "validation"
harness = false
[[bench]]
name = "schema_serde"
harness = false
[dependencies]
recursion_limit_macro = { path = "../utils/recursion_limit_macro" }
axum = { workspace = true }
http = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
lexical-core = { workspace = true }
nonempty = { workspace = true, features = ["serialize"] }
schemars = { workspace = true, features = ["smol_str"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_with = { workspace = true }
smol_str = { workspace = true }
thiserror = { workspace = true }
[dev-dependencies]
anyhow = { workspace = true }
apollo-parser = { workspace = true }
async-graphql-parser = { workspace = true }
bincode = { workspace = true }
bson = { workspace = true }
criterion = { workspace = true, features = ["html_reports"] }
diffy = { workspace = true }
expect-test = { workspace = true }
graphql-parser = { workspace = true }
human_bytes = { workspace = true }
postcard = { workspace = true, features = ["use-std"] }
pretty_assertions = { workspace = true }
rmp-serde = { workspace = true }
[lints]
workspace = true