Commit 817a5eb
committed
fix: correct build condition logic and musl library extension
Critical fixes:
1. Fix Linux native cargo build condition (build-rust-library:74)
- Changed from complex AND logic to simple 'use-cross == false' check
- Previous logic would never execute on Linux when use-cross='false'
- Now correctly falls back to native cargo when explicitly disabled
2. Fix musl library extension mismatch (build-rust-library:95-96)
- Changed from .a (static) to .so (shared) for musl targets
- Matches actual Cargo.toml: crate-type = ["cdylib", "staticlib"]
- Prevents "Library not found" errors on musl targets
3. Remove redundant use-cross setting (rust-ci.yml:100)
- Action already defaults to 'auto' which handles platform detection
- Explicit setting was duplicating built-in logic
- Added comment explaining the default behavior
Minor fixes:
4. Change PowerShell 'return' to 'exit 0' (get-rust-library:154)
- Consistent with bash scripts' exit behavior
- More explicit about success exit code
5. Update README.md documentation
- Clarify build selection logic with numbered steps
- Document that musl produces .so not .a files
- Add library output format information1 parent f481f30 commit 817a5eb
4 files changed
Lines changed: 15 additions & 6 deletions
File tree
- .github
- actions
- build-rust-library
- get-rust-library
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
0 commit comments