mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
And some supporting changes: * crane: It removed its dependency on nixpkgs and made overrideToolchain take a function for splicing reasons, but we're doing splicing ourselves so we can just ignore the function argument. These changes are in `flake.nix`. * [NixOS/nixpkgs#347228][0]: linkerFor* were removed because the linker no longer needs to be different in some edge cases. Based on the diff of the PR that introduced this change, ccFor* are the proper replacements. These changes are in `cross-compilation-env.nix` in the compiler-and-linker-choosing section. * [NixOS/nixpkgs#350299][1]: buildPlatform isn't at the top level anymore, we have to go through stdenv now. These changes are in `nix/shell.nix`. * rocksdb: nixpkgs has 9.6.1 now so we need to upgrade our rust library to use the matching version. These changes are in `Cargo.toml`, `Cargo.lock`, `nix/pkgs/default/default.nix`, and `cross-compilation-env.nix` in the linker flags section. [0]: https://github.com/NixOS/nixpkgs/pull/347228 [1]: https://github.com/NixOS/nixpkgs/pull/350299 Flake lock file updates: • Updated input 'attic': 'github:zhaofengli/attic/4dbdbee45728d8ce5788db6461aaaa89d98081f0' (2024-03-29) → 'github:zhaofengli/attic/48c8b395bfbc6b76c7eae74df6c74351255a095c' (2024-10-30) • Updated input 'attic/crane': 'github:ipetkov/crane/7195c00c272fdd92fc74e7d5a0a2844b9fadb2fb' (2023-12-18) → 'github:ipetkov/crane/4c6c77920b8d44cd6660c1621dea6b3fc4b4c4f4' (2024-08-06) • Updated input 'attic/flake-compat': 'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17) → 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04) • Added input 'attic/flake-parts': 'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01) • Added input 'attic/flake-parts/nixpkgs-lib': follows 'attic/nixpkgs' • Removed input 'attic/flake-utils' • Updated input 'attic/nixpkgs': 'github:NixOS/nixpkgs/07262b18b97000d16a4bdb003418bd2fb067a932' (2024-03-25) → 'github:NixOS/nixpkgs/159be5db480d1df880a0135ca0bfed84c2f88353' (2024-09-11) • Updated input 'attic/nixpkgs-stable': 'github:NixOS/nixpkgs/44733514b72e732bd49f5511bd0203dea9b9a434' (2024-03-26) → 'github:NixOS/nixpkgs/797f7dc49e0bc7fab4b57c021cdf68f595e47841' (2024-08-22) • Added input 'attic/nix-github-actions': 'github:nix-community/nix-github-actions/e04df33f62cdcf93d73e9a04142464753a16db67' (2024-10-24) • Added input 'attic/nix-github-actions/nixpkgs': follows 'attic/nixpkgs' • Updated input 'crane': 'github:ipetkov/crane/109987da061a1bf452f435f1653c47511587d919' (2024-05-24) → 'github:ipetkov/crane/498d9f122c413ee1154e8131ace5a35a80d8fa76' (2024-10-27) • Removed input 'crane/nixpkgs' • Updated input 'fenix': 'github:nix-community/fenix/b6fc5035b28e36a98370d0eac44f4ef3fd323df6' (2024-05-22) → 'github:nix-community/fenix/87b4d20f896c99018dde4702a9c6157b516f2a76' (2024-11-01) • Updated input 'fenix/rust-analyzer-src': 'github:rust-lang/rust-analyzer/21ec8f523812b88418b2bfc64240c62b3dd967bd' (2024-05-19) → 'github:rust-lang/rust-analyzer/0ba893e1a00d92557ac91efb771d72eee36ca687' (2024-10-31) • Updated input 'flake-utils': 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a' (2024-09-17) • Updated input 'nix-filter': 'github:numtide/nix-filter/3342559a24e85fc164b295c3444e8a139924675b' (2024-03-11) → 'github:numtide/nix-filter/776e68c1d014c3adde193a18db9d738458cd2ba4' (2024-10-29) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/5710852ba686cc1fd0d3b8e22b3117d43ba374c2' (2024-05-21) → 'github:NixOS/nixpkgs/807e9154dcb16384b1b765ebe9cd2bba2ac287fd' (2024-10-29)
169 lines
5.7 KiB
TOML
169 lines
5.7 KiB
TOML
# Keep alphabetically sorted
|
|
[workspace.lints.rust]
|
|
elided_lifetimes_in_paths = "warn"
|
|
explicit_outlives_requirements = "warn"
|
|
macro_use_extern_crate = "warn"
|
|
missing_abi = "warn"
|
|
noop_method_call = "warn"
|
|
single_use_lifetimes = "warn"
|
|
unreachable_pub = "warn"
|
|
unsafe_op_in_unsafe_fn = "warn"
|
|
unused_extern_crates = "warn"
|
|
unused_import_braces = "warn"
|
|
unused_lifetimes = "warn"
|
|
unused_macro_rules = "warn"
|
|
unused_qualifications = "warn"
|
|
|
|
[workspace.lints.clippy]
|
|
# Groups. Keep alphabetically sorted
|
|
pedantic = { level = "warn", priority = -1 }
|
|
|
|
# Lints. Keep alphabetically sorted
|
|
as_conversions = "warn"
|
|
assertions_on_result_states = "warn"
|
|
dbg_macro = "warn"
|
|
default_union_representation = "warn"
|
|
deref_by_slicing = "warn"
|
|
empty_drop = "warn"
|
|
empty_structs_with_brackets = "warn"
|
|
error_impl_error = "warn"
|
|
filetype_is_file = "warn"
|
|
float_cmp_const = "warn"
|
|
format_push_string = "warn"
|
|
get_unwrap = "warn"
|
|
if_then_some_else_none = "warn"
|
|
impl_trait_in_params = "warn"
|
|
let_underscore_must_use = "warn"
|
|
lossy_float_literal = "warn"
|
|
mem_forget = "warn"
|
|
missing_assert_message = "warn"
|
|
mod_module_files = "warn"
|
|
multiple_inherent_impl = "warn"
|
|
mutex_atomic = "warn"
|
|
negative_feature_names = "warn"
|
|
pub_without_shorthand = "warn"
|
|
rc_buffer = "warn"
|
|
rc_mutex = "warn"
|
|
redundant_feature_names = "warn"
|
|
redundant_type_annotations = "warn"
|
|
ref_patterns = "warn"
|
|
rest_pat_in_fully_bound_structs = "warn"
|
|
same_name_method = "warn"
|
|
semicolon_inside_block = "warn"
|
|
str_to_string = "warn"
|
|
string_add = "warn"
|
|
string_lit_chars_any = "warn"
|
|
string_slice = "warn"
|
|
string_to_string = "warn"
|
|
suspicious_xor_used_as_pow = "warn"
|
|
tests_outside_test_module = "warn"
|
|
try_err = "warn"
|
|
undocumented_unsafe_blocks = "warn"
|
|
unnecessary_safety_comment = "warn"
|
|
unnecessary_safety_doc = "warn"
|
|
unnecessary_self_imports = "warn"
|
|
unneeded_field_pattern = "warn"
|
|
unseparated_literal_suffix = "warn"
|
|
verbose_file_reads = "warn"
|
|
wildcard_dependencies = "warn"
|
|
|
|
# TODO: Remove these:
|
|
missing_errors_doc = "allow"
|
|
missing_panics_doc = "allow"
|
|
|
|
[package]
|
|
name = "grapevine"
|
|
description = "A Matrix homeserver written in Rust"
|
|
license = "Apache-2.0"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
# See also `rust-toolchain.toml`
|
|
rust-version = "1.81.0"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
# Keep sorted
|
|
[dependencies]
|
|
argon2 = "0.5.3"
|
|
async-trait = "0.1.82"
|
|
axum = { version = "0.7.6", default-features = false, features = ["form", "http1", "http2", "json", "matched-path", "tokio", "tracing"] }
|
|
axum-extra = { version = "0.9.4", features = ["typed-header"] }
|
|
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
|
|
base64 = "0.22.1"
|
|
bytes = "1.7.2"
|
|
clap = { version = "4.5.18", default-features = false, features = ["std", "derive", "help", "usage", "error-context", "string", "wrap_help"] }
|
|
futures-util = { version = "0.3.30", default-features = false }
|
|
hmac = "0.12.1"
|
|
html-escape = "0.2.13"
|
|
http = "1.1.0"
|
|
http-body-util = "0.1.2"
|
|
hyper = "1.4.1"
|
|
hyper-util = { version = "0.1.8", features = ["client", "client-legacy", "service"] }
|
|
image = { version = "0.25.2", default-features = false, features = ["jpeg", "png", "gif"] }
|
|
jsonwebtoken = "9.3.0"
|
|
lru-cache = "0.1.2"
|
|
num_cpus = "1.16.0"
|
|
once_cell = "1.19.0"
|
|
opentelemetry = "0.24.0"
|
|
opentelemetry-jaeger-propagator = "0.3.0"
|
|
opentelemetry-otlp = "0.17.0"
|
|
opentelemetry-prometheus = "0.17.0"
|
|
opentelemetry_sdk = { version = "0.24.0", features = ["rt-tokio"] }
|
|
parking_lot = { version = "0.12.3", optional = true }
|
|
phf = { version = "0.11.2", features = ["macros"] }
|
|
pin-project-lite = "0.2.14"
|
|
prometheus = "0.13.4"
|
|
proxy-header = { version = "0.1.2", features = ["tokio"] }
|
|
rand = "0.8.5"
|
|
regex = "1.10.6"
|
|
reqwest = { version = "0.12.7", default-features = false, features = ["http2", "rustls-tls-native-roots", "socks"] }
|
|
ring = "0.17.8"
|
|
rocksdb = { package = "rust-rocksdb", version = "0.30.0", features = ["lz4", "multi-threaded-cf", "zstd"], optional = true }
|
|
ruma = { git = "https://github.com/ruma/ruma", branch = "main", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "server-util", "state-res", "unstable-msc2448", "unstable-msc3575", "unstable-exhaustive-types", "ring-compat", "unstable-unspecified" ] }
|
|
rusqlite = { version = "0.32.1", optional = true, features = ["bundled"] }
|
|
rustls = { version = "0.23.13", default-features = false, features = ["ring", "log", "logging", "std", "tls12"] }
|
|
sd-notify = { version = "0.4.2", optional = true }
|
|
serde = { version = "1.0.210", features = ["rc"] }
|
|
serde_html_form = "0.2.6"
|
|
serde_json = { version = "1.0.128", features = ["raw_value"] }
|
|
serde_yaml = "0.9.34"
|
|
sha-1 = "0.10.1"
|
|
strum = { version = "0.26.3", features = ["derive"] }
|
|
thiserror = "1.0.64"
|
|
thread_local = "1.1.8"
|
|
tikv-jemallocator = { version = "0.6.0", features = ["unprefixed_malloc_on_supported_platforms"], optional = true }
|
|
tokio = { version = "1.40.0", features = ["fs", "macros", "signal", "sync"] }
|
|
toml = "0.8.19"
|
|
tower = { version = "0.5.1", features = ["util"] }
|
|
tower-http = { version = "0.6.0", features = ["add-extension", "cors", "sensitive-headers", "trace", "util"] }
|
|
tracing = { version = "0.1.40", features = [] }
|
|
tracing-flame = "0.2.0"
|
|
tracing-opentelemetry = "0.25.0"
|
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
|
|
trust-dns-resolver = "0.23.2"
|
|
xdg = "2.5.2"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
nix = { version = "0.29", features = ["resource", "time"] }
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2.0.16"
|
|
insta = { version = "1.40.0", features = ["filters", "json", "redactions"] }
|
|
predicates = "3.1.2"
|
|
|
|
[profile.dev.package.insta]
|
|
opt-level = 3
|
|
|
|
[profile.dev.package.similar]
|
|
opt-level = 3
|
|
|
|
[features]
|
|
default = ["rocksdb", "sqlite", "systemd"]
|
|
|
|
# Keep sorted
|
|
jemalloc = ["dep:tikv-jemallocator"]
|
|
rocksdb = ["dep:rocksdb"]
|
|
sqlite = ["dep:rusqlite", "dep:parking_lot", "tokio/signal"]
|
|
systemd = ["dep:sd-notify"]
|