build(deps): vendor casement (winit fork) as a submodule

The casement crate was depended on through a sibling-repo path
(`../../../winit`) that only existed on the maintainer's machine,
so CI couldn't load the workspace manifest and every Rust Check
job died with "failed to read winit/Cargo.toml".

Vendoring it as a real submodule under `vendor/casement` (matching
the `vendor/jian` pattern, picked up by CI's `submodules:
recursive` checkout) closes that gap. The renamed GitHub repo
`ZSeven-W/casement` (was `ZSeven-W/winit`) tracks the `op-file-open`
branch — `feat(macos): drain_opened_file_urls` + the package rename
landed there as commit 5877fa83.

- `.gitmodules`: add vendor/casement.
- Root Cargo.toml: exclude vendor/casement from the workspace glob
  (it's its own workspace).
- op-host-native + op-host-desktop: path = "../../vendor/casement".
This commit is contained in:
Kayshen-X 2026-05-21 22:23:34 +08:00
parent 70b87baff3
commit a3d142f586
5 changed files with 14 additions and 7 deletions

4
.gitmodules vendored
View file

@ -7,3 +7,7 @@
[submodule "vendor/jian"]
path = vendor/jian
url = git@github.com:ZSeven-W/jian.git
[submodule "vendor/casement"]
path = vendor/casement
url = https://github.com/ZSeven-W/casement.git
branch = op-file-open

View file

@ -9,6 +9,7 @@ members = ["crates/*"]
exclude = [
"vendor/agent",
"vendor/anthropic-agent-sdk",
"vendor/casement",
"vendor/jian",
"vendor/skia-safe-op",
"node_modules",

View file

@ -102,12 +102,12 @@ skia-safe = { version = "0.97.0", default-features = false, features = [
"gl",
"pdf",
] }
# `casement` — ZSeven-W's winit fork (sibling repo, local path for
# now). It adds `winit::platform::macos::drain_opened_file_urls`, the
# macOS open-documents Apple-event hook upstream winit lacks. The
# `casement` — ZSeven-W's winit fork (vendored as a submodule under
# `vendor/casement`). It adds `winit::platform::macos::drain_opened_file_urls`,
# the macOS open-documents Apple-event hook upstream winit lacks. The
# `package` key keeps the `winit` import name, so all `use winit::…`
# stays unchanged.
winit = { package = "casement", path = "../../../winit", default-features = false, features = [
winit = { package = "casement", path = "../../vendor/casement", default-features = false, features = [
"x11",
"wayland",
"wayland-csd-adwaita",

View file

@ -109,14 +109,15 @@ skia-safe = { version = "0.97.0", default-features = false, features = [
"gl",
] }
glutin = "0.32.3"
# `casement` — ZSeven-W's winit fork (sibling repo, local path for
# now). The `package` key keeps the `winit` import name. `glutin-winit`
# `casement` — ZSeven-W's winit fork (vendored as a submodule under
# `vendor/casement` so CI checks out the same source the desktop binary
# links). The `package` key keeps the `winit` import name. `glutin-winit`
# is intentionally NOT used: it hard-depends on the upstream `winit`
# package, which would pull a second, incompatible winit into the
# tree. Its only use here — `GlWindow::build_surface_attributes` — is
# replaced by a direct `glutin::surface::SurfaceAttributesBuilder`
# call in `context/provider.rs`.
winit = { package = "casement", path = "../../../winit", default-features = false, features = [
winit = { package = "casement", path = "../../vendor/casement", default-features = false, features = [
"x11",
"wayland",
"wayland-csd-adwaita",

1
vendor/casement vendored Submodule

@ -0,0 +1 @@
Subproject commit 5877fa83e8f7c5ce81afec234c1cd5146262a92e