tab_spaces = 2
-edition="2021"
-imports_layout="HorizontalVertical"
-imports_granularity="Crate"
-group_imports="One"
\ No newline at end of file
+edition = "2021"
+imports_layout = "HorizontalVertical"
+imports_granularity = "Crate"
+group_imports = "One"
commands:
- prettier -c . '!**/volumes' '!**/dist' '!target' '!**/translations'
+ taplo_check:
+ image: tamasfe/taplo:0.8.1
+ commands:
+ - taplo format --check
+
# use minimum supported rust version for most steps
cargo_fmt:
image: *muslrust_image
- "! cargo tree -p lemmy_api_common --no-default-features -i diesel"
# when:
# platform: linux/amd64
+ lemmy_api_common_works_with_wasm:
+ image: *muslrust_image
+ environment:
+ CARGO_HOME: .cargo
+ commands:
+ - "rustup target add wasm32-unknown-unknown"
+ - "cargo check --target wasm32-unknown-unknown -p lemmy_api_common"
check_defaults_hjson_updated:
image: *muslrust_image
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
"once_cell",
"version_check",
]
checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
dependencies = [
"cfg-if",
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
"once_cell",
"version_check",
]
dependencies = [
"base64 0.21.2",
"blowfish",
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
"subtle",
"zeroize",
]
[[package]]
name = "getrandom"
-version = "0.2.8"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"js-sys",
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
-[[package]]
-name = "idna"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
-dependencies = [
- "matches",
- "unicode-bidi",
- "unicode-normalization",
-]
-
[[package]]
name = "idna"
version = "0.3.0"
"chrono",
"encoding",
"futures",
+ "getrandom 0.2.10",
"lemmy_db_schema",
"lemmy_db_views",
"lemmy_db_views_actor",
"regex-automata 0.1.10",
]
-[[package]]
-name = "matches"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
-
[[package]]
name = "matchit"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5736ba45bbac8f7ccc99a897f88ce85e508a18baec973a040f2514e6cdbff0d2"
dependencies = [
- "idna 0.2.3",
+ "idna 0.3.0",
"once_cell",
"regex",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
]
[[package]]
dependencies = [
"anyhow",
"async-trait",
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
"matchit 0.7.0",
"opentelemetry 0.16.0",
"reqwest",
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be"
dependencies = [
- "getrandom 0.2.8",
+ "getrandom 0.2.10",
"serde",
]
[features]
embed-pictrs = ["pict-rs"]
-console = ["console-subscriber", "opentelemetry", "opentelemetry-otlp", "tracing-opentelemetry", "reqwest-tracing/opentelemetry_0_16"]
+console = [
+ "console-subscriber",
+ "opentelemetry",
+ "opentelemetry-otlp",
+ "tracing-opentelemetry",
+ "reqwest-tracing/opentelemetry_0_16",
+]
json-log = ["tracing-subscriber/json"]
prometheus-metrics = ["prometheus", "actix-web-prom"]
default = []
[workspace]
members = [
- "crates/api",
- "crates/api_crud",
- "crates/api_common",
- "crates/apub",
- "crates/utils",
- "crates/db_schema",
- "crates/db_views",
- "crates/db_views_actor",
- "crates/db_views_actor",
- "crates/routes"
+ "crates/api",
+ "crates/api_crud",
+ "crates/api_common",
+ "crates/apub",
+ "crates/utils",
+ "crates/db_schema",
+ "crates/db_views",
+ "crates/db_views_actor",
+ "crates/db_views_actor",
+ "crates/routes",
]
[workspace.dependencies]
lemmy_db_views = { version = "=0.18.1", path = "./crates/db_views" }
lemmy_db_views_actor = { version = "=0.18.1", path = "./crates/db_views_actor" }
lemmy_db_views_moderator = { version = "=0.18.1", path = "./crates/db_views_moderator" }
-activitypub_federation = { version = "0.4.5", default-features = false, features = ["actix-web"] }
+activitypub_federation = { version = "0.4.5", default-features = false, features = [
+ "actix-web",
+] }
diesel = "2.1.0"
diesel_migrations = "2.1.0"
diesel-async = "0.3.1"
serde = { version = "1.0.167", features = ["derive"] }
serde_with = "3.0.0"
-actix-web = { version = "4.3.1", default-features = false, features = ["macros", "rustls", "compress-brotli", "compress-gzip", "compress-zstd"] }
+actix-web = { version = "4.3.1", default-features = false, features = [
+ "macros",
+ "rustls",
+ "compress-brotli",
+ "compress-gzip",
+ "compress-zstd",
+] }
tracing = "0.1.37"
tracing-actix-web = { version = "0.7.5", default-features = false }
tracing-error = "0.2.0"
uuid = { version = "1.4.0", features = ["serde", "v4"] }
async-trait = "0.1.71"
captcha = "0.0.9"
-anyhow = { version = "1.0.71", features = ["backtrace"] } # backtrace is on by default on nightly, but not stable rust
+anyhow = { version = "1.0.71", features = [
+ "backtrace",
+] } # backtrace is on by default on nightly, but not stable rust
diesel_ltree = "0.3.0"
typed-builder = "0.15.0"
serial_test = "2.0.0"
regex = "1.9.0"
once_cell = "1.18.0"
diesel-derive-newtype = "2.1.0"
-diesel-derive-enum = {version = "2.1.0", features = ["postgres"] }
+diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
strum = "0.25.0"
strum_macros = "0.25.1"
itertools = "0.11.0"
opentelemetry = { version = "0.19.0", features = ["rt-tokio"] }
tracing-opentelemetry = { version = "0.19.0" }
ts-rs = { version = "6.2", features = ["serde-compat", "chrono-impl"] }
-rustls = { version ="0.21.3", features = ["dangerous_configuration"]}
+rustls = { version = "0.21.3", features = ["dangerous_configuration"] }
futures-util = "0.3.28"
tokio-postgres = "0.7.8"
tokio-postgres-rustls = "0.10.0"
doctest = false
[features]
-full = ["tracing", "rosetta-i18n", "chrono", "lemmy_utils",
- "lemmy_db_views/full", "lemmy_db_views_actor/full", "lemmy_db_views_moderator/full",
- "percent-encoding", "encoding", "reqwest-middleware", "webpage", "ts-rs"]
+full = [
+ "tracing",
+ "rosetta-i18n",
+ "chrono",
+ "lemmy_utils",
+ "lemmy_db_views/full",
+ "lemmy_db_views_actor/full",
+ "lemmy_db_views_moderator/full",
+ "percent-encoding",
+ "encoding",
+ "reqwest-middleware",
+ "webpage",
+ "ts-rs",
+ "tokio",
+ "uuid",
+ "reqwest",
+ "actix-web",
+ "futures",
+]
[dependencies]
lemmy_db_views = { workspace = true }
regex = { workspace = true }
rosetta-i18n = { workspace = true, optional = true }
percent-encoding = { workspace = true, optional = true }
-webpage = { version = "1.6", default-features = false, features = ["serde"], optional = true }
+webpage = { version = "1.6", default-features = false, features = [
+ "serde",
+], optional = true }
encoding = { version = "0.2.33", optional = true }
anyhow = { workspace = true }
-futures = { workspace = true }
-uuid = { workspace = true }
-tokio = { workspace = true }
-reqwest = { workspace = true }
+futures = { workspace = true, optional = true }
+uuid = { workspace = true, optional = true }
+tokio = { workspace = true, optional = true }
+reqwest = { workspace = true, optional = true }
ts-rs = { workspace = true, optional = true }
-actix-web = { workspace = true }
+actix-web = { workspace = true, optional = true }
+getrandom = { version = "0.2.10", features = ["js"] }
async-trait = { workspace = true }
webmention = "0.4.0"
chrono = { workspace = true }
-uuid = { workspace = true }
\ No newline at end of file
+uuid = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
actix-web = { workspace = true }
-tokio = {workspace = true}
+tokio = { workspace = true }
tracing = { workspace = true }
strum_macros = { workspace = true }
url = { workspace = true }
doctest = false
[features]
-full = ["diesel", "diesel-derive-newtype", "diesel-derive-enum", "diesel_migrations", "bcrypt", "lemmy_utils",
- "activitypub_federation", "sha2", "regex", "once_cell", "serde_json", "diesel_ltree",
- "diesel-async", "deadpool", "ts-rs"]
+full = [
+ "diesel",
+ "diesel-derive-newtype",
+ "diesel-derive-enum",
+ "diesel_migrations",
+ "bcrypt",
+ "lemmy_utils",
+ "activitypub_federation",
+ "sha2",
+ "regex",
+ "once_cell",
+ "serde_json",
+ "diesel_ltree",
+ "diesel-async",
+ "deadpool",
+ "ts-rs",
+ "tokio",
+ "tokio-postgres",
+ "tokio-postgres-rustls",
+ "rustls",
+]
[dependencies]
chrono = { workspace = true }
activitypub_federation = { workspace = true, optional = true }
lemmy_utils = { workspace = true, optional = true }
bcrypt = { workspace = true, optional = true }
-diesel = { workspace = true, features = ["postgres","chrono", "serde_json", "uuid"], optional = true }
+diesel = { workspace = true, features = [
+ "postgres",
+ "chrono",
+ "serde_json",
+ "uuid",
+], optional = true }
diesel-derive-newtype = { workspace = true, optional = true }
diesel-derive-enum = { workspace = true, optional = true }
diesel_migrations = { workspace = true, optional = true }
-diesel-async = { workspace = true, features = ["postgres", "deadpool"], optional = true }
+diesel-async = { workspace = true, features = [
+ "postgres",
+ "deadpool",
+], optional = true }
sha2 = { workspace = true, optional = true }
regex = { workspace = true, optional = true }
once_cell = { workspace = true, optional = true }
diesel_ltree = { workspace = true, optional = true }
typed-builder = { workspace = true }
async-trait = { workspace = true }
-tokio = { workspace = true }
tracing = { workspace = true }
deadpool = { version = "0.9.5", features = ["rt_tokio_1"], optional = true }
ts-rs = { workspace = true, optional = true }
-rustls = { workspace = true }
futures-util = { workspace = true }
-tokio-postgres = { workspace = true }
-tokio-postgres-rustls = { workspace = true }
+tokio = { workspace = true, optional = true }
+tokio-postgres = { workspace = true, optional = true }
+tokio-postgres-rustls = { workspace = true, optional = true }
+rustls = { workspace = true, optional = true }
uuid = { workspace = true, features = ["v4"] }
[dev-dependencies]
doctest = false
[features]
-full = ["lemmy_db_schema/full", "diesel", "diesel-async", "diesel_ltree", "tracing", "ts-rs"]
+full = [
+ "lemmy_db_schema/full",
+ "diesel",
+ "diesel-async",
+ "diesel_ltree",
+ "tracing",
+ "ts-rs",
+]
[dependencies]
lemmy_db_schema = { workspace = true }
diesel = { workspace = true, optional = true }
-diesel-async = { workspace = true, optional = true}
-diesel_ltree = { workspace = true, optional = true}
+diesel-async = { workspace = true, optional = true }
+diesel_ltree = { workspace = true, optional = true }
serde = { workspace = true }
serde_with = { workspace = true }
tracing = { workspace = true, optional = true }
typed-builder = { workspace = true }
-ts-rs = { workspace = true, optional = true }
+ts-rs = { workspace = true, optional = true }
[dev-dependencies]
serial_test = { workspace = true }
[dependencies]
lemmy_db_schema = { workspace = true }
-diesel = { workspace = true, features = ["postgres","chrono","serde_json"], optional = true }
-diesel-async = { workspace = true, features = ["postgres", "deadpool"], optional = true }
+diesel = { workspace = true, features = [
+ "postgres",
+ "chrono",
+ "serde_json",
+], optional = true }
+diesel-async = { workspace = true, features = [
+ "postgres",
+ "deadpool",
+], optional = true }
serde = { workspace = true }
serde_with = { workspace = true }
typed-builder = { workspace = true }
-ts-rs = { workspace = true, optional = true }
+ts-rs = { workspace = true, optional = true }
[dependencies]
lemmy_db_schema = { workspace = true }
-diesel = { workspace = true, features = ["postgres","chrono","serde_json"], optional = true }
-diesel-async = { workspace = true, features = ["postgres", "deadpool"], optional = true }
+diesel = { workspace = true, features = [
+ "postgres",
+ "chrono",
+ "serde_json",
+], optional = true }
+diesel-async = { workspace = true, features = [
+ "postgres",
+ "deadpool",
+], optional = true }
serde = { workspace = true }
serde_with = { workspace = true }
-ts-rs = { workspace = true, optional = true }
+ts-rs = { workspace = true, optional = true }
-D clippy::indexing_slicing
cargo +nightly fmt
+taplo format