From 0b64eab148edbafb43187173455cda33ca4c570a Mon Sep 17 00:00:00 2001 From: Hare Date: Wed, 29 Jul 2026 19:57:59 +0900 Subject: [PATCH] build: enable runtime server features by default --- crates/worker-runtime/Cargo.toml | 2 +- crates/worker-runtime/README.md | 2 -- crates/workspace-server/Cargo.toml | 2 +- docs/development/server-runtime-auth.md | 1 - package.nix | 2 +- scripts/dev-workspace.sh | 2 +- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/worker-runtime/Cargo.toml b/crates/worker-runtime/Cargo.toml index 4d3af0e3..93811130 100644 --- a/crates/worker-runtime/Cargo.toml +++ b/crates/worker-runtime/Cargo.toml @@ -17,7 +17,7 @@ path = "src/worker_runtime_bin.rs" required-features = ["ws-server", "fs-store"] [features] -default = [] +default = ["ws-server", "fs-store"] fs-store = [] http-server = ["dep:axum", "dep:tower", "dep:reqwest"] ws-server = ["http-server", "axum/ws", "dep:futures", "tokio/sync"] diff --git a/crates/worker-runtime/README.md b/crates/worker-runtime/README.md index 0b71377e..a4882229 100644 --- a/crates/worker-runtime/README.md +++ b/crates/worker-runtime/README.md @@ -8,7 +8,6 @@ From the repository root: ```bash cargo run -p worker-runtime \ - --features ws-server,fs-store \ --bin yoi-runtime \ -- --bind 127.0.0.1:38800 ``` @@ -23,7 +22,6 @@ To bind another address explicitly: ```bash cargo run -p worker-runtime \ - --features ws-server,fs-store \ --bin yoi-runtime \ -- --bind 0.0.0.0:38800 ``` diff --git a/crates/workspace-server/Cargo.toml b/crates/workspace-server/Cargo.toml index 911c1c83..8aa6ef83 100644 --- a/crates/workspace-server/Cargo.toml +++ b/crates/workspace-server/Cargo.toml @@ -30,7 +30,7 @@ memory.workspace = true tokio = { workspace = true, features = ["fs", "macros", "net", "rt-multi-thread", "sync"] } tokio-tungstenite.workspace = true worker.workspace = true -worker-runtime = { workspace = true, features = ["ws-server", "fs-store"] } +worker-runtime.workspace = true toml.workspace = true tracing.workspace = true url.workspace = true diff --git a/docs/development/server-runtime-auth.md b/docs/development/server-runtime-auth.md index 7cc2090d..5345e560 100644 --- a/docs/development/server-runtime-auth.md +++ b/docs/development/server-runtime-auth.md @@ -137,7 +137,6 @@ For repository builds, the equivalent cargo command is: ```bash cargo run -p worker-runtime \ - --features ws-server,fs-store \ --bin yoi-runtime \ -- --bind 127.0.0.1:38800 ``` diff --git a/package.nix b/package.nix index 1250811e..6850ae31 100644 --- a/package.nix +++ b/package.nix @@ -93,7 +93,7 @@ rustPlatform.buildRustPackage rec { postBuild = '' cargo build --offline --profile release -p yoi-workspace-server --bin yoi-server - cargo build --offline --profile release -p worker-runtime --bin yoi-runtime --features ws-server,fs-store + cargo build --offline --profile release -p worker-runtime --bin yoi-runtime ''; # The package check is a credential-free install smoke check below. Running the diff --git a/scripts/dev-workspace.sh b/scripts/dev-workspace.sh index 45eca3e4..9190dce3 100644 --- a/scripts/dev-workspace.sh +++ b/scripts/dev-workspace.sh @@ -307,7 +307,7 @@ build_runtime_backend() { log "building runtime binary" ( cd "$ROOT_DIR" - run_cargo build -p worker-runtime --features ws-server,fs-store --bin yoi-runtime + run_cargo build -p worker-runtime --bin yoi-runtime ) else log "runtime disabled by YOI_DEV_RUNTIME_ENABLED=0; skipping runtime build"