diff options
| author | Doan Luu Duc Tai <doan@luuduct.ai> | 2026-10-30 21:39:57 -0500 |
|---|---|---|
| committer | Doan Luu Duc Tai <doan@luuduct.ai> | 2026-10-30 21:39:57 -0500 |
| commit | 556eaa133e9cfe7f4c8e542708119fdfd311357e (patch) | |
| tree | 57ae2a9c5455f335e8c34b293f4f13975cb3d09e /src/main.rs | |
| parent | 143880db086c617b843340ca7023a879507761f8 (diff) | |
Implement experimental file-based encrypted private chat
Add fixed-suite Rust/WASI identity files, signed challenge authentication, ciphertext-only SQLite storage, a minimal LibreJS-compatible interface, and consistent backup snapshots. Keep production unchanged and document the local workflow, limits, source distribution, and browser recovery tests.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index beba5b0..08c88f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,6 +49,11 @@ struct Cli { #[derive(Debug, Subcommand)] enum Action { + #[command(about = "Run the experimental local chat or initialize its single .env")] + Chat { + #[arg(long)] + init: bool, + }, #[command(about = "Start the local development services")] Dev { #[arg(long, default_value_t = 8080)] @@ -127,6 +132,16 @@ fn execute(arguments: Cli) -> Result<()> { return archive::restore(&absolute(archive)?, &absolute(destination)?); } let project = Project::discover(arguments.root.as_deref())?; + if let Action::Chat { init } = arguments.command { + let mut command = project.command("cargo")?; + command + .args(["run", "--locked", "-p", "stack-chat-server", "--", "--root"]) + .arg(&project.root); + if init { + command.arg("--init"); + } + return process::run(&mut command); + } let _operation = project.lock()?; match arguments.command { Action::Dev { port } => { @@ -186,6 +201,7 @@ fn execute(arguments: Cli) -> Result<()> { Action::Activate { archive } => release::activate(&absolute(&archive)?, &project), Action::Check => check(&project), Action::Licenses => licenses(&project), + Action::Chat { .. } => anyhow::bail!("Chat action was not handled"), Action::Restore { .. } => anyhow::bail!("Restore action was not handled"), } } |
