Set up Linux dev environment: build/run fixes + Cursor Cloud docs#53
Merged
Conversation
- 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]>
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]>
Co-authored-by: Sam Precious <[email protected]>
7d6c8c4 to
8adc775
Compare
…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]>
Co-authored-by: Sam Precious <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sets up the Volt development environment on Linux, gets the SDL3 editor building/running end-to-end, and makes the full
cargo xtask cigate (fmt-check, check, clippy-D warnings, tests) pass on all platforms. Rebased onto latestmaster. Adds a## Cursor Cloud specific instructionssection toAgents.md.Code changes (all fix pre-existing cross-platform breakage on
master)Build / runtime
editor-syntax—compile_command()selected the MSVC path via runtimeif cfg!(windows), compiling both arms on every target and referencing#[cfg(windows)]-only items → Linux/macOSE0425. Now compile-time gated so the MSVC helper,InstallCommandSpec::with_env, andfind-msvc-toolsare Windows-only.editor-sdl/browser_host.rs— initialize GTK before constructing thewry::WebContext, fixing the Linux startup panic (GTK has not been initialized).cargo xtask ciclippy (-D warnings)3.
editor-syntax— the gated MSVC branch's trailingreturnbecame aneedless_returnon Windows; return it as a tail expression (verified the cfg-gated block still yields the fn value).4.
editor-sdl— gate thestd::envimport to Windows (its only user); mark the Windows-onlylaunch_envinitial valueallow(unused_assignments)off Windows.cargo xtask citests5.
editor-syntax—registry_*tests hard-coded\separators (not split byPathon Linux); use/(portable, accepted on Windows too).6.
volt-user—buffer_picker_labelusedPath::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~1vsrunneradmin) on the Windows runner.Environment
.github/workflows/ci.yml.cargo fetch. GUI runs on the VNC desktop (DISPLAY=:1,LIBGL_ALWAYS_SOFTWARE=1).Verification
cargo xtask ci— fully green on Linux (fmt-check, check, clippy-D warnings, all test binaries pass).x86_64-pc-windows-gnu+ mingw):cargo clippy -p editor-syntax --all-targets --target x86_64-pc-windows-gnu -- -D warningsand the same foreditor-fsboth pass, confirming theneedless_returnfix and Windows-gated test compile cleanly. (The Windows-onlyeditor-fsworktree 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.