-
Notifications
You must be signed in to change notification settings - Fork 462
Am2 linking prop wip #2155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Am2 linking prop wip #2155
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| name = "vad-ext" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| links = "vad-ext" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Concise best-practices for using Cargo's package.links metadata and linking native libraries
Primary references
If you want, I can produce a minimal example sys crate (Cargo.toml + build.rs) showing rustc-link-lib/search + metadata and a small non-sys wrapper that consumes DEP_* values. 🏁 Script executed: # First, let's examine the build.rs file to understand what's actually being linked
cat -n crates/vad-ext/build.rsRepository: fastrepl/hyprnote Length of output: 208 🏁 Script executed: # Check the Cargo.toml structure and metadata
cat -n crates/vad-ext/Cargo.tomlRepository: fastrepl/hyprnote Length of output: 999 🏁 Script executed: # Search for any usage of DEP_VAD_EXT in the codebase
rg "DEP_VAD_EXT" --type rust --type tomlRepository: fastrepl/hyprnote Length of output: 43 🏁 Script executed: # Check if other crates depend on vad-ext and what they expect
rg "vad-ext" --type toml -A 2 -B 2Repository: fastrepl/hyprnote Length of output: 2839 Remove the The 🤖 Prompt for AI Agents |
||
|
|
||
| [target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.build-dependencies] | ||
| swift-rs = { workspace = true, features = ["build"] } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| fn main() { | ||
| #[cfg(all(target_os = "macos", target_arch = "aarch64"))] | ||
| swift_rs::propagate_framework_rpath("vvad", false); | ||
| swift_rs::link_swift_framework("vvad"); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| fn main() { | ||
| #[cfg(all(target_os = "macos", target_arch = "aarch64"))] | ||
| swift_rs::propagate_framework_rpath("am2", true); | ||
| swift_rs::link_swift_framework("am2"); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,8 @@ const COMMANDS: &[&str] = &[ | |
| ]; | ||
|
|
||
| fn main() { | ||
| #[cfg(all(target_os = "macos", target_arch = "aarch64"))] | ||
| swift_rs::link_swift_framework("vad-ext"); | ||
|
|
||
|
Comment on lines
+15
to
+17
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "build.rs" | head -20Repository: fastrepl/hyprnote Length of output: 599 🏁 Script executed: cat -n crates/vad-ext/build.rs 2>/dev/null || echo "File not found, searching..."Repository: fastrepl/hyprnote Length of output: 208 🏁 Script executed: find . -path "*/vad-ext/*" -name "build.rs" -exec cat -n {} \;Repository: fastrepl/hyprnote Length of output: 208 🏁 Script executed: find . -path "*/vad-ext/*" -type f \( -name "Cargo.toml" -o -name "build.rs" \) | head -10Repository: fastrepl/hyprnote Length of output: 114 🏁 Script executed: cat -n crates/vad-ext/Cargo.tomlRepository: fastrepl/hyprnote Length of output: 999 🏁 Script executed: cat -n plugins/local-stt/Cargo.tomlRepository: fastrepl/hyprnote Length of output: 3557 🏁 Script executed: cat -n crates/vvad/Cargo.toml 2>/dev/null || echo "File not found"Repository: fastrepl/hyprnote Length of output: 600 🏁 Script executed: find . -name "*.swift" -o -name "*.xcframework" | grep -i "vad" | head -20Repository: fastrepl/hyprnote Length of output: 43 🏁 Script executed: find . -type d -name "*.framework" -o -name "*.xcframework" | head -20Repository: fastrepl/hyprnote Length of output: 43 🏁 Script executed: find crates/vad-ext -type f | head -30Repository: fastrepl/hyprnote Length of output: 257 🏁 Script executed: cat -n plugins/local-stt/build.rsRepository: fastrepl/hyprnote Length of output: 637 🏁 Script executed: find plugins/local-stt -type f -name "*.rs" | head -10Repository: fastrepl/hyprnote Length of output: 406 Change framework name from "vad-ext" to "vvad". The build script attempts to link a Swift framework named "vad-ext", but no such framework exists in the codebase. The vad-ext crate is a Rust wrapper that itself links the actual Swift framework "vvad" (see crates/vad-ext/build.rs line 3). Update line 16 to link the correct framework: 🤖 Prompt for AI Agents |
||
| tauri_plugin::Builder::new(COMMANDS).build(); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: fastrepl/hyprnote
Length of output: 1584
🏁 Script executed:
Repository: fastrepl/hyprnote
Length of output: 2356
🏁 Script executed:
Repository: fastrepl/hyprnote
Length of output: 2378
Fix framework name mismatch: plugin's build.rs links "vad-ext" but should link "tauri-plugin-local-stt".
The plugin's
Cargo.tomldeclareslinks = "tauri-plugin-local-stt"(line 7), and the desktop app's build.rs attempts to link a framework with that same name (line 6 of apps/desktop/src-tauri/build.rs). However, the plugin's own build.rs (line 16 of plugins/local-stt/build.rs) linksswift_rs::link_swift_framework("vad-ext")instead. This mismatch will cause a build failure because:linksfield in Cargo.toml must match what the build.rs actually producesUpdate
plugins/local-stt/build.rsline 16 to link the correct framework name that matches the Cargo.tomllinksfield:🤖 Prompt for AI Agents