From df39d827168e723da0af23b5e6a811da85ef28e8 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Wed, 14 Jan 2026 15:08:19 +1100 Subject: [PATCH 1/2] Auto-run torrential in development --- server/internal/services/services/torrential.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/internal/services/services/torrential.ts b/server/internal/services/services/torrential.ts index 023ea99f..4a10662e 100644 --- a/server/internal/services/services/torrential.ts +++ b/server/internal/services/services/torrential.ts @@ -13,7 +13,21 @@ export const TORRENTIAL_SERVICE = new Service( "torrential", () => { const localDir = fs.readdirSync("."); - if ("torrential" in localDir) return spawn("./torrential", [], {}); + if ("torrential" in localDir) { + const stat = fs.statSync("./torrential"); + if (stat.isDirectory()) { + // in dev and we have the submodule + logger.info("torrential detected in development mode - building from source") + return spawn( + "cargo run --manifest-path ./torrential/Cargo.toml", + [], + {}, + ); + } else { + // binary + return spawn("./torrential", [], {}); + } + } const envPath = process.env.TORRENTIAL_PATH; if (envPath) return spawn(envPath, [], {}); From 02dc41b035fc7e576d38523000d7bdba493374ae Mon Sep 17 00:00:00 2001 From: DecDuck Date: Wed, 14 Jan 2026 15:10:24 +1100 Subject: [PATCH 2/2] fix: lint --- server/internal/services/services/torrential.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/internal/services/services/torrential.ts b/server/internal/services/services/torrential.ts index 4a10662e..91543363 100644 --- a/server/internal/services/services/torrential.ts +++ b/server/internal/services/services/torrential.ts @@ -17,7 +17,9 @@ export const TORRENTIAL_SERVICE = new Service( const stat = fs.statSync("./torrential"); if (stat.isDirectory()) { // in dev and we have the submodule - logger.info("torrential detected in development mode - building from source") + logger.info( + "torrential detected in development mode - building from source", + ); return spawn( "cargo run --manifest-path ./torrential/Cargo.toml", [],