Commit 371220d
committed
fix: cross-platform build (gate SIMD on x86_64, scope wayland/x11 to linux)
The v0.4.0 tree was implicitly x86_64-only and pulled linux-only display
servers into Windows/macOS builds. Two surgical fixes:
simd_queue.rs:
- Gate the AVX2 + BMI1 implementation of remove_order_by_size_simd on
cfg(target_arch = "x86_64") and the use of std::arch::x86_64::* with
it.
- Add a scalar fallback under cfg(not(target_arch = "x86_64")) with the
same signature (still `unsafe fn` for parity, even though the scalar
path doesn't require any unsafe behaviour at runtime).
- Validated by single-file rustc on aarch64-unknown-linux-gnu - the
fallback compiles clean.
Cargo.toml:
- Move eframe's `wayland` / `x11` features to a
[target.'cfg(target_os = "linux")'.dependencies] block so non-Linux
builds no longer pull in wayland-scanner / x11-dl. The base entry
retains `wgpu` and `glow`, and the Linux block adds the X11 / Wayland
features on top via cargo's feature unification.
Net effect:
- Apple Silicon (aarch64-apple-darwin) and other non-x86_64 targets can
now compile the engine.
- Windows + macOS x86_64 builds no longer carry the X11/Wayland deps.
Host (x86_64-linux) tree remains clippy-clean (-D warnings) and
fmt-check clean; all 13 lib tests still pass.1 parent 5b3b8c5 commit 371220d
2 files changed
Lines changed: 53 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
237 | 246 | | |
238 | 247 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
243 | 254 | | |
244 | 255 | | |
245 | 256 | | |
| |||
283 | 294 | | |
284 | 295 | | |
285 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
286 | 329 | | |
0 commit comments