From b660c5cdd88edf2703b6d3e893129cbb1f4aa658 Mon Sep 17 00:00:00 2001 From: Max Newcomer Date: Mon, 16 Sep 2024 08:58:03 -0500 Subject: [PATCH 1/2] chore: rename repository and packages --- Dockerfile | 6 +++--- Dockerfile.dev | 2 +- README.md | 10 +++++++--- server/Cargo.toml | 2 +- server/src/main.rs | 7 ++++--- tui/Cargo.toml | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e90c9e..67b2627 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json # Build application COPY . . -RUN cargo build --release --package yrs-relay +RUN cargo build --release --package contactor # We do not need the Rust toolchain to run the binary! FROM debian:stable-slim AS runtime @@ -21,6 +21,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl \ WORKDIR /app -COPY --from=builder /app/target/release/yrs-relay /usr/local/bin +COPY --from=builder /app/target/release/contactor /usr/local/bin -ENTRYPOINT ["/usr/local/bin/yrs-relay"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/contactor"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index d216be5..8bfed45 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -14,4 +14,4 @@ COPY . . EXPOSE 8001 # Command to run cargo watch -ENTRYPOINT cargo watch -w server -- cargo run --package yrs-relay +ENTRYPOINT cargo watch -w server -- cargo run --package contactor diff --git a/README.md b/README.md index cc63e47..bfc33e0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# yrs-relay +# contactor -A [Yjs](https://yjs.dev/) compatible, highly available, websockets server. + + +A distributed, eventually persisted, websocket framework. + +Initially designed to be compatible [Yjs](https://yjs.dev/). ## System Design @@ -23,7 +27,7 @@ docker compose up To run the Tui just run ```shell -cargo run --bin yrs-relay-tui +cargo run --bin contactor-tui ``` ## Deployment diff --git a/server/Cargo.toml b/server/Cargo.toml index bbd6c49..e8b4163 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "yrs-relay" +name = "contactor" version = "0.1.0" edition = "2021" diff --git a/server/src/main.rs b/server/src/main.rs index cc1e5c1..3eabca8 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -7,9 +7,10 @@ use tokio::net::TcpListener; use tracing::info; use tracing::warn; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; -use yrs_relay::api::ws_handler; -use yrs_relay::api::AppState; -use yrs_relay::relay::RelayNode; + +use contactor::api::ws_handler; +use contactor::api::AppState; +use contactor::relay::RelayNode; #[derive(Debug, Deserialize)] struct AppConfig { diff --git a/tui/Cargo.toml b/tui/Cargo.toml index d10cee3..97a3102 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "yrs-relay-tui" +name = "contactor-tui" version = "0.1.0" edition = "2021" From f2956cc092de70999b5ec88ad53a0a40667c89d6 Mon Sep 17 00:00:00 2001 From: Max Newcomer Date: Mon, 16 Sep 2024 08:58:50 -0500 Subject: [PATCH 2/2] fix: remove comment in readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index bfc33e0..a853dce 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # contactor - - A distributed, eventually persisted, websocket framework. Initially designed to be compatible [Yjs](https://yjs.dev/).