Skip to content

Commit 881c4d3

Browse files
FarnaHerryFARNA-HERRY-OFF\farna
andauthored
Add eui neo 0.5.5 (#154)
* feat: bump compat.eui-neo to 0.5.5 (adds Shadertoy subsystem) Upstream 0.5.5 grew a Shadertoy subsystem that is mandatory, not optional: render_backend.h and include/eui/types.h include core/render/shadertoy.h unconditionally and opengl_backend.cpp calls releaseShaderToys(), so the old 20-TU recipe fails to link. Add shadertoy.cpp / shadertoy_json.cpp / shadertoy_primitive.cpp + opengl_shadertoy.cpp to the base sources and vulkan_shadertoy.cpp to the vulkan feature (24 base TUs). - Add 0.5.5 xpm entries (linux/macosx/windows); 0.5.3 retained. sha256 cf0da91d...eb98, computed twice. CN mirror pending mcpp-res write access, so 0.5.5 uses the plain-string fallback url (lint-exempt). - Bump all six tests/examples/eui-neo* members to 0.5.5. - Design doc: .agents/docs/2026-08-05-add-eui-neo-0.5.5-plan.md * fix: move -fno-char8_t to package-wide cxxflags for 0.5.5 0.5.5's Shadertoy subsystem and resolveResourcePath() return path::u8string() as std::string on every platform, so the char8_t break is no longer Windows-only. CI (linux+macos, mcpp 2026.8.3.3) failed to build with 'no viable conversion from basic_string<char8_t> to basic_string<char>'. -fno-char8_t moves from the windows profile to the base cxxflags; the rest of the package stays at c++23. --------- Co-authored-by: FARNA-HERRY-OFF\farna <farnaherryoffical@outlook.com>
1 parent f004897 commit 881c4d3

8 files changed

Lines changed: 169 additions & 26 deletions

File tree

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Design doc: bump `compat.eui-neo` to 0.5.5
2+
3+
Date: 2026-08-05
4+
5+
Follow-up to `.agents/docs/2026-07-29-add-eui-neo-plan.md` (which landed 0.5.3). Upstream
6+
released 0.5.4 and 0.5.5 as hotfixes; this bumps the index from 0.5.3 to 0.5.5 and — the
7+
non-trivial part — picks up the **Shadertoy subsystem** that 0.5.5 added to the core
8+
library.
9+
10+
## Source and version
11+
12+
| | |
13+
|---|---|
14+
| Upstream | `https://github.com/sudoevolve/EUI-NEO` |
15+
| Version | `0.5.5` (latest release, published 2024-08-02) |
16+
| Tarball | `archive/refs/tags/v0.5.5.tar.gz` |
17+
| sha256 | `cf0da91d7544fe406b704922137fd4d55ed080b3e647501e0ca5303abb00eb98` (computed twice, stable) |
18+
| Wrap dir | `EUI-NEO-0.5.5/` — absorbed by the standard `*/` glob prefix, no `install()` hook |
19+
| CN mirror | **pending** — no `mcpp-res` write access on this machine; see below |
20+
| License | Apache-2.0 (unchanged) |
21+
22+
## Build recipe change: the Shadertoy subsystem is now mandatory (NOT optional)
23+
24+
The descriptor's comment previously read "tracks upstream `CMakeLists.txt` (v0.5.3)". In
25+
0.5.5 the core library grew a Shadertoy subsystem, and it is **not** gated by any CMake
26+
option or macro:
27+
28+
- `CORE_SOURCES` gains `core/render/shadertoy.cpp`, `shadertoy_json.cpp`,
29+
`shadertoy_primitive.cpp` (unconditional).
30+
- The OpenGL backend list gains `core/render/opengl/opengl_shadertoy.cpp`.
31+
- `EUI_VULKAN_BACKEND_SOURCES` gains `core/render/vulkan/vulkan_shadertoy.cpp`.
32+
33+
The reason it cannot be left out:
34+
35+
- `core/render/render_backend.h` and `include/eui/types.h` both `#include
36+
<core/render/shadertoy.h>` **unconditionally** (line 3 of each) and re-export the
37+
`ShaderToy*` types (`using ShaderToyGraph = …`, etc.) with no `#ifdef` guard.
38+
- `render_backend.h` declares the `createShaderToy` / `renderShaderToy` virtuals (with
39+
inline `Unsupported` defaults).
40+
- `core/render/opengl/opengl_backend.cpp` calls `releaseShaderToys()` unconditionally
41+
(line 69) — dropping `opengl_shadertoy.cpp` is an undefined reference, not a silent
42+
behavioural gap.
43+
44+
So a 0.5.5 descriptor that kept the old 20-TU recipe would fail to link on the OpenGL
45+
path (the default) and never compile the Shadertoy interface the public headers promise.
46+
47+
No new dependencies are introduced by the five files:
48+
49+
| source | non-std includes | already a dep |
50+
|---|---|---|
51+
| `shadertoy.cpp` | — (std only) ||
52+
| `shadertoy_json.cpp` | `"eui/json.h"` | `core/platform/json.cpp` is in the base set |
53+
| `shadertoy_primitive.cpp` | `shadertoy_primitive.h`, `primitive_geometry.h` | — (internal headers) |
54+
| `opengl_shadertoy.cpp` | `<glad/glad.h>` | `compat.glad` |
55+
| `vulkan_shadertoy.cpp` | `vulkan_shadertoy_shaders.h` | `compat.vulkan` (feature) |
56+
57+
Everything else verified unchanged against 0.5.3: the 18 `CORE_SOURCES` paths the
58+
descriptor already named all still exist, the mcpp#233 `platform.o` collision stub
59+
(`core/platform/platform.cpp``mcpp_generated/eui_neo_platform_tu.cpp`) still applies,
60+
and every `3rd/` vendored dependency is at the same version the descriptor pins
61+
(freetype 2.13.3, glfw 3.4, libpng 1.6.43, zlib-1.3.1, yyjson-0.12.0; the single-file
62+
`stb_image.h` / `nanosvg*.h` remain at the `3rd/` root).
63+
64+
## Descriptor changes (`pkgs/e/compat.eui-neo.lua`)
65+
66+
1. `xpm.{linux,macosx,windows}` each gain a `["0.5.5"]` entry (0.5.3 retained).
67+
2. Base `sources` goes 20 → 24: `shadertoy.cpp`, `shadertoy_json.cpp`,
68+
`shadertoy_primitive.cpp` (render layer), `opengl_shadertoy.cpp` (OpenGL group).
69+
3. `vulkan` feature gains `vulkan_shadertoy.cpp` (6 → 7 sources).
70+
4. Header comment updated to v0.5.5 + the Shadertoy note.
71+
72+
## CN mirror: pending (fallback form used)
73+
74+
`gtc` is not installed and `~/.config/gitcode-tool/config.json` does not exist on this
75+
machine, so the 0.5.5 mirror cannot be published from here. Per `docs/cn-mirror.md`'s
76+
no-write-access fallback, the 0.5.5 entry uses a **plain-string url** (GLOBAL upstream
77+
release); `check_mirror_urls.lua` exempts plain strings, so lint stays green and CN users
78+
fall back to upstream. The 0.5.3 entries keep their `{ GLOBAL, CN }` tables.
79+
80+
Once `mcpp-res/eui-neo` has a `0.5.5` release (same tarball as GLOBAL for byte
81+
identical sha), flip the 0.5.5 `url` to `{ GLOBAL = …, CN =
82+
"https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.5/eui-neo-0.5.5.tar.gz" }`.
83+
sha256 does not change.
84+
85+
## Test members
86+
87+
All six `tests/examples/eui-neo*` members bumped their `compat.eui-neo` dep from `0.5.3`
88+
to `0.5.5` so the whole feature surface (markdown / vulkan / sdl2+network / app-main /
89+
window) exercises the new version. CI's selective-member logic already maps the
90+
descriptor edit to these members.
91+
92+
## Fix caught by CI: char8_t is now a package-wide problem
93+
94+
The first CI run (linux + macos, mcpp 2026.8.3.3) failed to build 0.5.5 with
95+
`no viable conversion from 'basic_string<char8_t>' to 'basic_string<char>'` in
96+
`core/platform/platform.cpp:616` (`resolveResourcePath()` returns
97+
`(error ? candidate : absolute).u8string()`) and `core/render/shadertoy_json.cpp`
98+
(lines 40, 56, 322). All are the `path::u8string()``std::string` conversion that
99+
`__cpp_char8_t` breaks.
100+
101+
The 0.5.3 descriptor scoped `-fno-char8_t` to the **windows** profile because the only
102+
offending line sat inside `#if defined(_WIN32)`. 0.5.5's new Shadertoy subsystem and
103+
`resolveResourcePath()` are not Windows-gated, so the flag moved **package-wide** (base
104+
`cxxflags`, lines above) and was dropped from the windows block. Everything else stays at
105+
c++23.
106+
107+
## Verification
108+
109+
- `mcpp xpkg parse` (mcpp 2026.8.4.1, the local pin) → `parse OK`: versions 0.5.3+0.5.5
110+
on all three platforms, sources 24, features 6.
111+
- The 0.5.5 sha256 was computed twice from the GLOBAL tarball and matches the entry in
112+
the descriptor (`stat`: 13,339,545 bytes, full).
113+
- Local `mcpp test` on this Windows box could not get past `xlings install_packages`
114+
(silent exit 1 after a complete download, reproduces for 0.5.3 too) — an
115+
environment-level issue, not the descriptor: CI's 2026.8.3.3 installs 0.5.5 and all
116+
deps fine and reaches the build step. The CI build errors above were the real signal,
117+
and they are what this char8_t fix addresses.
118+
119+
> NOTE: local mcpp is 2026.8.4.1 while CI pins 2026.8.3.3. Feature/parse behaviour is
120+
> unchanged across the two (nothing has touched the feature system since 0.0.109), but a
121+
> CI green is the authoritative signal.

pkgs/e/compat.eui-neo.lua

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@
1515
-- genuinely vendored single-file headers live at its root (stb_image,
1616
-- nanosvg, nanosvgrast) and the sources include them as `"3rd/stb_image.h"`.
1717
--
18-
-- The build recipe below tracks upstream `CMakeLists.txt` (v0.5.3): CORE_SOURCES
18+
-- The build recipe below tracks upstream `CMakeLists.txt` (v0.5.5): CORE_SOURCES
1919
-- plus the OpenGL backend and, for the glfw window backend, `ime_bridge.c`.
20+
-- 0.5.5 grew a Shadertoy subsystem: render_backend.h and include/eui/types.h now
21+
-- include core/render/shadertoy.h unconditionally, and opengl_backend.cpp calls
22+
-- releaseShaderToys(), so shadertoy.cpp / shadertoy_json.cpp / shadertoy_primitive.cpp
23+
-- and opengl_shadertoy.cpp are part of the lib, not optional (vulkan_shadertoy.cpp
24+
-- joins the `vulkan` feature the same way).
2025
--
2126
-- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/` absorbs
22-
-- the GitHub tarball's `EUI-NEO-0.5.3/` wrap layer.
27+
-- the GitHub tarball's `EUI-NEO-0.5.5/` wrap layer.
2328
package = {
2429
spec = "1",
2530
namespace = "compat",
@@ -36,20 +41,36 @@ package = {
3641
CN = "https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.3/eui-neo-0.5.3.tar.gz" },
3742
sha256 = "6951ac330d0307c633bafe720b7888bf32785103eb16973adb4ee05ef06e64d1",
3843
},
44+
-- CN mirror for 0.5.5 not published yet (no mcpp-res write access here);
45+
-- plain-string url keeps lint green and lets CN users fall back to
46+
-- upstream, per docs/cn-mirror.md. Flip to { GLOBAL, CN } once the
47+
-- gitcode release exists — sha256 stays the same.
48+
["0.5.5"] = {
49+
url = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.5.tar.gz",
50+
sha256 = "cf0da91d7544fe406b704922137fd4d55ed080b3e647501e0ca5303abb00eb98",
51+
},
3952
},
4053
macosx = {
4154
["0.5.3"] = {
4255
url = { GLOBAL = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.3.tar.gz",
4356
CN = "https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.3/eui-neo-0.5.3.tar.gz" },
4457
sha256 = "6951ac330d0307c633bafe720b7888bf32785103eb16973adb4ee05ef06e64d1",
4558
},
59+
["0.5.5"] = {
60+
url = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.5.tar.gz",
61+
sha256 = "cf0da91d7544fe406b704922137fd4d55ed080b3e647501e0ca5303abb00eb98",
62+
},
4663
},
4764
windows = {
4865
["0.5.3"] = {
4966
url = { GLOBAL = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.3.tar.gz",
5067
CN = "https://gitcode.com/mcpp-res/eui-neo/releases/download/0.5.3/eui-neo-0.5.3.tar.gz" },
5168
sha256 = "6951ac330d0307c633bafe720b7888bf32785103eb16973adb4ee05ef06e64d1",
5269
},
70+
["0.5.5"] = {
71+
url = "https://github.com/sudoevolve/EUI-NEO/archive/refs/tags/v0.5.5.tar.gz",
72+
sha256 = "cf0da91d7544fe406b704922137fd4d55ed080b3e647501e0ca5303abb00eb98",
73+
},
5374
},
5475
},
5576

@@ -120,6 +141,9 @@ package = {
120141
"*/core/render/image_source.cpp",
121142
"*/core/render/primitive.cpp",
122143
"*/core/render/render_backend.cpp",
144+
"*/core/render/shadertoy.cpp",
145+
"*/core/render/shadertoy_json.cpp",
146+
"*/core/render/shadertoy_primitive.cpp",
123147
"*/core/render/stb_image_impl.cpp",
124148
"*/core/render/text.cpp",
125149
-- OpenGL backend and the GLFW IME bridge are UNCONDITIONAL sources.
@@ -128,6 +152,7 @@ package = {
128152
"*/core/render/opengl/opengl_backend.cpp",
129153
"*/core/render/opengl/opengl_image.cpp",
130154
"*/core/render/opengl/opengl_primitives.cpp",
155+
"*/core/render/opengl/opengl_shadertoy.cpp",
131156
"*/core/render/opengl/opengl_text.cpp",
132157
"*/core/platform/ime_bridge.c",
133158
-- Window layer
@@ -222,7 +247,12 @@ package = {
222247
-- `#else` branch returning a null backend. Verified by symbol
223248
-- inspection, since it links and runs cleanly either way.
224249
cflags = { "-include", "mcpp_eui_backends.h" },
225-
cxxflags = { "-include", "mcpp_eui_backends.h" },
250+
-- `-fno-char8_t` is package-wide since 0.5.5: the Windows-only char8_t
251+
-- break of 0.5.3 (parseWindowsSelection) is no longer the only one —
252+
-- resolveResourcePath() (platform.cpp:616) and the new Shadertoy TUs
253+
-- return path::u8string() as std::string on EVERY platform. Root cause
254+
-- is char8_t, not the standard level; everything else stays at c++23.
255+
cxxflags = { "-include", "mcpp_eui_backends.h", "-fno-char8_t" },
226256

227257
features = {
228258
["vulkan"] = {
@@ -233,6 +263,7 @@ package = {
233263
"*/core/render/vulkan/vulkan_image.cpp",
234264
"*/core/render/vulkan/vulkan_polygon.cpp",
235265
"*/core/render/vulkan/vulkan_primitives.cpp",
266+
"*/core/render/vulkan/vulkan_shadertoy.cpp",
236267
"*/core/render/vulkan/vulkan_text.cpp",
237268
},
238269
deps = { ["compat.vulkan"] = "1.4.357.0" },
@@ -324,23 +355,14 @@ package = {
324355
-- this never came up before.
325356
cflags = { "-DEUI_TRAY_WINAPI=1", "-DNOMINMAX", "-D_WIN32_WINNT=0x0A00" },
326357
-- Upstream builds at CMAKE_CXX_STANDARD 17; this index's floor is
327-
-- c++23, and one Windows-only line does not survive the move:
328-
-- `parseWindowsSelection()` in core/platform/platform.cpp pushes
329-
-- `path::u8string()` into a std::vector<std::string>, and C++20
330-
-- changed that return type to std::u8string.
331-
--
332-
-- The root cause is char8_t, not the standard level, so turn off
333-
-- exactly that: every STL's <filesystem> selects the u8string()
334-
-- return type on `__cpp_char8_t`, which -fno-char8_t undefines.
335-
-- The rest of the package stays at c++23 on every platform.
336-
--
337-
-- Linux and macOS never see this — the code is inside
338-
-- `#if defined(_WIN32)`. Worth fixing upstream (`wideToUtf8()`
339-
-- already sits eight lines above and does the right thing); until
340-
-- then this keeps us on a real upstream release tag rather than a
341-
-- fork carrying the patch.
342-
cxxflags = { "-DEUI_TRAY_WINAPI=1", "-DNOMINMAX", "-fno-char8_t",
343-
"-D_WIN32_WINNT=0x0A00" },
358+
-- c++23. `-fno-char8_t` is applied PACKAGE-WIDE (base cxxflags)
359+
-- since 0.5.5, not here: 0.5.3 only tripped on char8_t inside the
360+
-- Windows-only `parseWindowsSelection()`, but 0.5.5's
361+
-- resolveResourcePath() and the Shadertoy TUs return
362+
-- path::u8string() as std::string on every platform. Worth fixing
363+
-- upstream; until then this keeps us on a real upstream release
364+
-- tag rather than a fork carrying the patch.
365+
cxxflags = { "-DEUI_TRAY_WINAPI=1", "-DNOMINMAX", "-D_WIN32_WINNT=0x0A00" },
344366
-- Upstream lists winmm/urlmon/shell32/user32/imm32/pdh and stops
345367
-- there, because CMake's MSVC default `CMAKE_C_STANDARD_LIBRARIES`
346368
-- already drags in kernel32/user32/gdi32/shell32/ole32/comdlg32/…

tests/examples/eui-neo-app-main/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ name = "eui-neo-app-main-tests"
3030
version = "0.1.0"
3131

3232
[dependencies.compat]
33-
eui-neo = { version = "0.5.3", features = ["app-main"] }
33+
eui-neo = { version = "0.5.5", features = ["app-main"] }

tests/examples/eui-neo-markdown/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ version = "0.1.0"
77
# what switches components/markdown.h from its fallback to the real parser.
88

99
[dependencies.compat]
10-
eui-neo = { version = "0.5.3", features = ["markdown"] }
10+
eui-neo = { version = "0.5.5", features = ["markdown"] }

tests/examples/eui-neo-sdl2/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ version = "0.1.0"
77
# into a real libcurl-backed implementation. The render backend stays OpenGL,
88
# unnamed — naming a feature no longer costs you the defaults.
99
[dependencies.compat]
10-
eui-neo = { version = "0.5.3", features = ["sdl2", "network"] }
10+
eui-neo = { version = "0.5.5", features = ["sdl2", "network"] }

tests/examples/eui-neo-vulkan/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version = "0.1.0"
66
# package resolves the exclusive choice in its own preprocessor from the
77
# MCPP_FEATURE_* flags. The window backend stays GLFW, unnamed.
88
[dependencies.compat]
9-
eui-neo = { version = "0.5.3", features = ["vulkan"] }
9+
eui-neo = { version = "0.5.5", features = ["vulkan"] }
1010

1111
[build]
1212
cxxflags = ["-DHAVE_EUI_VULKAN=1"]

tests/examples/eui-neo-window/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ name = "eui-neo-window-tests"
3434
version = "0.1.0"
3535

3636
[dependencies.compat]
37-
eui-neo = "0.5.3"
37+
eui-neo = "0.5.5"

tests/examples/eui-neo/mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name = "eui-neo-tests"
33
version = "0.1.0"
44

55
[dependencies.compat]
6-
eui-neo = "0.5.3"
6+
eui-neo = "0.5.5"

0 commit comments

Comments
 (0)