diff --git a/Cargo.toml b/Cargo.toml index 659fd16b..04c036a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,8 @@ +[workspace] +default-members = ["conduit"] +members = ["conduit"] +resolver = "2" + [workspace.lints.rust] explicit_outlives_requirements = "warn" unused_qualifications = "warn" @@ -7,242 +12,13 @@ cloned_instead_of_copied = "warn" dbg_macro = "warn" str_to_string = "warn" -[package] -authors = ["timokoesters "] -description = "A Matrix homeserver written in Rust" +[workspace.package] +# See also `rust-toolchain.toml` edition = "2021" homepage = "https://conduit.rs" -license = "Apache-2.0" -name = "conduit" -readme = "README.md" repository = "https://gitlab.com/famedly/conduit" -version = "0.11.0-alpha" - -# See also `rust-toolchain.toml` rust-version = "1.85.0" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lints] -workspace = true - -[dependencies] -# Web framework -axum = { version = "0.8", default-features = false, features = [ - "form", - "http1", - "http2", - "json", - "matched-path", -], optional = true } -axum-extra = { version = "0.10", features = ["typed-header"] } -axum-server = { version = "0.7", features = ["tls-rustls"] } -tower = { version = "0.5", features = ["util"] } -tower-http = { version = "0.6", features = [ - "add-extension", - "cors", - "sensitive-headers", - "trace", - "util", -] } -tower-service = "0.3" - -# Async runtime and utilities -tokio = { version = "1", features = ["fs", "macros", "signal", "sync"] } - -# Used for the http request / response body type for Ruma endpoints used with reqwest -bytes = "1" -http = "1" -# Used to find data directory for default db path -directories = "6" -# Used for ruma wrapper -serde_json = { version = "1", features = ["raw_value"] } -# Used for appservice registration files -serde_yaml = "0.9" -# Used for pdu definition -serde = { version = "1", features = ["rc"] } -# Used for secure identifiers -rand = "0.9" -# Used to hash passwords -rust-argon2 = "2" -# Used to send requests -hyper = "1" -hyper-util = { version = "0.1", features = [ - "client", - "client-legacy", - "http1", - "http2", -] } -reqwest = { version = "0.12", default-features = false, features = [ - "rustls-tls-native-roots", - "socks", -] } -# Used for conduit::Error type -thiserror = "2" #TODO: 2 -# Used to generate thumbnails for images -image = { version = "0.25", default-features = false, features = [ - "gif", - "jpeg", - "png", - "webp", -] } -# Used for creating media filenames -hex = "0.4" -sha2 = "0.10" -# Used for parsing media retention policies from the config -bytesize = { version = "2", features = ["serde"] } -humantime-serde = "1" -# Used to encode server public key -base64 = "0.22" -# Used when hashing the state -ring = "0.17" -# Used when querying the SRV record of other servers -hickory-resolver = "0.25" -# Used to find matching events for appservices -regex = "1" -# jwt jsonwebtokens -jsonwebtoken = "9" -# Performance measurements -opentelemetry = "0.29" -opentelemetry-jaeger-propagator = "0.29" -opentelemetry-otlp = { version = "0.29", features = ["grpc-tonic"] } -opentelemetry_sdk = { version = "0.29", features = ["rt-tokio"] } -tracing = "0.1" -tracing-flame = "0.2.0" -tracing-opentelemetry = "0.30" -tracing-subscriber = { version = "0.3", features = ["env-filter"] } - -lru-cache = "0.1.2" -parking_lot = { version = "0.12", optional = true } -rusqlite = { version = "0.35", optional = true, features = ["bundled"] } - -# crossbeam = { version = "0.8.2", optional = true } -num_cpus = "1" -threadpool = "1" -# Used for ruma wrapper -serde_html_form = "0.2" - -thread_local = "1" -# used for TURN server authentication -hmac = "0.12" -sha-1 = "0.10" -# used for conduit's CLI and admin room command parsing -chrono = "0.4" -clap = { version = "4", default-features = false, features = [ - "derive", - "error-context", - "help", - "std", - "string", - "usage", -] } -humantime = "2" -shell-words = "1.1.0" - -futures-util = { version = "0.3", default-features = false } -# Used for reading the configuration from conduit.toml & environment variables -figment = { version = "0.10", features = ["env", "toml"] } - -# Validating urls in config -url = { version = "2", features = ["serde"] } - -async-trait = "0.1" -tikv-jemallocator = { version = "0.6", features = [ - "unprefixed_malloc_on_supported_platforms", -], optional = true } - -sd-notify = { version = "0.4", optional = true } -# Used for inspecting request errors -http-body-util = "0.1.3" -# Used for S3 media backend -rusty-s3 = "0.8.1" - -# Used for matrix spec type definitions and helpers -[dependencies.ruma] -features = [ - "appservice-api-c", - "canonical-json", - "client-api", - "compat-empty-string-null", - "compat-get-3pids", - "compat-null", - "compat-optional", - "compat-optional-txn-pdus", - "compat-server-signing-key-version", - "compat-tag-info", - "compat-unset-avatar", - "federation-api", - "push-gateway-api-c", - "rand", - "ring-compat", - "state-res", - "unstable-msc2448", - "unstable-msc4186", - "unstable-msc4311", -] -git = "https://github.com/ruma/ruma.git" - -[dependencies.rocksdb] -features = ["lz4", "multi-threaded-cf", "zstd"] -optional = true -package = "rust-rocksdb" -version = "0.43" - -[target.'cfg(unix)'.dependencies] -nix = { version = "0.30", features = ["resource"] } - -[features] -backend_rocksdb = ["rocksdb"] -backend_sqlite = ["sqlite"] -conduit_bin = ["axum"] -default = ["backend_rocksdb", "backend_sqlite", "conduit_bin", "systemd"] -jemalloc = ["tikv-jemallocator"] -sqlite = ["parking_lot", "rusqlite", "tokio/signal"] -systemd = ["sd-notify"] - -enforce_msc4311 = [] - -[[bin]] -name = "conduit" -path = "src/main.rs" -required-features = ["conduit_bin"] - -[lib] -name = "conduit" -path = "src/lib.rs" - -[package.metadata.deb] -assets = [ - [ - "README.md", - "usr/share/doc/matrix-conduit/", - "644", - ], - [ - "debian/README.md", - "usr/share/doc/matrix-conduit/README.Debian", - "644", - ], - [ - "target/release/conduit", - "usr/sbin/matrix-conduit", - "755", - ], -] -conf-files = ["/etc/matrix-conduit/conduit.toml"] -copyright = "2020, Timo Kösters " -depends = "$auto, ca-certificates" -extended-description = """\ -A fast Matrix homeserver that is optimized for smaller, personal servers, \ -instead of a server that has high scalability.""" -license-file = ["LICENSE", "3"] -maintainer = "Paul van Tilburg " -maintainer-scripts = "debian/" -name = "matrix-conduit" -priority = "optional" -section = "net" -systemd-units = { unit-name = "matrix-conduit" } - [profile.dev] incremental = true lto = 'off' diff --git a/conduit/Cargo.toml b/conduit/Cargo.toml new file mode 100644 index 00000000..183a4b20 --- /dev/null +++ b/conduit/Cargo.toml @@ -0,0 +1,221 @@ +[package] +authors = ["timokoesters "] +description = "A Matrix homeserver written in Rust" +edition.workspace = true +homepage.workspace = true +license = "Apache-2.0" +name = "conduit" +readme = "README.md" +repository.workspace = true +rust-version.workspace = true +version = "0.11.0-alpha" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lints] +workspace = true + +[dependencies] +# Web framework +axum = { version = "0.8", default-features = false, features = [ + "form", + "http1", + "http2", + "json", + "matched-path", +], optional = true } +axum-extra = { version = "0.10", features = ["typed-header"] } +axum-server = { version = "0.7", features = ["tls-rustls"] } +tower = { version = "0.5", features = ["util"] } +tower-http = { version = "0.6", features = [ + "add-extension", + "cors", + "sensitive-headers", + "trace", + "util", +] } +tower-service = "0.3" + +# Async runtime and utilities +tokio = { version = "1", features = ["fs", "macros", "signal", "sync"] } + +# Used for the http request / response body type for Ruma endpoints used with reqwest +bytes = "1" +http = "1" +# Used to find data directory for default db path +directories = "6" +# Used for ruma wrapper +serde_json = { version = "1", features = ["raw_value"] } +# Used for appservice registration files +serde_yaml = "0.9" +# Used for pdu definition +serde = { version = "1", features = ["rc"] } +# Used for secure identifiers +rand = "0.9" +# Used to hash passwords +rust-argon2 = "2" +# Used to send requests +hyper = "1" +hyper-util = { version = "0.1", features = [ + "client", + "client-legacy", + "http1", + "http2", +] } +reqwest = { version = "0.12", default-features = false, features = [ + "rustls-tls-native-roots", + "socks", +] } +# Used for conduit::Error type +thiserror = "2" #TODO: 2 +# Used to generate thumbnails for images +image = { version = "0.25", default-features = false, features = [ + "gif", + "jpeg", + "png", + "webp", +] } +# Used for creating media filenames +hex = "0.4" +sha2 = "0.10" +# Used for parsing media retention policies from the config +bytesize = { version = "2", features = ["serde"] } +humantime-serde = "1" +# Used to encode server public key +base64 = "0.22" +# Used when hashing the state +ring = "0.17" +# Used when querying the SRV record of other servers +hickory-resolver = "0.25" +# Used to find matching events for appservices +regex = "1" +# jwt jsonwebtokens +jsonwebtoken = "9" +# Performance measurements +opentelemetry = "0.29" +opentelemetry-jaeger-propagator = "0.29" +opentelemetry-otlp = { version = "0.29", features = ["grpc-tonic"] } +opentelemetry_sdk = { version = "0.29", features = ["rt-tokio"] } +tracing = "0.1" +tracing-flame = "0.2.0" +tracing-opentelemetry = "0.30" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } + +lru-cache = "0.1.2" +parking_lot = { version = "0.12", optional = true } +rusqlite = { version = "0.35", optional = true, features = ["bundled"] } + +# crossbeam = { version = "0.8.2", optional = true } +num_cpus = "1" +threadpool = "1" +# Used for ruma wrapper +serde_html_form = "0.2" + +thread_local = "1" +# used for TURN server authentication +hmac = "0.12" +sha-1 = "0.10" +# used for conduit's CLI and admin room command parsing +chrono = "0.4" +clap = { version = "4", default-features = false, features = [ + "derive", + "error-context", + "help", + "std", + "string", + "usage", +] } +humantime = "2" +shell-words = "1.1.0" + +futures-util = { version = "0.3", default-features = false } +# Used for reading the configuration from conduit.toml & environment variables +figment = { version = "0.10", features = ["env", "toml"] } + +# Validating urls in config +url = { version = "2", features = ["serde"] } + +async-trait = "0.1" +tikv-jemallocator = { version = "0.6", features = [ + "unprefixed_malloc_on_supported_platforms", +], optional = true } + +sd-notify = { version = "0.4", optional = true } +# Used for inspecting request errors +http-body-util = "0.1.3" +# Used for S3 media backend +rusty-s3 = "0.8.1" + +# Used for matrix spec type definitions and helpers +[dependencies.ruma] +features = [ + "appservice-api-c", + "canonical-json", + "client-api", + "compat-empty-string-null", + "compat-get-3pids", + "compat-null", + "compat-optional", + "compat-optional-txn-pdus", + "compat-server-signing-key-version", + "compat-tag-info", + "compat-unset-avatar", + "federation-api", + "push-gateway-api-c", + "rand", + "ring-compat", + "state-res", + "unstable-msc2448", + "unstable-msc4186", + "unstable-msc4311", +] +git = "https://github.com/ruma/ruma.git" + +[dependencies.rocksdb] +features = ["lz4", "multi-threaded-cf", "zstd"] +optional = true +package = "rust-rocksdb" +version = "0.43" + +[target.'cfg(unix)'.dependencies] +nix = { version = "0.30", features = ["resource"] } + +[features] +backend_rocksdb = ["rocksdb"] +backend_sqlite = ["sqlite"] +conduit_bin = ["axum"] +default = ["backend_rocksdb", "backend_sqlite", "conduit_bin", "systemd"] +jemalloc = ["tikv-jemallocator"] +sqlite = ["parking_lot", "rusqlite", "tokio/signal"] +systemd = ["sd-notify"] + +enforce_msc4311 = [] + +[[bin]] +name = "conduit" +path = "src/main.rs" +required-features = ["conduit_bin"] + +[lib] +name = "conduit" +path = "src/lib.rs" + +[package.metadata.deb] +assets = [ + { mode = "644", source = "../README.md", dest = "usr/share/doc/matrix-conduit" }, + { mode = "644", source = "../debian/README.md", dest = "usr/share/doc/matrix-conduit/README.Debian" }, + { mode = "755", source = "target/release/conduit", dest = "usr/sbin/matrix-conduit" }, +] +conf-files = ["/etc/matrix-conduit/conduit.toml"] +copyright = "2020, Timo Kösters " +depends = "$auto, ca-certificates" +extended-description = """\ +A fast Matrix homeserver that is optimized for smaller, personal servers, \ +instead of a server that has high scalability.""" +license-file = ["../LICENSE", "3"] +maintainer = "Paul van Tilburg " +maintainer-scripts = "debian/" +name = "matrix-conduit" +priority = "optional" +section = "net" +systemd-units = { unit-name = "matrix-conduit" } diff --git a/src/api/appservice_server.rs b/conduit/src/api/appservice_server.rs similarity index 100% rename from src/api/appservice_server.rs rename to conduit/src/api/appservice_server.rs diff --git a/src/api/client_server/account.rs b/conduit/src/api/client_server/account.rs similarity index 100% rename from src/api/client_server/account.rs rename to conduit/src/api/client_server/account.rs diff --git a/src/api/client_server/alias.rs b/conduit/src/api/client_server/alias.rs similarity index 100% rename from src/api/client_server/alias.rs rename to conduit/src/api/client_server/alias.rs diff --git a/src/api/client_server/appservice.rs b/conduit/src/api/client_server/appservice.rs similarity index 100% rename from src/api/client_server/appservice.rs rename to conduit/src/api/client_server/appservice.rs diff --git a/src/api/client_server/backup.rs b/conduit/src/api/client_server/backup.rs similarity index 100% rename from src/api/client_server/backup.rs rename to conduit/src/api/client_server/backup.rs diff --git a/src/api/client_server/capabilities.rs b/conduit/src/api/client_server/capabilities.rs similarity index 100% rename from src/api/client_server/capabilities.rs rename to conduit/src/api/client_server/capabilities.rs diff --git a/src/api/client_server/config.rs b/conduit/src/api/client_server/config.rs similarity index 100% rename from src/api/client_server/config.rs rename to conduit/src/api/client_server/config.rs diff --git a/src/api/client_server/context.rs b/conduit/src/api/client_server/context.rs similarity index 100% rename from src/api/client_server/context.rs rename to conduit/src/api/client_server/context.rs diff --git a/src/api/client_server/device.rs b/conduit/src/api/client_server/device.rs similarity index 100% rename from src/api/client_server/device.rs rename to conduit/src/api/client_server/device.rs diff --git a/src/api/client_server/directory.rs b/conduit/src/api/client_server/directory.rs similarity index 100% rename from src/api/client_server/directory.rs rename to conduit/src/api/client_server/directory.rs diff --git a/src/api/client_server/filter.rs b/conduit/src/api/client_server/filter.rs similarity index 100% rename from src/api/client_server/filter.rs rename to conduit/src/api/client_server/filter.rs diff --git a/src/api/client_server/keys.rs b/conduit/src/api/client_server/keys.rs similarity index 100% rename from src/api/client_server/keys.rs rename to conduit/src/api/client_server/keys.rs diff --git a/src/api/client_server/media.rs b/conduit/src/api/client_server/media.rs similarity index 100% rename from src/api/client_server/media.rs rename to conduit/src/api/client_server/media.rs diff --git a/src/api/client_server/membership.rs b/conduit/src/api/client_server/membership.rs similarity index 100% rename from src/api/client_server/membership.rs rename to conduit/src/api/client_server/membership.rs diff --git a/src/api/client_server/message.rs b/conduit/src/api/client_server/message.rs similarity index 100% rename from src/api/client_server/message.rs rename to conduit/src/api/client_server/message.rs diff --git a/src/api/client_server/mod.rs b/conduit/src/api/client_server/mod.rs similarity index 100% rename from src/api/client_server/mod.rs rename to conduit/src/api/client_server/mod.rs diff --git a/src/api/client_server/openid.rs b/conduit/src/api/client_server/openid.rs similarity index 100% rename from src/api/client_server/openid.rs rename to conduit/src/api/client_server/openid.rs diff --git a/src/api/client_server/presence.rs b/conduit/src/api/client_server/presence.rs similarity index 100% rename from src/api/client_server/presence.rs rename to conduit/src/api/client_server/presence.rs diff --git a/src/api/client_server/profile.rs b/conduit/src/api/client_server/profile.rs similarity index 100% rename from src/api/client_server/profile.rs rename to conduit/src/api/client_server/profile.rs diff --git a/src/api/client_server/push.rs b/conduit/src/api/client_server/push.rs similarity index 100% rename from src/api/client_server/push.rs rename to conduit/src/api/client_server/push.rs diff --git a/src/api/client_server/read_marker.rs b/conduit/src/api/client_server/read_marker.rs similarity index 100% rename from src/api/client_server/read_marker.rs rename to conduit/src/api/client_server/read_marker.rs diff --git a/src/api/client_server/redact.rs b/conduit/src/api/client_server/redact.rs similarity index 100% rename from src/api/client_server/redact.rs rename to conduit/src/api/client_server/redact.rs diff --git a/src/api/client_server/relations.rs b/conduit/src/api/client_server/relations.rs similarity index 100% rename from src/api/client_server/relations.rs rename to conduit/src/api/client_server/relations.rs diff --git a/src/api/client_server/report.rs b/conduit/src/api/client_server/report.rs similarity index 100% rename from src/api/client_server/report.rs rename to conduit/src/api/client_server/report.rs diff --git a/src/api/client_server/room.rs b/conduit/src/api/client_server/room.rs similarity index 100% rename from src/api/client_server/room.rs rename to conduit/src/api/client_server/room.rs diff --git a/src/api/client_server/search.rs b/conduit/src/api/client_server/search.rs similarity index 100% rename from src/api/client_server/search.rs rename to conduit/src/api/client_server/search.rs diff --git a/src/api/client_server/session.rs b/conduit/src/api/client_server/session.rs similarity index 100% rename from src/api/client_server/session.rs rename to conduit/src/api/client_server/session.rs diff --git a/src/api/client_server/space.rs b/conduit/src/api/client_server/space.rs similarity index 100% rename from src/api/client_server/space.rs rename to conduit/src/api/client_server/space.rs diff --git a/src/api/client_server/state.rs b/conduit/src/api/client_server/state.rs similarity index 100% rename from src/api/client_server/state.rs rename to conduit/src/api/client_server/state.rs diff --git a/src/api/client_server/sync.rs b/conduit/src/api/client_server/sync.rs similarity index 100% rename from src/api/client_server/sync.rs rename to conduit/src/api/client_server/sync.rs diff --git a/src/api/client_server/tag.rs b/conduit/src/api/client_server/tag.rs similarity index 100% rename from src/api/client_server/tag.rs rename to conduit/src/api/client_server/tag.rs diff --git a/src/api/client_server/thirdparty.rs b/conduit/src/api/client_server/thirdparty.rs similarity index 100% rename from src/api/client_server/thirdparty.rs rename to conduit/src/api/client_server/thirdparty.rs diff --git a/src/api/client_server/threads.rs b/conduit/src/api/client_server/threads.rs similarity index 100% rename from src/api/client_server/threads.rs rename to conduit/src/api/client_server/threads.rs diff --git a/src/api/client_server/to_device.rs b/conduit/src/api/client_server/to_device.rs similarity index 100% rename from src/api/client_server/to_device.rs rename to conduit/src/api/client_server/to_device.rs diff --git a/src/api/client_server/typing.rs b/conduit/src/api/client_server/typing.rs similarity index 100% rename from src/api/client_server/typing.rs rename to conduit/src/api/client_server/typing.rs diff --git a/src/api/client_server/unversioned.rs b/conduit/src/api/client_server/unversioned.rs similarity index 100% rename from src/api/client_server/unversioned.rs rename to conduit/src/api/client_server/unversioned.rs diff --git a/src/api/client_server/user_directory.rs b/conduit/src/api/client_server/user_directory.rs similarity index 100% rename from src/api/client_server/user_directory.rs rename to conduit/src/api/client_server/user_directory.rs diff --git a/src/api/client_server/voip.rs b/conduit/src/api/client_server/voip.rs similarity index 100% rename from src/api/client_server/voip.rs rename to conduit/src/api/client_server/voip.rs diff --git a/src/api/client_server/well_known.rs b/conduit/src/api/client_server/well_known.rs similarity index 100% rename from src/api/client_server/well_known.rs rename to conduit/src/api/client_server/well_known.rs diff --git a/src/api/mod.rs b/conduit/src/api/mod.rs similarity index 100% rename from src/api/mod.rs rename to conduit/src/api/mod.rs diff --git a/src/api/ruma_wrapper/axum.rs b/conduit/src/api/ruma_wrapper/axum.rs similarity index 100% rename from src/api/ruma_wrapper/axum.rs rename to conduit/src/api/ruma_wrapper/axum.rs diff --git a/src/api/ruma_wrapper/mod.rs b/conduit/src/api/ruma_wrapper/mod.rs similarity index 100% rename from src/api/ruma_wrapper/mod.rs rename to conduit/src/api/ruma_wrapper/mod.rs diff --git a/src/api/server_server.rs b/conduit/src/api/server_server.rs similarity index 100% rename from src/api/server_server.rs rename to conduit/src/api/server_server.rs diff --git a/src/clap.rs b/conduit/src/clap.rs similarity index 100% rename from src/clap.rs rename to conduit/src/clap.rs diff --git a/src/config/mod.rs b/conduit/src/config/mod.rs similarity index 100% rename from src/config/mod.rs rename to conduit/src/config/mod.rs diff --git a/src/config/proxy.rs b/conduit/src/config/proxy.rs similarity index 100% rename from src/config/proxy.rs rename to conduit/src/config/proxy.rs diff --git a/src/database/abstraction.rs b/conduit/src/database/abstraction.rs similarity index 100% rename from src/database/abstraction.rs rename to conduit/src/database/abstraction.rs diff --git a/src/database/abstraction/rocksdb.rs b/conduit/src/database/abstraction/rocksdb.rs similarity index 100% rename from src/database/abstraction/rocksdb.rs rename to conduit/src/database/abstraction/rocksdb.rs diff --git a/src/database/abstraction/sqlite.rs b/conduit/src/database/abstraction/sqlite.rs similarity index 100% rename from src/database/abstraction/sqlite.rs rename to conduit/src/database/abstraction/sqlite.rs diff --git a/src/database/abstraction/watchers.rs b/conduit/src/database/abstraction/watchers.rs similarity index 100% rename from src/database/abstraction/watchers.rs rename to conduit/src/database/abstraction/watchers.rs diff --git a/src/database/key_value/account_data.rs b/conduit/src/database/key_value/account_data.rs similarity index 100% rename from src/database/key_value/account_data.rs rename to conduit/src/database/key_value/account_data.rs diff --git a/src/database/key_value/appservice.rs b/conduit/src/database/key_value/appservice.rs similarity index 100% rename from src/database/key_value/appservice.rs rename to conduit/src/database/key_value/appservice.rs diff --git a/src/database/key_value/globals.rs b/conduit/src/database/key_value/globals.rs similarity index 100% rename from src/database/key_value/globals.rs rename to conduit/src/database/key_value/globals.rs diff --git a/src/database/key_value/key_backups.rs b/conduit/src/database/key_value/key_backups.rs similarity index 100% rename from src/database/key_value/key_backups.rs rename to conduit/src/database/key_value/key_backups.rs diff --git a/src/database/key_value/media.rs b/conduit/src/database/key_value/media.rs similarity index 100% rename from src/database/key_value/media.rs rename to conduit/src/database/key_value/media.rs diff --git a/src/database/key_value/mod.rs b/conduit/src/database/key_value/mod.rs similarity index 100% rename from src/database/key_value/mod.rs rename to conduit/src/database/key_value/mod.rs diff --git a/src/database/key_value/pusher.rs b/conduit/src/database/key_value/pusher.rs similarity index 100% rename from src/database/key_value/pusher.rs rename to conduit/src/database/key_value/pusher.rs diff --git a/src/database/key_value/rooms/alias.rs b/conduit/src/database/key_value/rooms/alias.rs similarity index 100% rename from src/database/key_value/rooms/alias.rs rename to conduit/src/database/key_value/rooms/alias.rs diff --git a/src/database/key_value/rooms/auth_chain.rs b/conduit/src/database/key_value/rooms/auth_chain.rs similarity index 100% rename from src/database/key_value/rooms/auth_chain.rs rename to conduit/src/database/key_value/rooms/auth_chain.rs diff --git a/src/database/key_value/rooms/directory.rs b/conduit/src/database/key_value/rooms/directory.rs similarity index 100% rename from src/database/key_value/rooms/directory.rs rename to conduit/src/database/key_value/rooms/directory.rs diff --git a/src/database/key_value/rooms/edus/mod.rs b/conduit/src/database/key_value/rooms/edus/mod.rs similarity index 100% rename from src/database/key_value/rooms/edus/mod.rs rename to conduit/src/database/key_value/rooms/edus/mod.rs diff --git a/src/database/key_value/rooms/edus/presence.rs b/conduit/src/database/key_value/rooms/edus/presence.rs similarity index 100% rename from src/database/key_value/rooms/edus/presence.rs rename to conduit/src/database/key_value/rooms/edus/presence.rs diff --git a/src/database/key_value/rooms/edus/read_receipt.rs b/conduit/src/database/key_value/rooms/edus/read_receipt.rs similarity index 100% rename from src/database/key_value/rooms/edus/read_receipt.rs rename to conduit/src/database/key_value/rooms/edus/read_receipt.rs diff --git a/src/database/key_value/rooms/lazy_load.rs b/conduit/src/database/key_value/rooms/lazy_load.rs similarity index 100% rename from src/database/key_value/rooms/lazy_load.rs rename to conduit/src/database/key_value/rooms/lazy_load.rs diff --git a/src/database/key_value/rooms/metadata.rs b/conduit/src/database/key_value/rooms/metadata.rs similarity index 100% rename from src/database/key_value/rooms/metadata.rs rename to conduit/src/database/key_value/rooms/metadata.rs diff --git a/src/database/key_value/rooms/mod.rs b/conduit/src/database/key_value/rooms/mod.rs similarity index 100% rename from src/database/key_value/rooms/mod.rs rename to conduit/src/database/key_value/rooms/mod.rs diff --git a/src/database/key_value/rooms/outlier.rs b/conduit/src/database/key_value/rooms/outlier.rs similarity index 100% rename from src/database/key_value/rooms/outlier.rs rename to conduit/src/database/key_value/rooms/outlier.rs diff --git a/src/database/key_value/rooms/pdu_metadata.rs b/conduit/src/database/key_value/rooms/pdu_metadata.rs similarity index 100% rename from src/database/key_value/rooms/pdu_metadata.rs rename to conduit/src/database/key_value/rooms/pdu_metadata.rs diff --git a/src/database/key_value/rooms/search.rs b/conduit/src/database/key_value/rooms/search.rs similarity index 100% rename from src/database/key_value/rooms/search.rs rename to conduit/src/database/key_value/rooms/search.rs diff --git a/src/database/key_value/rooms/short.rs b/conduit/src/database/key_value/rooms/short.rs similarity index 100% rename from src/database/key_value/rooms/short.rs rename to conduit/src/database/key_value/rooms/short.rs diff --git a/src/database/key_value/rooms/state.rs b/conduit/src/database/key_value/rooms/state.rs similarity index 100% rename from src/database/key_value/rooms/state.rs rename to conduit/src/database/key_value/rooms/state.rs diff --git a/src/database/key_value/rooms/state_accessor.rs b/conduit/src/database/key_value/rooms/state_accessor.rs similarity index 100% rename from src/database/key_value/rooms/state_accessor.rs rename to conduit/src/database/key_value/rooms/state_accessor.rs diff --git a/src/database/key_value/rooms/state_cache.rs b/conduit/src/database/key_value/rooms/state_cache.rs similarity index 100% rename from src/database/key_value/rooms/state_cache.rs rename to conduit/src/database/key_value/rooms/state_cache.rs diff --git a/src/database/key_value/rooms/state_compressor.rs b/conduit/src/database/key_value/rooms/state_compressor.rs similarity index 100% rename from src/database/key_value/rooms/state_compressor.rs rename to conduit/src/database/key_value/rooms/state_compressor.rs diff --git a/src/database/key_value/rooms/threads.rs b/conduit/src/database/key_value/rooms/threads.rs similarity index 100% rename from src/database/key_value/rooms/threads.rs rename to conduit/src/database/key_value/rooms/threads.rs diff --git a/src/database/key_value/rooms/timeline.rs b/conduit/src/database/key_value/rooms/timeline.rs similarity index 100% rename from src/database/key_value/rooms/timeline.rs rename to conduit/src/database/key_value/rooms/timeline.rs diff --git a/src/database/key_value/rooms/user.rs b/conduit/src/database/key_value/rooms/user.rs similarity index 100% rename from src/database/key_value/rooms/user.rs rename to conduit/src/database/key_value/rooms/user.rs diff --git a/src/database/key_value/sending.rs b/conduit/src/database/key_value/sending.rs similarity index 100% rename from src/database/key_value/sending.rs rename to conduit/src/database/key_value/sending.rs diff --git a/src/database/key_value/transaction_ids.rs b/conduit/src/database/key_value/transaction_ids.rs similarity index 100% rename from src/database/key_value/transaction_ids.rs rename to conduit/src/database/key_value/transaction_ids.rs diff --git a/src/database/key_value/uiaa.rs b/conduit/src/database/key_value/uiaa.rs similarity index 100% rename from src/database/key_value/uiaa.rs rename to conduit/src/database/key_value/uiaa.rs diff --git a/src/database/key_value/users.rs b/conduit/src/database/key_value/users.rs similarity index 100% rename from src/database/key_value/users.rs rename to conduit/src/database/key_value/users.rs diff --git a/src/database/mod.rs b/conduit/src/database/mod.rs similarity index 100% rename from src/database/mod.rs rename to conduit/src/database/mod.rs diff --git a/src/lib.rs b/conduit/src/lib.rs similarity index 100% rename from src/lib.rs rename to conduit/src/lib.rs diff --git a/src/main.rs b/conduit/src/main.rs similarity index 100% rename from src/main.rs rename to conduit/src/main.rs diff --git a/src/service/account_data/data.rs b/conduit/src/service/account_data/data.rs similarity index 100% rename from src/service/account_data/data.rs rename to conduit/src/service/account_data/data.rs diff --git a/src/service/account_data/mod.rs b/conduit/src/service/account_data/mod.rs similarity index 100% rename from src/service/account_data/mod.rs rename to conduit/src/service/account_data/mod.rs diff --git a/src/service/admin/mod.rs b/conduit/src/service/admin/mod.rs similarity index 100% rename from src/service/admin/mod.rs rename to conduit/src/service/admin/mod.rs diff --git a/src/service/appservice/data.rs b/conduit/src/service/appservice/data.rs similarity index 100% rename from src/service/appservice/data.rs rename to conduit/src/service/appservice/data.rs diff --git a/src/service/appservice/mod.rs b/conduit/src/service/appservice/mod.rs similarity index 100% rename from src/service/appservice/mod.rs rename to conduit/src/service/appservice/mod.rs diff --git a/src/service/globals/data.rs b/conduit/src/service/globals/data.rs similarity index 100% rename from src/service/globals/data.rs rename to conduit/src/service/globals/data.rs diff --git a/src/service/globals/mod.rs b/conduit/src/service/globals/mod.rs similarity index 100% rename from src/service/globals/mod.rs rename to conduit/src/service/globals/mod.rs diff --git a/src/service/key_backups/data.rs b/conduit/src/service/key_backups/data.rs similarity index 100% rename from src/service/key_backups/data.rs rename to conduit/src/service/key_backups/data.rs diff --git a/src/service/key_backups/mod.rs b/conduit/src/service/key_backups/mod.rs similarity index 100% rename from src/service/key_backups/mod.rs rename to conduit/src/service/key_backups/mod.rs diff --git a/src/service/media/data.rs b/conduit/src/service/media/data.rs similarity index 100% rename from src/service/media/data.rs rename to conduit/src/service/media/data.rs diff --git a/src/service/media/mod.rs b/conduit/src/service/media/mod.rs similarity index 100% rename from src/service/media/mod.rs rename to conduit/src/service/media/mod.rs diff --git a/src/service/mod.rs b/conduit/src/service/mod.rs similarity index 100% rename from src/service/mod.rs rename to conduit/src/service/mod.rs diff --git a/src/service/pdu.rs b/conduit/src/service/pdu.rs similarity index 100% rename from src/service/pdu.rs rename to conduit/src/service/pdu.rs diff --git a/src/service/pusher/data.rs b/conduit/src/service/pusher/data.rs similarity index 100% rename from src/service/pusher/data.rs rename to conduit/src/service/pusher/data.rs diff --git a/src/service/pusher/mod.rs b/conduit/src/service/pusher/mod.rs similarity index 100% rename from src/service/pusher/mod.rs rename to conduit/src/service/pusher/mod.rs diff --git a/src/service/rooms/alias/data.rs b/conduit/src/service/rooms/alias/data.rs similarity index 100% rename from src/service/rooms/alias/data.rs rename to conduit/src/service/rooms/alias/data.rs diff --git a/src/service/rooms/alias/mod.rs b/conduit/src/service/rooms/alias/mod.rs similarity index 100% rename from src/service/rooms/alias/mod.rs rename to conduit/src/service/rooms/alias/mod.rs diff --git a/src/service/rooms/auth_chain/data.rs b/conduit/src/service/rooms/auth_chain/data.rs similarity index 100% rename from src/service/rooms/auth_chain/data.rs rename to conduit/src/service/rooms/auth_chain/data.rs diff --git a/src/service/rooms/auth_chain/mod.rs b/conduit/src/service/rooms/auth_chain/mod.rs similarity index 100% rename from src/service/rooms/auth_chain/mod.rs rename to conduit/src/service/rooms/auth_chain/mod.rs diff --git a/src/service/rooms/directory/data.rs b/conduit/src/service/rooms/directory/data.rs similarity index 100% rename from src/service/rooms/directory/data.rs rename to conduit/src/service/rooms/directory/data.rs diff --git a/src/service/rooms/directory/mod.rs b/conduit/src/service/rooms/directory/mod.rs similarity index 100% rename from src/service/rooms/directory/mod.rs rename to conduit/src/service/rooms/directory/mod.rs diff --git a/src/service/rooms/edus/mod.rs b/conduit/src/service/rooms/edus/mod.rs similarity index 100% rename from src/service/rooms/edus/mod.rs rename to conduit/src/service/rooms/edus/mod.rs diff --git a/src/service/rooms/edus/presence/data.rs b/conduit/src/service/rooms/edus/presence/data.rs similarity index 100% rename from src/service/rooms/edus/presence/data.rs rename to conduit/src/service/rooms/edus/presence/data.rs diff --git a/src/service/rooms/edus/presence/mod.rs b/conduit/src/service/rooms/edus/presence/mod.rs similarity index 100% rename from src/service/rooms/edus/presence/mod.rs rename to conduit/src/service/rooms/edus/presence/mod.rs diff --git a/src/service/rooms/edus/read_receipt/data.rs b/conduit/src/service/rooms/edus/read_receipt/data.rs similarity index 100% rename from src/service/rooms/edus/read_receipt/data.rs rename to conduit/src/service/rooms/edus/read_receipt/data.rs diff --git a/src/service/rooms/edus/read_receipt/mod.rs b/conduit/src/service/rooms/edus/read_receipt/mod.rs similarity index 100% rename from src/service/rooms/edus/read_receipt/mod.rs rename to conduit/src/service/rooms/edus/read_receipt/mod.rs diff --git a/src/service/rooms/edus/typing/mod.rs b/conduit/src/service/rooms/edus/typing/mod.rs similarity index 100% rename from src/service/rooms/edus/typing/mod.rs rename to conduit/src/service/rooms/edus/typing/mod.rs diff --git a/src/service/rooms/event_handler/mod.rs b/conduit/src/service/rooms/event_handler/mod.rs similarity index 100% rename from src/service/rooms/event_handler/mod.rs rename to conduit/src/service/rooms/event_handler/mod.rs diff --git a/src/service/rooms/helpers/mod.rs b/conduit/src/service/rooms/helpers/mod.rs similarity index 100% rename from src/service/rooms/helpers/mod.rs rename to conduit/src/service/rooms/helpers/mod.rs diff --git a/src/service/rooms/lazy_loading/data.rs b/conduit/src/service/rooms/lazy_loading/data.rs similarity index 100% rename from src/service/rooms/lazy_loading/data.rs rename to conduit/src/service/rooms/lazy_loading/data.rs diff --git a/src/service/rooms/lazy_loading/mod.rs b/conduit/src/service/rooms/lazy_loading/mod.rs similarity index 100% rename from src/service/rooms/lazy_loading/mod.rs rename to conduit/src/service/rooms/lazy_loading/mod.rs diff --git a/src/service/rooms/metadata/data.rs b/conduit/src/service/rooms/metadata/data.rs similarity index 100% rename from src/service/rooms/metadata/data.rs rename to conduit/src/service/rooms/metadata/data.rs diff --git a/src/service/rooms/metadata/mod.rs b/conduit/src/service/rooms/metadata/mod.rs similarity index 100% rename from src/service/rooms/metadata/mod.rs rename to conduit/src/service/rooms/metadata/mod.rs diff --git a/src/service/rooms/mod.rs b/conduit/src/service/rooms/mod.rs similarity index 100% rename from src/service/rooms/mod.rs rename to conduit/src/service/rooms/mod.rs diff --git a/src/service/rooms/outlier/data.rs b/conduit/src/service/rooms/outlier/data.rs similarity index 100% rename from src/service/rooms/outlier/data.rs rename to conduit/src/service/rooms/outlier/data.rs diff --git a/src/service/rooms/outlier/mod.rs b/conduit/src/service/rooms/outlier/mod.rs similarity index 100% rename from src/service/rooms/outlier/mod.rs rename to conduit/src/service/rooms/outlier/mod.rs diff --git a/src/service/rooms/pdu_metadata/data.rs b/conduit/src/service/rooms/pdu_metadata/data.rs similarity index 100% rename from src/service/rooms/pdu_metadata/data.rs rename to conduit/src/service/rooms/pdu_metadata/data.rs diff --git a/src/service/rooms/pdu_metadata/mod.rs b/conduit/src/service/rooms/pdu_metadata/mod.rs similarity index 100% rename from src/service/rooms/pdu_metadata/mod.rs rename to conduit/src/service/rooms/pdu_metadata/mod.rs diff --git a/src/service/rooms/search/data.rs b/conduit/src/service/rooms/search/data.rs similarity index 100% rename from src/service/rooms/search/data.rs rename to conduit/src/service/rooms/search/data.rs diff --git a/src/service/rooms/search/mod.rs b/conduit/src/service/rooms/search/mod.rs similarity index 100% rename from src/service/rooms/search/mod.rs rename to conduit/src/service/rooms/search/mod.rs diff --git a/src/service/rooms/short/data.rs b/conduit/src/service/rooms/short/data.rs similarity index 100% rename from src/service/rooms/short/data.rs rename to conduit/src/service/rooms/short/data.rs diff --git a/src/service/rooms/short/mod.rs b/conduit/src/service/rooms/short/mod.rs similarity index 100% rename from src/service/rooms/short/mod.rs rename to conduit/src/service/rooms/short/mod.rs diff --git a/src/service/rooms/spaces/mod.rs b/conduit/src/service/rooms/spaces/mod.rs similarity index 100% rename from src/service/rooms/spaces/mod.rs rename to conduit/src/service/rooms/spaces/mod.rs diff --git a/src/service/rooms/state/data.rs b/conduit/src/service/rooms/state/data.rs similarity index 100% rename from src/service/rooms/state/data.rs rename to conduit/src/service/rooms/state/data.rs diff --git a/src/service/rooms/state/mod.rs b/conduit/src/service/rooms/state/mod.rs similarity index 100% rename from src/service/rooms/state/mod.rs rename to conduit/src/service/rooms/state/mod.rs diff --git a/src/service/rooms/state_accessor/data.rs b/conduit/src/service/rooms/state_accessor/data.rs similarity index 100% rename from src/service/rooms/state_accessor/data.rs rename to conduit/src/service/rooms/state_accessor/data.rs diff --git a/src/service/rooms/state_accessor/mod.rs b/conduit/src/service/rooms/state_accessor/mod.rs similarity index 100% rename from src/service/rooms/state_accessor/mod.rs rename to conduit/src/service/rooms/state_accessor/mod.rs diff --git a/src/service/rooms/state_cache/data.rs b/conduit/src/service/rooms/state_cache/data.rs similarity index 100% rename from src/service/rooms/state_cache/data.rs rename to conduit/src/service/rooms/state_cache/data.rs diff --git a/src/service/rooms/state_cache/mod.rs b/conduit/src/service/rooms/state_cache/mod.rs similarity index 100% rename from src/service/rooms/state_cache/mod.rs rename to conduit/src/service/rooms/state_cache/mod.rs diff --git a/src/service/rooms/state_compressor/data.rs b/conduit/src/service/rooms/state_compressor/data.rs similarity index 100% rename from src/service/rooms/state_compressor/data.rs rename to conduit/src/service/rooms/state_compressor/data.rs diff --git a/src/service/rooms/state_compressor/mod.rs b/conduit/src/service/rooms/state_compressor/mod.rs similarity index 100% rename from src/service/rooms/state_compressor/mod.rs rename to conduit/src/service/rooms/state_compressor/mod.rs diff --git a/src/service/rooms/threads/data.rs b/conduit/src/service/rooms/threads/data.rs similarity index 100% rename from src/service/rooms/threads/data.rs rename to conduit/src/service/rooms/threads/data.rs diff --git a/src/service/rooms/threads/mod.rs b/conduit/src/service/rooms/threads/mod.rs similarity index 100% rename from src/service/rooms/threads/mod.rs rename to conduit/src/service/rooms/threads/mod.rs diff --git a/src/service/rooms/timeline/data.rs b/conduit/src/service/rooms/timeline/data.rs similarity index 100% rename from src/service/rooms/timeline/data.rs rename to conduit/src/service/rooms/timeline/data.rs diff --git a/src/service/rooms/timeline/mod.rs b/conduit/src/service/rooms/timeline/mod.rs similarity index 100% rename from src/service/rooms/timeline/mod.rs rename to conduit/src/service/rooms/timeline/mod.rs diff --git a/src/service/rooms/user/data.rs b/conduit/src/service/rooms/user/data.rs similarity index 100% rename from src/service/rooms/user/data.rs rename to conduit/src/service/rooms/user/data.rs diff --git a/src/service/rooms/user/mod.rs b/conduit/src/service/rooms/user/mod.rs similarity index 100% rename from src/service/rooms/user/mod.rs rename to conduit/src/service/rooms/user/mod.rs diff --git a/src/service/sending/data.rs b/conduit/src/service/sending/data.rs similarity index 100% rename from src/service/sending/data.rs rename to conduit/src/service/sending/data.rs diff --git a/src/service/sending/mod.rs b/conduit/src/service/sending/mod.rs similarity index 100% rename from src/service/sending/mod.rs rename to conduit/src/service/sending/mod.rs diff --git a/src/service/transaction_ids/data.rs b/conduit/src/service/transaction_ids/data.rs similarity index 100% rename from src/service/transaction_ids/data.rs rename to conduit/src/service/transaction_ids/data.rs diff --git a/src/service/transaction_ids/mod.rs b/conduit/src/service/transaction_ids/mod.rs similarity index 100% rename from src/service/transaction_ids/mod.rs rename to conduit/src/service/transaction_ids/mod.rs diff --git a/src/service/uiaa/data.rs b/conduit/src/service/uiaa/data.rs similarity index 100% rename from src/service/uiaa/data.rs rename to conduit/src/service/uiaa/data.rs diff --git a/src/service/uiaa/mod.rs b/conduit/src/service/uiaa/mod.rs similarity index 100% rename from src/service/uiaa/mod.rs rename to conduit/src/service/uiaa/mod.rs diff --git a/src/service/users/data.rs b/conduit/src/service/users/data.rs similarity index 100% rename from src/service/users/data.rs rename to conduit/src/service/users/data.rs diff --git a/src/service/users/mod.rs b/conduit/src/service/users/mod.rs similarity index 100% rename from src/service/users/mod.rs rename to conduit/src/service/users/mod.rs diff --git a/src/utils/error.rs b/conduit/src/utils/error.rs similarity index 100% rename from src/utils/error.rs rename to conduit/src/utils/error.rs diff --git a/src/utils/mod.rs b/conduit/src/utils/mod.rs similarity index 100% rename from src/utils/mod.rs rename to conduit/src/utils/mod.rs diff --git a/nix/pkgs/default/default.nix b/nix/pkgs/default/default.nix index c54b6a70..1d923745 100644 --- a/nix/pkgs/default/default.nix +++ b/nix/pkgs/default/default.nix @@ -43,7 +43,7 @@ let commonAttrs = { inherit (craneLib.crateNameFromCargoToml { - cargoToml = "${inputs.self}/Cargo.toml"; + cargoToml = "${inputs.self}/conduit/Cargo.toml"; }) pname version; @@ -56,7 +56,7 @@ let ".cargo" "Cargo.lock" "Cargo.toml" - "src" + "conduit" ]; }; diff --git a/taplo.toml b/taplo.toml index 04780b4a..c274a2bc 100644 --- a/taplo.toml +++ b/taplo.toml @@ -15,10 +15,10 @@ reorder_arrays = false # Prevent breaking license file order [[rule]] -include = ["Cargo.toml"] +include = ["conduit/Cargo.toml"] # https://github.com/tamasfe/taplo/issues/608 # keys = ["package.metadata.deb.license-file", "package.metadata.deb.assets"] -keys = ["package.metadata.deb", "package.metadata.deb.assets"] +keys = ["package.metadata.deb"] [rule.formatting] reorder_arrays = false