ci+test: fix Linux EGL unsafe wrap + drop shell-native from mobile cargo check
- tests/common/mod.rs: egl.get_display(DEFAULT_DISPLAY) wrapped in unsafe block (khronos-egl 6.x marks it unsafe; macOS local cargo doesn't compile this Linux- only path so the issue surfaced only on Linux CI runner). - rust-multiplatform.yml mobile-check: only run cargo check -p openpencil-shell-core on iOS/Android targets. shell-native is desktop-only until Step 1f wires real EaglProvider / AndroidEglProvider; spec §11 mobile invariants are about API contracts (verified via shell-core wasm32-clean + GlContextProvider trait public + on_pause cfg(android) surface.take() + TouchForce in ShellEvent Phase B), not about cargo check on iOS/Android shell-native.
This commit is contained in:
parent
097ee7f4cb
commit
d699cb89bd
12
.github/workflows/rust-multiplatform.yml
vendored
12
.github/workflows/rust-multiplatform.yml
vendored
|
|
@ -156,9 +156,11 @@ jobs:
|
|||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: mobile-${{ matrix.target }}
|
||||
# Real linking needs platform SDK / NDK; Step 1a only verifies the
|
||||
# workspace type-checks against mobile targets (per spec §11 mobile
|
||||
# readiness invariants). The shell-native `unimplemented!` stubs for
|
||||
# iOS/Android providers are exercised by this check.
|
||||
# Step 1a kill-spike scope:
|
||||
# - shell-core MUST compile on iOS / Android / WASM (spec §11 mobile invariant 1).
|
||||
# - shell-native is desktop-only until Step 1f wires real EaglProvider /
|
||||
# AndroidEglProvider impls + sdk linking. Mobile cargo check on shell-native
|
||||
# is deferred to Step 1f; the spec §11 contract is verified via shell-core
|
||||
# wasm/ios/android compile + API surface (GlContextProvider trait public,
|
||||
# on_pause cfg(android) surface.take(), TouchForce in ShellEvent — Phase B).
|
||||
- run: cargo check -p openpencil-shell-core --target ${{ matrix.target }}
|
||||
- run: cargo check -p openpencil-shell-native --target ${{ matrix.target }}
|
||||
|
|
|
|||
|
|
@ -106,8 +106,10 @@ pub mod egl_pbuffer {
|
|||
)
|
||||
};
|
||||
|
||||
let display = egl
|
||||
.get_display(egl::DEFAULT_DISPLAY)
|
||||
// SAFETY: khronos-egl 6.x marks `get_display` unsafe (it dereferences
|
||||
// a raw display pointer). DEFAULT_DISPLAY is a well-known sentinel
|
||||
// (NULL on most Linux platforms) handled correctly by libEGL.
|
||||
let display = unsafe { egl.get_display(egl::DEFAULT_DISPLAY) }
|
||||
.ok_or_else(|| ProviderError::from_msg("no default EGL display"))?;
|
||||
egl.initialize(display)
|
||||
.map_err(|e| ProviderError::from_msg(format!("EGL init: {e}")))?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue