fix: cross-platform support for macOS and Windows#2
Merged
farhan-syah merged 9 commits intomainfrom Apr 14, 2026
Merged
Conversation
Run cargo fmt across the workspace and fix clippy lints including collapsible-if statements and map_or -> is_some_and conversions.
- Replace Linux-only libc::__errno_location with portable std::io::Error::last_os_error (fixes #1) - Replace windows crate dependency with taskkill for process termination on Windows - Fix macOS dylib install_name for rpath resolution in cell compiler - Canonicalize paths in file watcher for macOS symlink compatibility (/tmp -> /private/tmp) - Use platform-correct dylib extensions in cranelift integration tests - Fix "Cranelift JIT" references to "Cranelift" across docs and code
- ci.yml: thin wrapper calling reusable test workflow, with concurrency control and draft PR skip - test.yml: lint (fmt + clippy) and test on Linux, macOS, Windows with nightly Cranelift backend for integration tests - release.yml: tag-based release pipeline with version validation, tiered crates.io publishing, cross-platform binary builds (5 targets), and GitHub Release with prerelease support - Add development setup instructions to README
- Remove Windows job object code that depended on missing windows-sys types (JOBOBJECT_EXTENDED_LIMIT_INFORMATION, CreateJobObjectW); process cleanup already handled via PID tracking + taskkill - Remove unused windows-sys dependency from venus-server - Fix test_watcher_ignores_non_rust_files by watching directory instead of file to avoid FSEvents spurious events on macOS
macOS FSEvents emits directory-level events that can spuriously trigger the .rs file filter when .rs files exist in the same directory. Use a directory with no .rs files to reliably test extension filtering.
- source_editor tests: replace NamedTempFile with TempDir + manual file to avoid Windows exclusive file lock conflicts when SourceEditor opens the same file - watcher test: use empty directory with no .rs files to prevent macOS FSEvents spurious directory-level events from triggering false matches
fs2 locks on Windows are mandatory and block all file access from other handles, including fs::read_to_string and fs::write on the same file. Restrict advisory locking to Unix where it doesn't interfere with I/O.
b94941b to
59628a0
Compare
Cross-library linking tests (test_cranelift_compilation, test_cross_library_call) use Unix-specific rpath and -l flags that don't work on Windows where import libraries (.lib) are required instead.
Windows backslashes in path strings are treated as escape sequences in TOML, causing parse errors (e.g. \v in D:\venus). Convert all paths to forward slashes which work on all platforms.
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
libc::__errno_locationwith portablestd::io::Error::last_os_error(fixes Fail to install on Mac #1)windowscrate withtaskkillfor process terminationinstall_name_toolfixup in cell compiler for proper rpath resolution/tmp→/private/tmpsymlink.so/.dylib/.dll) instead of hardcoded.socargo fmtand resolve all clippy warningsTest plan
cargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepasses (all 8 cranelift tests pass on macOS)hello,simple,data-analysis,widgets)venus servestarts and serves web UI correctly