cli: initial wsl control server

Adds an stdin/out json rpc server for wsl.

Exposes a singular install_local command to install+boot the vscode server on a port from a local archive.

Also refines the common rpc layer some more. I'm decently happy with it now.
This commit is contained in:
Connor Peet
2023-01-17 16:05:25 -08:00
parent ebc7a21d55
commit 2c2ead679b
21 changed files with 554 additions and 137 deletions

View File

@@ -8,7 +8,7 @@ use std::process::Command;
use clap::Parser;
use cli::{
commands::{args, tunnels, update, version, CommandContext},
commands::{args, internal_wsl, tunnels, update, version, CommandContext},
constants::get_default_user_agent,
desktop, log as own_log,
state::LauncherPaths,
@@ -58,6 +58,9 @@ async fn main() -> Result<(), std::convert::Infallible> {
..
}) => match cmd {
args::StandaloneCommands::Update(args) => update::update(context, args).await,
args::StandaloneCommands::Wsl(args) => match args.command {
args::WslCommands::Serve => internal_wsl::serve(context).await,
},
},
args::AnyCli::Standalone(args::StandaloneCli { core: c, .. })
| args::AnyCli::Integrated(args::IntegratedCli { core: c, .. }) => match c.subcommand {