Repository navigation
Closed
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.enhancementNew feature or requestpriority: lowP3 - nice to have / minor / cosmetictriage: reproducibleClear repro + clear fix path
Description
I currently have these patches to make build work it on FreeBSD, and it works pretty well (I realize cursor_vscdb_paths patch would break functionality on other platforms but easy to fix it).
rlim_cur and rlim_max is i64 in FreeBSD unlike other platforms:
diff --git a/crates/jcode-base/src/auth/cursor.rs b/crates/jcode-base/src/auth/cursor.rs
index 31fcf357..eafcd13c 100644
--- a/crates/jcode-base/src/auth/cursor.rs
+++ b/crates/jcode-base/src/auth/cursor.rs
@@ -234,21 +234,10 @@ fn find_cursor_vscdb() -> Result<PathBuf> {
/// Platform-specific candidate paths for Cursor's state.vscdb.
fn cursor_vscdb_paths() -> Vec<PathBuf> {
- #[cfg(target_os = "linux")]
let relatives = [
".config/Cursor/User/globalStorage/state.vscdb",
".config/cursor/User/globalStorage/state.vscdb",
];
- #[cfg(target_os = "macos")]
- let relatives = [
- "Library/Application Support/Cursor/User/globalStorage/state.vscdb",
- "Library/Application Support/cursor/User/globalStorage/state.vscdb",
- ];
- #[cfg(target_os = "windows")]
- let relatives = [
- "AppData/Roaming/Cursor/User/globalStorage/state.vscdb",
- "AppData/Roaming/cursor/User/globalStorage/state.vscdb",
- ];
relatives
.into_iter()
diff --git a/crates/jcode-base/src/platform.rs b/crates/jcode-base/src/platform.rs
index 3d6e7f01..08f6cf7e 100644
--- a/crates/jcode-base/src/platform.rs
+++ b/crates/jcode-base/src/platform.rs
@@ -203,8 +203,8 @@ pub fn raise_nofile_limit_best_effort(minimum_soft_limit: u64) {
return;
}
- let current: u64 = limit.rlim_cur;
- let hard: u64 = limit.rlim_max;
+ let current: u64 = limit.rlim_cur as u64;
+ let hard: u64 = limit.rlim_max as u64;
let Some(desired) = desired_nofile_soft_limit(current, hard, minimum_soft_limit) else {
return;
};I would appreciate two additional features:
- No build errors when building on FreeBSD (the only build errors caused by the lines in the patch).
- Perhaps pre-build binaries for FreeBSD (could make use of https://github.com/marketplace/actions/freebsd-vm)
Kind regards,
Metadata
Metadata
Assignees
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.enhancementNew feature or requestpriority: lowP3 - nice to have / minor / cosmetictriage: reproducibleClear repro + clear fix path
Activity
1jehuang commentedon Jun 29, 2026
Triage: reproducible, autonomous: likely. Added proper FreeBSD support: cast
rlim_cur/rlim_maxtou64(they'rei64on FreeBSD), and an XDG-style Cursorstate.vscdbpath fallback for non-Linux/macOS/Windows Unix. Also added afreebsd-smokeCI workflow that boots a real FreeBSD 14.2 VM (vmactions/freebsd-vm) to build + run--version+ run platform unit tests, since GitHub has no native FreeBSD runner and cross-compile can't link aws-lc-sys. Verified green: https://github.com/1jehuang/jcode/actions/runs/28342275452. Fix in #417.Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
feat(freebsd): support building/running on FreeBSD (#416)
ci: ship FreeBSD x86_64 release binaries and bump smoke VM to 15.1 (i…
feat(freebsd): support building/running on FreeBSD (1jehuang#416)
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
ci: ship FreeBSD x86_64 release binaries and bump smoke VM to 15.1 (i…
feat(freebsd): support building/running on FreeBSD (1jehuang#416)
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
ci: ship FreeBSD x86_64 release binaries and bump smoke VM to 15.1 (i…