Fix Windows MSVC linking issues (#7511)
Some checks are pending
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
Cargo Deny / deny (push) Waiting to run
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Lint Rust Code (push) Blocked by required conditions
CI / Check OpenAPI Schema is Up-to-Date (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
Live Provider Tests / check-fork (push) Waiting to run
Live Provider Tests / changes (push) Blocked by required conditions
Live Provider Tests / Build Binary (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (push) Blocked by required conditions
Live Provider Tests / Smoke Tests (Code Execution) (push) Blocked by required conditions
Live Provider Tests / Compaction Tests (push) Blocked by required conditions
Live Provider Tests / goose server HTTP integration tests (push) Blocked by required conditions
Publish Docker Image / docker (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run

This commit is contained in:
jh-block 2026-02-25 23:59:32 +01:00 committed by GitHub
parent a010327925
commit fc292c73ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 28 deletions

5
.cargo/config.toml Normal file
View file

@ -0,0 +1,5 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-args=/FORCE:MULTIPLE"]
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "link-args=/FORCE:MULTIPLE"]

51
Cargo.lock generated
View file

@ -140,7 +140,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@ -151,7 +151,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@ -1742,9 +1742,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.55"
version = "1.2.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2"
dependencies = [
"find-msvc-tools",
"jobserver",
@ -1956,7 +1956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]
@ -3125,7 +3125,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@ -3417,7 +3417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -3431,9 +3431,6 @@ name = "esaxx-rs"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6"
dependencies = [
"cc",
]
[[package]]
name = "etcetera"
@ -5467,7 +5464,7 @@ dependencies = [
"portable-atomic",
"portable-atomic-util",
"serde_core",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -5782,23 +5779,21 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "llama-cpp-2"
version = "0.1.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "888c8805527f4c35ec16f26003d54a318cde1629e7439da8e9ef2d6d3883e106"
version = "0.1.136"
source = "git+https://github.com/jh-block/llama-cpp-rs.git?branch=goose-patches#09f48aefc28b74cd28a1cfe12071b17990ed9835"
dependencies = [
"encoding_rs",
"enumflags2",
"llama-cpp-sys-2",
"thiserror 1.0.69",
"thiserror 2.0.18",
"tracing",
"tracing-core",
]
[[package]]
name = "llama-cpp-sys-2"
version = "0.1.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a180dfa6d6f9d1df1e031bcdf0464bbad4f9b326395bfd28f2fa539d8cbc9c2b"
version = "0.1.136"
source = "git+https://github.com/jh-block/llama-cpp-rs.git?branch=goose-patches#09f48aefc28b74cd28a1cfe12071b17990ed9835"
dependencies = [
"bindgen",
"cc",
@ -6224,7 +6219,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.60.2",
]
[[package]]
@ -8421,7 +8416,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.11.0",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -8501,7 +8496,7 @@ dependencies = [
"security-framework 3.5.1",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -10287,7 +10282,7 @@ dependencies = [
"getrandom 0.4.1",
"once_cell",
"rustix 1.1.3",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -10610,7 +10605,6 @@ dependencies = [
"derive_builder",
"esaxx-rs",
"getrandom 0.3.4",
"indicatif 0.17.11",
"itertools 0.14.0",
"log",
"macro_rules_attribute",
@ -11469,8 +11463,15 @@ dependencies = [
[[package]]
name = "v8"
version = "145.0.0"
dependencies = [
"v8-goose",
]
[[package]]
name = "v8-goose"
version = "145.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61d9a107e16bae35a0be2bb0096ac1d2318aac352c82edd796ab2b9cac66d8f0"
checksum = "6f84468f393984251db025e944544590a8fb429d5088b78102bd72f09232f0da"
dependencies = [
"bindgen",
"bitflags 2.10.0",
@ -11827,7 +11828,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.48.0",
]
[[package]]

View file

@ -68,3 +68,7 @@ opentelemetry-otlp = "0.31"
opentelemetry-appender-tracing = "0.31"
opentelemetry-stdout = { version = "0.31", features = ["trace", "metrics", "logs"] }
tracing-opentelemetry = "0.32"
[patch.crates-io]
v8 = { path = "vendor/v8" }

View file

@ -107,7 +107,7 @@ candle-core = { version = "0.9", default-features = false }
candle-nn = { version = "0.9", default-features = false }
candle-transformers = { version = "0.9", default-features = false }
byteorder = "1.5.0"
tokenizers = "0.21.0"
tokenizers = { version = "0.21.0", default-features = false, features = ["onig"] }
hf-hub = { version = "0.4.3", default-features = false, features = ["tokio"] }
symphonia = { version = "0.5", features = ["all"] }
rubato = "0.16"
@ -127,7 +127,7 @@ which = { workspace = true }
pctx_code_mode = "^0.2.3"
unbinder = "0.1.7"
pulldown-cmark = "0.13.0"
llama-cpp-2 = { version = "0.1.133", features = ["sampler"] }
llama-cpp-2 = { git = "https://github.com/jh-block/llama-cpp-rs.git", branch = "goose-patches", features = ["sampler"] }
encoding_rs = "0.8.35"
[target.'cfg(target_os = "windows")'.dependencies]
@ -137,7 +137,7 @@ winapi = { version = "0.3", features = ["wincred"] }
[target.'cfg(target_os = "macos")'.dependencies]
candle-core = { version = "0.9", default-features = false, features = ["metal"] }
candle-nn = { version = "0.9", default-features = false, features = ["metal"] }
llama-cpp-2 = { version = "0.1.133", features = ["sampler", "metal"] }
llama-cpp-2 = { git = "https://github.com/jh-block/llama-cpp-rs.git", branch = "goose-patches", features = ["sampler", "metal"] }
[dev-dependencies]
serial_test = { workspace = true }

15
vendor/v8/Cargo.toml vendored Normal file
View file

@ -0,0 +1,15 @@
[package]
name = "v8"
version = "145.0.0"
edition = "2024"
publish = false
[features]
default = ["use_custom_libcxx"]
use_custom_libcxx = ["v8-goose/use_custom_libcxx"]
v8_enable_pointer_compression = ["v8-goose/v8_enable_pointer_compression"]
v8_enable_sandbox = ["v8-goose/v8_enable_sandbox"]
v8_enable_v8_checks = ["v8-goose/v8_enable_v8_checks"]
[dependencies]
v8-goose = { version = "145.0.2" }

1
vendor/v8/src/lib.rs vendored Normal file
View file

@ -0,0 +1 @@
pub use v8_goose::*;