diff --git a/README.md b/README.md index b2ca954..330dc63 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ its own Wave configuration. | `pyBench` | `py-bench` | `devBenches/pyBench` | Python development container | | `flutterBench` | `flutter-bench` | `devBenches/flutterBench` | Flutter container; requires the bench to be installed | | `C++Bench` | `cpp-bench` | `devBenches/cppBench` | C++ development container with Powerlevel10k shell config | +| `rustBench` | `rust-bench` | `devBenches/rustBench` | Rust development, cross-compilation, and WebAssembly container | | `cloudBench` | `cloud-bench` | `sysBenches/cloudBench` | Cloud tooling container with home, Azure config, and Docker socket mounts | ## How It Works diff --git a/bin/wave-container-shell.sh b/bin/wave-container-shell.sh index fbf242c..9a41791 100755 --- a/bin/wave-container-shell.sh +++ b/bin/wave-container-shell.sh @@ -27,6 +27,11 @@ resolve_bench_defaults() { bench_dir="$workbenches_root/devBenches/cppBench" compose_file="$bench_dir/.devcontainer/docker-compose.yml" ;; + rustBench|rust-bench) + container="rust-bench" + bench_dir="$workbenches_root/devBenches/rustBench" + compose_file="$bench_dir/.devcontainer/docker-compose.yml" + ;; flutterBench|flutter-bench) container="flutter-bench" bench_dir="$workbenches_root/devBenches/flutterBench" diff --git a/docs/workbenches-widgets.md b/docs/workbenches-widgets.md index 805b95f..48b4947 100644 --- a/docs/workbenches-widgets.md +++ b/docs/workbenches-widgets.md @@ -103,6 +103,19 @@ The C++ container needs the shell config mounts for Powerlevel10k: The launcher checks for the required mounts and recreates the container if an older compose-only container is missing them. +### rustBench + +- Widget key: `rustBench` +- Label: `rustBench` +- Icon: `brands@rust` +- Container: `rust-bench` +- Bench directory: `devBenches/rustBench` +- Compose file: `devBenches/rustBench/.devcontainer/docker-compose.yml` + +The Rust widget follows the same container-shell contract as `pyBench`. It +starts or repairs the personalized Rust bench, then opens an interactive `zsh` +shell with the shared workBenches mounts. + ### cloudBench - Widget key: `cloudBench` @@ -149,6 +162,7 @@ Then test the launcher directly: ```bash ~/projects/workBenches/scripts/wave-container-shell.sh --check pyBench +~/projects/workBenches/scripts/wave-container-shell.sh --check rustBench ``` ### Powerlevel10k Setup Appears diff --git a/scripts/install-workbenches-widgets.sh b/scripts/install-workbenches-widgets.sh index 79dac0c..df76871 100755 --- a/scripts/install-workbenches-widgets.sh +++ b/scripts/install-workbenches-widgets.sh @@ -9,6 +9,7 @@ workbenches_root="${WORKBENCHES_ROOT:-$home_dir/projects/workBenches}" projects_root="${PROJECTS_ROOT:-$home_dir/projects}" wsl_connection="${WAVE_WSL_CONNECTION:-wsl://Ubuntu-24.04}" font_size="${WAVE_WIDGET_FONT_SIZE:-16}" +install_launcher=true is_wsl() { [ -n "${WSL_DISTRO_NAME:-}" ] || grep -qi microsoft /proc/version 2>/dev/null @@ -43,6 +44,7 @@ Options: --wsl-connection URI Wave WSL connection URI (default: wsl://Ubuntu-24.04) --font-size POINTS Widget font size (default: 16) --waveterm-config PATH Wave config directory (default: Windows Wave config on WSL, otherwise ~/.config/waveterm) + --skip-launcher Update Wave config without replacing the workBenches launcher -h, --help Show this help EOF } @@ -54,6 +56,7 @@ while [[ $# -gt 0 ]]; do --wsl-connection) wsl_connection="$2"; shift 2 ;; --font-size) font_size="$2"; shift 2 ;; --waveterm-config) waveterm_config_dir="$2"; shift 2 ;; + --skip-launcher) install_launcher=false; shift ;; -h|--help) usage; exit 0 ;; --*) echo "Unknown option: $1" >&2; usage >&2; exit 1 ;; *) echo "Unexpected argument: $1" >&2; usage >&2; exit 1 ;; @@ -79,7 +82,9 @@ workbenches_root="$(cd "$workbenches_root" && pwd)" mkdir -p "$workbenches_root/scripts" "$projects_root" "$waveterm_config_dir" projects_root="$(cd "$projects_root" && pwd)" -install -m 755 "$repo_dir/bin/wave-container-shell.sh" "$workbenches_root/scripts/wave-container-shell.sh" +if [[ "$install_launcher" == true ]]; then + install -m 755 "$repo_dir/bin/wave-container-shell.sh" "$workbenches_root/scripts/wave-container-shell.sh" +fi template_file="$repo_dir/templates/workbenches.widgets.json" widgets_file="$waveterm_config_dir/widgets.json" @@ -128,7 +133,11 @@ else: connections_file.write_text(json.dumps(connections, indent=2) + "\n", encoding="utf-8") PY -echo "Installed launcher: $workbenches_root/scripts/wave-container-shell.sh" +if [[ "$install_launcher" == true ]]; then + echo "Installed launcher: $workbenches_root/scripts/wave-container-shell.sh" +else + echo "Launcher unchanged: $workbenches_root/scripts/wave-container-shell.sh" +fi echo "Updated widgets: $widgets_file" echo "Updated connections: $connections_file" echo "Projects widget root: $projects_root" diff --git a/templates/workbenches.widgets.json b/templates/workbenches.widgets.json index 520c0da..13654a8 100644 --- a/templates/workbenches.widgets.json +++ b/templates/workbenches.widgets.json @@ -77,6 +77,22 @@ } } }, + "rustBench": { + "icon": "brands@rust", + "label": "rustBench", + "description": "Open the rust-bench container shell", + "blockdef": { + "meta": { + "view": "term", + "controller": "shell", + "frame:title": "rustBench", + "connection": "__WSL_CONNECTION__", + "term:fontsize": __WAVE_WIDGET_FONT_SIZE__, + "cmd:cwd": "__WORKBENCHES_ROOT__", + "cmd:initscript": "exec __WORKBENCHES_ROOT__/scripts/wave-container-shell.sh --title rustBench rustBench" + } + } + }, "cloudBench": { "icon": "cloud", "label": "cloudBench",