Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions bin/wave-container-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 14 additions & 0 deletions docs/workbenches-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions scripts/install-workbenches-widgets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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 ;;
Expand All @@ -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
Comment on lines +85 to +87

template_file="$repo_dir/templates/workbenches.widgets.json"
widgets_file="$waveterm_config_dir/widgets.json"
Expand Down Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions templates/workbenches.widgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down