Skip to content

Commit 55f273c

Browse files
committed
docs: plan GL runtime packages
1 parent c5bee46 commit 55f273c

1 file changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# mcpp-index: GL Runtime Packages Plan
2+
3+
> 状态: active
4+
> 分支: `codex/gl-runtime-closure-index`
5+
> PR: pending
6+
> Last updated: 2026-06-03
7+
> 目标: 让 GLFW/OpenGL 相关包描述表达标准运行时需求,而不是依赖 smoke 脚本里的临时 `LD_LIBRARY_PATH` shim。
8+
9+
## Scope
10+
11+
This repository owns package metadata and package-level smoke tests. It should
12+
model OpenGL headers, GL dispatch/runtime libraries, and system GPU/display
13+
requirements as separate concepts.
14+
15+
## Package Boundary
16+
17+
- `compat.opengl`
18+
- Keep as Khronos OpenGL registry/header provider.
19+
- Do not turn it into a host driver wrapper.
20+
- `compat.glfw`
21+
- Owns GLFW source build and X11/GLX backend selection.
22+
- Should declare runtime requirements for the GLX libraries it loads through
23+
GLFW's upstream `dlopen` behavior.
24+
- `compat.glvnd` or `compat.libglvnd`
25+
- New standard runtime package candidate for GL dispatch libraries:
26+
`libOpenGL.so`, `libGL.so`, `libGLX.so`, `libGLdispatch.so`.
27+
- `compat.mesa-llvmpipe`
28+
- Optional follow-up for self-contained software rendering and CI/headless
29+
validation. This is larger and should not block the first metadata path.
30+
- Host GPU/OpenGL driver
31+
- Model as a system capability such as `opengl.glx.driver`.
32+
- Do not silently pretend vendor drivers are normal redistributable packages.
33+
34+
## Implementation Plan
35+
36+
- [x] Create this repository-level plan checkpoint.
37+
- [ ] Keep `compat.opengl` header-only and update docs if needed.
38+
- Candidate file: `pkgs/c/compat.opengl.lua`.
39+
- [ ] Add a GL runtime provider package.
40+
- Candidate file: `pkgs/c/compat.glvnd.lua`.
41+
- The first version may expose libglvnd runtime/headers if the source build
42+
is practical in current mcpp package descriptors.
43+
- If libglvnd source packaging is not yet practical, keep this task open and
44+
document the exact blocker rather than replacing it with a host shim.
45+
- [ ] Update `compat.glfw` runtime metadata.
46+
- Candidate file: `pkgs/c/compat.glfw.lua`.
47+
- Declare `dlopen_libs = {"libGLX.so.0", "libGL.so.1", "libGL.so"}`.
48+
- Declare `capabilities = {"x11.display", "opengl.glx.driver"}` for Linux
49+
X11/GLX window execution.
50+
- Keep X11 link/runtime packages as normal dependencies.
51+
- [ ] Replace script-only GL runtime behavior in the window smoke.
52+
- Candidate file: `tests/smoke_compat_imgui_window.sh`.
53+
- The target behavior is `mcpp run` with package-declared runtime metadata.
54+
- The existing host shim may remain only as diagnostic evidence until the
55+
mcpp runtime metadata support lands.
56+
- [ ] Add README package semantics.
57+
- Candidate file: `README.md`.
58+
- Document the difference between OpenGL headers, GL runtime dispatch, and
59+
host display/GPU capabilities.
60+
61+
## Verification
62+
63+
- [ ] `MCPP=<mcpp> tests/smoke_compat_imgui.sh`
64+
- [ ] `MCPP=<mcpp> tests/smoke_compat_imgui_window.sh`
65+
- [ ] `MCPP=<mcpp> MCPP_INDEX_RUN_WINDOW_SMOKE=1 tests/smoke_compat_imgui_window.sh`
66+
- [ ] A focused GLFW/OpenGL smoke that uses `mcpp run` without script-local
67+
`LD_LIBRARY_PATH` once mcpp runtime metadata support is available.
68+
69+
## PR / CI / Merge Notes
70+
71+
- [ ] Commit this plan as the first checkpoint.
72+
- [ ] Open a PR with sanitized paths and no local machine details.
73+
- [ ] Include a test plan and note which runtime checks require a display.
74+
- [ ] Wait for repository validation CI.
75+
- [ ] Squash merge after required checks pass.
76+
77+
## Cross-Repository Dependencies
78+
79+
- Depends on `mcpp` runtime metadata support for the final no-shim run smoke.
80+
- Feeds `imgui-m` validation by making its window example runnable through
81+
standard package metadata.
82+
- Does not require `xim-pkgindex` until a released mcpp or package-index update
83+
needs to be mirrored or distributed through xlings.

0 commit comments

Comments
 (0)