diff --git a/Cargo.lock b/Cargo.lock index 474e9a0..e1630f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2863,6 +2863,47 @@ dependencies = [ "web-sys", ] +[[package]] +name = "letterbox-server" +version = "0.0.77" +dependencies = [ + "ammonia", + "anyhow", + "async-graphql", + "async-graphql-rocket", + "async-trait", + "build-info", + "build-info-build", + "cacher", + "chrono", + "clap", + "css-inline", + "html-escape", + "linkify", + "log", + "lol_html", + "mailparse", + "maplit", + "memmap", + "notmuch", + "opentelemetry", + "reqwest 0.12.9", + "rocket", + "rocket_cors", + "scraper", + "serde", + "serde_json", + "shared", + "sqlx", + "tantivy", + "thiserror 1.0.69", + "tokio 1.42.0", + "tracing", + "url", + "urlencoding", + "xtracing", +] + [[package]] name = "levenshtein_automata" version = "0.2.1" @@ -5137,47 +5178,6 @@ dependencies = [ "serde", ] -[[package]] -name = "server" -version = "0.0.77" -dependencies = [ - "ammonia", - "anyhow", - "async-graphql", - "async-graphql-rocket", - "async-trait", - "build-info", - "build-info-build", - "cacher", - "chrono", - "clap", - "css-inline", - "html-escape", - "linkify", - "log", - "lol_html", - "mailparse", - "maplit", - "memmap", - "notmuch", - "opentelemetry", - "reqwest 0.12.9", - "rocket", - "rocket_cors", - "scraper", - "serde", - "serde_json", - "shared", - "sqlx", - "tantivy", - "thiserror 1.0.69", - "tokio 1.42.0", - "tracing", - "url", - "urlencoding", - "xtracing", -] - [[package]] name = "servo_arc" version = "0.1.1" diff --git a/server/Cargo.toml b/server/Cargo.toml index d1a2e23..7816a28 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "server" +name = "letterbox-server" version = "0.0.77" edition = "2021" -default-run = "server" +default-run = "letterbox-server" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/server/src/bin/server.rs b/server/src/bin/letterbox-server.rs similarity index 99% rename from server/src/bin/server.rs rename to server/src/bin/letterbox-server.rs index 832d29d..c22ee20 100644 --- a/server/src/bin/server.rs +++ b/server/src/bin/letterbox-server.rs @@ -7,6 +7,14 @@ use std::{error::Error, io::Cursor, str::FromStr}; use async_graphql::{extensions, http::GraphiQLSource, EmptySubscription, Schema}; use async_graphql_rocket::{GraphQLQuery, GraphQLRequest, GraphQLResponse}; +#[cfg(feature = "tantivy")] +use letterbox_server::tantivy::TantivyConnection; +use letterbox_server::{ + config::Config, + error::ServerError, + graphql::{Attachment, GraphqlSchema, Mutation, QueryRoot}, + nm::{attachment_bytes, cid_attachment_bytes}, +}; use notmuch::{Notmuch, NotmuchError, ThreadSet}; use rocket::{ fairing::AdHoc, @@ -17,14 +25,6 @@ use rocket::{ Response, State, }; use rocket_cors::{AllowedHeaders, AllowedOrigins}; -#[cfg(feature = "tantivy")] -use server::tantivy::TantivyConnection; -use server::{ - config::Config, - error::ServerError, - graphql::{Attachment, GraphqlSchema, Mutation, QueryRoot}, - nm::{attachment_bytes, cid_attachment_bytes}, -}; use sqlx::postgres::PgPool; #[get("/show//pretty")]