Skip to content

Set up Linux dev environment: build/run fixes + Cursor Cloud docs#53

Merged
samwdp merged 10 commits into
masterfrom
cursor/setup-dev-environment-6f85
Jul 3, 2026
Merged

Set up Linux dev environment: build/run fixes + Cursor Cloud docs#53
samwdp merged 10 commits into
masterfrom
cursor/setup-dev-environment-6f85

Conversation

@samwdp

@samwdp samwdp commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up the Volt development environment on Linux, gets the SDL3 editor building/running end-to-end, and makes the full cargo xtask ci gate (fmt-check, check, clippy -D warnings, tests) pass on all platforms. Rebased onto latest master. Adds a ## Cursor Cloud specific instructions section to Agents.md.

Code changes (all fix pre-existing cross-platform breakage on master)

Build / runtime

  1. editor-syntaxcompile_command() selected the MSVC path via runtime if cfg!(windows), compiling both arms on every target and referencing #[cfg(windows)]-only items → Linux/macOS E0425. Now compile-time gated so the MSVC helper, InstallCommandSpec::with_env, and find-msvc-tools are Windows-only.
  2. editor-sdl/browser_host.rs — initialize GTK before constructing the wry::WebContext, fixing the Linux startup panic (GTK has not been initialized).

cargo xtask ci clippy (-D warnings)
3. editor-syntax — the gated MSVC branch's trailing return became a needless_return on Windows; return it as a tail expression (verified the cfg-gated block still yields the fn value).
4. editor-sdl — gate the std::env import to Windows (its only user); mark the Windows-only launch_env initial value allow(unused_assignments) off Windows.

cargo xtask ci tests
5. editor-syntaxregistry_* tests hard-coded \ separators (not split by Path on Linux); use / (portable, accepted on Windows too).
6. volt-userbuffer_picker_label used Path::file_name (doesn't split \ off Windows); extract the final component treating both / and \ as separators, so Windows-style buffer paths render a clean label on every host.
7. editor-fs (Windows-only test) — compare canonicalized repo roots so the worktree assertion is stable against 8.3 short-name vs long-name expansion (RUNNER~1 vs runneradmin) on the Windows runner.

Environment

  • Rust stable (>= 1.91, edition 2024); Linux native libs per .github/workflows/ci.yml.
  • Update script: cargo fetch. GUI runs on the VNC desktop (DISPLAY=:1, LIBGL_ALWAYS_SOFTWARE=1).

Verification

  • cargo xtask cifully green on Linux (fmt-check, check, clippy -D warnings, all test binaries pass).
  • ✅ Windows target cross-checks (via x86_64-pc-windows-gnu + mingw): cargo clippy -p editor-syntax --all-targets --target x86_64-pc-windows-gnu -- -D warnings and the same for editor-fs both pass, confirming the needless_return fix and Windows-gated test compile cleanly. (The Windows-only editor-fs worktree test can't be executed off Windows, but is compile/clippy-checked and the 8.3 normalization is standard.)
  • cargo run -p volt — visible SDL shell + Vim-style text editing (below).

volt_rebased_hello_world_retest.mp4

Volt editor with typed text after rebase

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

@samwdp samwdp marked this pull request as ready for review July 3, 2026 05:59
cursoragent and others added 4 commits July 3, 2026 06:08
- editor-syntax: un-gate windows_msvc_target_triple so the runtime
  cfg!(windows) branch compiles on non-Windows targets (fixes E0425 that
  broke the workspace build on Linux/macOS in CI).
- editor-sdl browser host: initialize GTK before constructing the wry
  WebContext on Linux so webkit2gtk types do not panic at shell startup.

Co-authored-by: Sam Precious <[email protected]>
Instead of un-gating windows_msvc_target_triple, compile-time gate the
whole MSVC branch in compile_command with #[cfg(windows)] / #[cfg(not(windows))]
so the Windows-only helper, the InstallCommandSpec::with_env writer, and the
find-msvc-tools dependency are only built on Windows. This fixes the Linux/macOS
build (previous E0425 from a runtime cfg!(windows) check) without compiling dead
MSVC code on non-Windows targets.

Co-authored-by: Sam Precious <[email protected]>
@cursor cursor Bot force-pushed the cursor/setup-dev-environment-6f85 branch from 7d6c8c4 to 8adc775 Compare July 3, 2026 06:16
cursoragent and others added 6 commits July 3, 2026 06:33
…ranch

After compile-time gating the MSVC branch, its trailing return became the
function tail expression on Windows, tripping clippy::needless_return under
-D warnings. Return the InstallCommandSpec as a tail expression instead
(verified the cfg-gated block still yields the fn value on the active target).

Co-authored-by: Sam Precious <[email protected]>
- browser_host: gate the std::env import to Windows, where it is the only
  consumer (browser_additional_args), fixing unused_import on Linux/macOS.
- acp: the initial launch_env value is only read by the Windows-only node
  manager retry, so mark it allow(unused_assignments) off Windows.

Co-authored-by: Sam Precious <[email protected]>
The registry_* filename/glob tests hard-coded Windows backslash separators,
which std::path::Path does not split on Linux/macOS, so filename and glob
matching failed there. Use forward slashes, which Path treats as a separator
on every platform, keeping the tests' intent while making them portable.

Co-authored-by: Sam Precious <[email protected]>
buffer_picker_label used Path::file_name, which does not split backslashes on
non-Windows hosts, so a Windows-style buffer path rendered the whole path as the
label off Windows (failing the cross-platform picker test). Extract the final
component treating both / and \ as separators.

Co-authored-by: Sam Precious <[email protected]>
… test

The worktree .git reference is written with a canonicalized (long-form) path, so
the resolved repository root could differ from the expected path purely by 8.3
short-name vs long-name expansion (e.g. RUNNER~1 vs runneradmin) on some Windows
hosts. Compare canonicalized forms so the assertion is stable.

Co-authored-by: Sam Precious <[email protected]>
@samwdp samwdp merged commit 68fc0ab into master Jul 3, 2026
6 checks passed
@samwdp samwdp deleted the cursor/setup-dev-environment-6f85 branch July 3, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants