Compare commits

..

18 Commits

Author SHA1 Message Date
0c5d06c4e9 Merge pull request 'fix(windows): link memset_shim object directly and suppress dead_code warning' (#120) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 10s
Release Beta / changelog (push) Successful in 1m34s
Test / frontend-tests (push) Successful in 1m46s
Test / frontend-typecheck (push) Successful in 1m53s
Release Beta / build-linux-amd64 (push) Successful in 10m47s
Release Beta / build-windows-amd64 (push) Failing after 11m7s
Release Beta / build-linux-arm64 (push) Successful in 13m29s
Test / rust-fmt-check (push) Successful in 18m18s
Test / rust-clippy (push) Successful in 19m40s
Release Beta / build-macos-arm64 (push) Failing after 20m38s
Test / rust-tests (push) Successful in 21m36s
Reviewed-on: #120
2026-06-19 16:52:55 +00:00
Shaun Arman
e2e7b02a0e fix(windows): link memset_shim object directly and suppress dead_code warning
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m42s
Test / frontend-typecheck (pull_request) Successful in 1m51s
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Successful in 12m47s
Test / rust-clippy (pull_request) Successful in 14m27s
Test / rust-tests (pull_request) Successful in 16m50s
- Use rustc-link-arg to directly link memset_shim.o object file
  instead of -l flag, ensuring symbol is available regardless of
  link order with libsodium_sys

- Add #[allow(dead_code)] to find_ollama_binary() which is only
  used inside cfg(target_os = "macos") and cfg(target_os = "linux")
  blocks, causing false positive warning when cross-compiling for Windows
2026-06-19 11:23:12 -05:00
036af81147 Merge pull request 'fix(windows): ensure memset_explicit symbol is properly exported for MinGW' (#119) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 9s
Release Beta / changelog (push) Successful in 1m32s
Test / frontend-tests (push) Successful in 1m46s
Test / frontend-typecheck (push) Successful in 1m57s
Release Beta / build-macos-arm64 (push) Successful in 8m52s
Release Beta / build-linux-amd64 (push) Successful in 11m41s
Release Beta / build-windows-amd64 (push) Failing after 11m49s
Release Beta / build-linux-arm64 (push) Successful in 14m11s
Test / rust-fmt-check (push) Failing after 18m49s
Test / rust-clippy (push) Successful in 20m19s
Test / rust-tests (push) Successful in 22m38s
Reviewed-on: #119
2026-06-19 14:54:49 +00:00
Shaun Arman
5c4fb05802 fix(windows): ensure memset_explicit symbol is properly exported for MinGW
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m45s
Test / frontend-typecheck (pull_request) Successful in 1m57s
PR Review Automation / review (pull_request) Successful in 4m23s
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
- Add __MINGW32__ detection in memset_s_shim.c for proper EXPORT macro
- Add WIN32 and __WIN32__ defines when compiling the shim in build.rs
- The memset_explicit symbol is required by libsodium-sys-stable but not
  available in MinGW runtime
- The shim is compiled as a static library and linked before libsodium
2026-06-19 09:44:17 -05:00
cf1dffb32b Merge pull request 'fix(windows): add memset_explicit symbol export for mingw cross-compilation' (#118) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 10s
Release Beta / changelog (push) Successful in 1m19s
Test / frontend-tests (push) Successful in 1m49s
Test / frontend-typecheck (push) Successful in 2m2s
Release Beta / build-linux-amd64 (push) Successful in 10m32s
Release Beta / build-linux-arm64 (push) Successful in 13m1s
Test / rust-fmt-check (push) Successful in 17m22s
Test / rust-clippy (push) Successful in 19m8s
Test / rust-tests (push) Successful in 20m50s
Release Beta / build-windows-amd64 (push) Failing after 7m38s
Release Beta / build-macos-arm64 (push) Failing after 11m10s
Renovate / renovate (push) Failing after 32s
Reviewed-on: #118
2026-06-19 04:39:00 +00:00
5cd2e08f92 Merge branch 'beta' into fix/cargo-config-sodium
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
2026-06-19 04:38:36 +00:00
Shaun Arman
d45e767d6d fix(windows): add memset_explicit symbol export for mingw cross-compilation
Some checks failed
Test / frontend-typecheck (pull_request) Successful in 1m57s
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m46s
PR Review Automation / review (pull_request) Successful in 4m30s
Test / rust-tests (pull_request) Has been cancelled
- Add __declspec(dllexport) to memset_explicit in memset_s_shim.c
- Explicitly link memset_shim library in build.rs for Windows MinGW target
- Fixes undefined reference to memset_explicit when building for x86_64-pc-windows-gnu
2026-06-18 23:32:09 -05:00
144c811a7a Merge pull request 'fix(build): add memset_explicit C shim for Windows MinGW libsodium linking' (#117) from fix/cargo-config-sodium into beta
Some checks failed
Test / frontend-typecheck (push) Successful in 1m57s
Test / rust-fmt-check (push) Successful in 17m42s
Release Beta / autotag (push) Successful in 9s
Release Beta / build-linux-amd64 (push) Successful in 10m46s
Test / rust-clippy (push) Successful in 19m30s
Release Beta / build-macos-arm64 (push) Failing after 17m52s
Release Beta / changelog (push) Successful in 1m18s
Release Beta / build-windows-amd64 (push) Failing after 10m58s
Test / rust-tests (push) Successful in 21m12s
Test / frontend-tests (push) Successful in 1m48s
Release Beta / build-linux-arm64 (push) Successful in 12m47s
Reviewed-on: #117
2026-06-19 04:06:35 +00:00
Shaun Arman
b6ecd49b52 fix(build): add memset_explicit C shim for Windows MinGW libsodium linking
Some checks failed
PR Review Automation / review (pull_request) Successful in 4m53s
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m52s
Test / frontend-typecheck (pull_request) Successful in 2m3s
2026-06-18 22:57:13 -05:00
7a9cd93f46 Merge pull request 'fix(build): add memset_shim for Windows MinGW and rpm for Linux ARM64' (#116) from fix/cargo-config-sodium into beta
Some checks failed
Test / frontend-typecheck (push) Successful in 1m56s
Test / rust-tests (push) Successful in 21m57s
Release Beta / build-macos-arm64 (push) Successful in 3m17s
Release Beta / build-windows-amd64 (push) Failing after 11m5s
Release Beta / build-linux-amd64 (push) Successful in 11m31s
Release Beta / autotag (push) Successful in 10s
Release Beta / build-linux-arm64 (push) Successful in 13m20s
Release Beta / changelog (push) Successful in 1m21s
Test / rust-fmt-check (push) Successful in 18m2s
Test / frontend-tests (push) Successful in 1m46s
Test / rust-clippy (push) Successful in 19m44s
Reviewed-on: #116
2026-06-19 03:26:36 +00:00
Shaun Arman
95b7dec759 fix(build): add memset_shim for Windows MinGW and rpm for Linux ARM64
All checks were successful
Test / rust-clippy (pull_request) Successful in 14m26s
Test / rust-tests (pull_request) Successful in 16m24s
Test / frontend-tests (pull_request) Successful in 1m41s
Test / frontend-typecheck (pull_request) Successful in 1m53s
PR Review Automation / review (pull_request) Successful in 4m47s
Test / rust-fmt-check (pull_request) Successful in 13m16s
2026-06-18 22:08:30 -05:00
b5778306fc Merge pull request 'fix/cargo-config-sodium' (#115) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / build-macos-arm64 (push) Successful in 22m17s
Release Beta / autotag (push) Successful in 13s
Release Beta / changelog (push) Successful in 2m6s
Test / frontend-tests (push) Successful in 2m35s
Test / frontend-typecheck (push) Successful in 2m46s
Release Beta / build-linux-amd64 (push) Successful in 10m37s
Release Beta / build-linux-arm64 (push) Failing after 22m25s
Release Beta / build-windows-amd64 (push) Failing after 10m43s
Test / rust-clippy (push) Failing after 25m16s
Test / rust-tests (push) Failing after 25m14s
Test / rust-fmt-check (push) Failing after 25m18s
Reviewed-on: #115
2026-06-19 02:34:09 +00:00
Shaun Arman
0c774b6756 refactor(pr-review): switch from deprecated qwen3-coder-next to qwen3.5-122b-think
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
2026-06-18 21:33:02 -05:00
Shaun Arman
10fefe3088 fix(ci): install libsodium-dev in release-beta build jobs
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m50s
Test / rust-tests (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 2m1s
PR Review Automation / review (pull_request) Failing after 4m23s
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
2026-06-18 21:12:14 -05:00
Shaun Arman
fa54c5ee4e fix(ci): install libsodium-dev in build jobs instead of using SODIUM_LIB_DIR hacks 2026-06-18 21:12:14 -05:00
ee909c9cf5 Merge pull request 'fix(build): remove SODIUM_USE_PKG_CONFIG from .cargo/config.toml [env] block' (#114) from fix/cargo-config-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 22s
Test / frontend-tests (push) Successful in 1m56s
Release Beta / changelog (push) Successful in 1m41s
Test / frontend-typecheck (push) Successful in 2m5s
Release Beta / build-linux-amd64 (push) Failing after 5m34s
Release Beta / build-linux-arm64 (push) Failing after 6m31s
Release Beta / build-windows-amd64 (push) Successful in 12m20s
Test / rust-fmt-check (push) Successful in 15m50s
Test / rust-clippy (push) Successful in 17m51s
Test / rust-tests (push) Successful in 19m43s
Release Beta / build-macos-arm64 (push) Failing after 11m41s
Renovate / renovate (push) Failing after 28s
Reviewed-on: #114
2026-06-18 02:24:58 +00:00
Shaun Arman
8c29e7a7e3 fix(build): remove SODIUM_USE_PKG_CONFIG from .cargo/config.toml [env] block
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Cargo injects [env] entries directly into build script environments,
bypassing shell-level unset and env -u entirely. SODIUM_USE_PKG_CONFIG
was set to "0" in [env], which libsodium-sys-stable build.rs treats as
"pkg-config enabled" (env::var().is_ok() returns true for any value
including "0"). Combined with SODIUM_LIB_DIR set in the workflow, this
triggered the incompatibility panic on every build.

The original comment claiming this "avoids memset_explicit on Windows"
was incorrect — SODIUM_USE_PKG_CONFIG controls detection strategy, not
link behaviour. The actual Windows memset_explicit fix is handled via
SODIUM_LIB_DIR pointing to pre-built MinGW sodium.
2026-06-17 21:22:55 -05:00
cd7bea9ec5 Merge pull request 'fix(ci): use env -u instead of unset to drop SODIUM_USE_PKG_CONFIG' (#113) from fix/env-u-sodium into beta
Some checks failed
Release Beta / autotag (push) Successful in 14s
Release Beta / changelog (push) Successful in 1m26s
Test / frontend-tests (push) Successful in 1m53s
Test / frontend-typecheck (push) Successful in 2m0s
Release Beta / build-linux-amd64 (push) Failing after 5m4s
Release Beta / build-windows-amd64 (push) Failing after 5m50s
Release Beta / build-linux-arm64 (push) Failing after 5m54s
Release Beta / build-macos-arm64 (push) Successful in 8m19s
Test / rust-fmt-check (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Reviewed-on: #113
2026-06-18 02:09:02 +00:00
7 changed files with 84 additions and 42 deletions

View File

@ -341,13 +341,15 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config
- name: Build
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target x86_64-unknown-linux-gnu
CI=true npx tauri build --target x86_64-unknown-linux-gnu
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
@ -437,6 +439,9 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config
- name: Build
env:
CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc
@ -445,10 +450,9 @@ jobs:
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
OPENSSL_NO_VENDOR: "0"
OPENSSL_STATIC: "1"
SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target x86_64-pc-windows-gnu
CI=true npx tauri build --target x86_64-pc-windows-gnu
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
@ -622,6 +626,9 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config libssl-dev
- name: Build
env:
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
@ -634,10 +641,9 @@ jobs:
OPENSSL_NO_VENDOR: "0"
OPENSSL_STATIC: "1"
APPIMAGE_EXTRACT_AND_RUN: "1"
SODIUM_LIB_DIR: /usr/lib/aarch64-linux-gnu
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm
CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

View File

@ -285,7 +285,7 @@ jobs:
# Write body to file — passing 100KB+ JSON as a shell arg hits ARG_MAX.
jq -cn \
--arg model "qwen3-coder-next" \
--arg model "qwen3.5-122b-think" \
--rawfile content /tmp/prompt.txt \
'{model: $model, messages: [{role: "user", content: $content}], stream: false}' \
> /tmp/body.json
@ -402,7 +402,7 @@ jobs:
if [ -f "/tmp/pr_review.txt" ] && [ -s "/tmp/pr_review.txt" ]; then
REVIEW_BODY=$(head -c 65536 /tmp/pr_review.txt)
BODY=$(jq -n \
--arg body "Automated PR Review (qwen3-coder-next via liteLLM):\n\n${REVIEW_BODY}" \
--arg body "Automated PR Review (qwen3.5-122b-think via liteLLM):\n\n${REVIEW_BODY}" \
'{body: $body, event: "COMMENT"}')
else
BODY=$(jq -n \

View File

@ -221,13 +221,15 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config
- name: Build
env:
APPIMAGE_EXTRACT_AND_RUN: "1"
SODIUM_LIB_DIR: /usr/lib/x86_64-linux-gnu
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target x86_64-unknown-linux-gnu
CI=true npx tauri build --target x86_64-unknown-linux-gnu
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
@ -310,6 +312,9 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config
- name: Build
env:
CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc
@ -318,11 +323,9 @@ jobs:
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
OPENSSL_NO_VENDOR: "0"
OPENSSL_STATIC: "1"
SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib
SODIUM_STATIC: "1"
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target x86_64-pc-windows-gnu
CI=true npx tauri build --target x86_64-pc-windows-gnu
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
@ -482,6 +485,9 @@ jobs:
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install libsodium
run: |
apt-get update && apt-get install -y libsodium-dev pkg-config libssl-dev
- name: Build
env:
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
@ -494,10 +500,9 @@ jobs:
OPENSSL_NO_VENDOR: "0"
OPENSSL_STATIC: "1"
APPIMAGE_EXTRACT_AND_RUN: "1"
SODIUM_LIB_DIR: /usr/lib/aarch64-linux-gnu
run: |
npm ci --legacy-peer-deps
env -u SODIUM_USE_PKG_CONFIG CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm
CI=true npx tauri build --target aarch64-unknown-linux-gnu --bundles deb,rpm
- name: Upload artifacts
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

View File

@ -6,13 +6,25 @@ fn main() {
println!("cargo:rerun-if-changed=.git/refs/tags");
// Compile memset_explicit shim for Windows MinGW
if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "windows"
&& std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default() == "gnu"
{
// libsodium-sys-stable uses memset_explicit which isn't available in MinGW
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
let target_env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
if target_os == "windows" && target_env == "gnu" {
let out_dir = std::env::var("OUT_DIR").unwrap();
let obj_path = format!("{}/memset_shim.o", out_dir);
cc::Build::new()
.file("memset_s_shim.c")
.define("WIN32", None)
.define("__WIN32__", None)
.out_dir(&out_dir)
.compile("memset_shim");
println!("cargo:rerun-if-changed=memset_s_shim.c");
// Directly link the object file instead of using -l flag
// This ensures the symbol is available regardless of link order
println!("cargo:rustc-link-arg={}", obj_path);
}
tauri_build::build()

View File

@ -1,28 +1,33 @@
// Shim for memset_explicit on MinGW which doesn't provide it
// This is needed for libsodium's secure memory clearing
#if defined(_WIN32) && defined(__MINGW32__)
/* memset_explicit shim for Windows MinGW
*
* libsodium-sys-stable expects memset_explicit which isn't available
* in the MinGW runtime. This provides a compatible implementation.
*
* This shim is compiled as part of the build process when targeting
* Windows with MinGW (x86_64-w64-mingw32).
*/
#include <string.h>
#include <stddef.h>
// memset_explicit is available in Windows 8+ but MinGW headers don't always declare it
// Provide a fallback implementation using SecureZeroMemory if available,
// or a volatile memset to prevent compiler optimization
void *memset_explicit(void *s, int c, size_t n) {
// Try to use Windows API if available
#ifdef _WIN32_WINNT
#if _WIN32_WINNT >= 0x0602 // Windows 8+
extern void *memset_s(void *, size_t, int, size_t);
return memset_s(s, n, c, n);
#endif
#endif
// Fallback: use volatile to prevent optimization
volatile unsigned char *p = (volatile unsigned char *)s;
while (n--) {
*p++ = (unsigned char)c;
}
return s;
}
/*
* Windows symbol export macros.
* __declspec(dllexport) ensures the symbol is visible in the compiled object.
*/
#if defined(_WIN32) || defined(__WIN32__) || defined(__MINGW32__)
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __attribute__((visibility("default")))
#endif
/*
* memset_explicit implementation - a secure memory clearing function.
* Uses volatile to prevent compiler optimization from removing the memset.
* This matches the signature expected by libsodium.
*/
EXPORT void memset_explicit(void *dest, int val, size_t n) {
volatile unsigned char *p = (volatile unsigned char *)dest;
while (n--) {
*p++ = (unsigned char)val;
}
}

View File

@ -0,0 +1,13 @@
/// Windows MinGW memset_explicit shim
/// libsodium-sys-stable expects memset_explicit which isn't available in MinGW
/// This provides a compatible implementation
#[cfg(target_os = "windows")]
#[no_mangle]
pub extern "C" fn memset_explicit(dest: *mut u8, val: i32, n: usize) {
unsafe {
for i in 0..n {
*dest.add(i) = val as u8;
}
}
}

View File

@ -52,6 +52,7 @@ pub async fn check_ollama() -> anyhow::Result<OllamaStatus> {
}
/// Find the full path to the ollama binary
#[allow(dead_code)]
fn find_ollama_binary() -> Option<std::path::PathBuf> {
// Try which/where command first
let which_cmd = if cfg!(target_os = "windows") {