Tracking issue for moving morph onto core-cpp v0.2.1, the shared C++23 foundation of the Contour Terminal projects. Everything lands as one branch, build/core-cpp, and one pull request, in this commit order. Each commit is green on its own.
build: fetch dependencies with CPM instead of FetchContent
- glaze, Catch2, doxygen-awesome-css and both Lightweight sites go through
CPMAddPackage, using core-cpp's pinned cmake/CPM.cmake (0.40.8 plus its SHA-256).
cmake/DepCache.cmake is replaced by CPM's CPM_SOURCE_CACHE, which defaults to .cache/cpm.
ci.yml, wasm-ladder.yml and wasm-demo.yml cache that directory.
core: TimeoutScheduler is one implementation over core-cpp's event-loop timers
- core-cpp v0.2.1 comes in through CPM, linking
core::base, core::async and core::net, plus core::platform natively.
TimeoutScheduler becomes one class:
- natively, a thread running a
core::net::PlatformLoop;
- under single-threaded WebAssembly, a host-driven
PlatformLoop with no thread.
- The public API is unchanged.
cancel() still releases the callback's captures immediately, and in the browser it now also retires the timer.
net: base64 and the wakeup pipe come from core-cpp
morph/net/detail/base64.hpp is replaced by core::base64.
SocketServer's nested WakeupPipe is replaced by core::platform::Wakeup.
- Coroutine support on
core::async, spec first (docs/spec/core/coroutines.md):
Completion<T> is awaitable, via operator co_await() &&;
morph::async::spawn and morph::async::delay;
- Task-returning model handlers are driven on the model's strand through
StrandCoroExecutor;
- then tests, the implementation, and one bank or ladder action plus one GUI flow converted as a demonstration.
Constraints
- morph's public surface stays header-only. Its consumers now also build core-cpp's static libraries, which the README and
docs/ARCHITECTURE.md will say.
- Single-threaded WebAssembly (Qt
wasm_singlethread, emsdk 3.1.56) must keep working. wasm-ladder and wasm-demo then compile core-cpp's WebAssembly subset.
- The wire protocol and the remote backends are unchanged.
Verification status. Nothing is measured yet; this issue is filed before the work starts. The pull request will carry a gate table covering:
- Windows MSVC (vcpkg preset);
- WSL GCC 15 and Clang;
- the CI legs, including
wasm-ladder and wasm-demo.
What would change this plan: a gap in core-cpp's API, or in its WebAssembly subset, that morph would have to work around. Any such gap is reported to core-cpp and fixed there, not patched here.
Tracking issue for moving morph onto core-cpp v0.2.1, the shared C++23 foundation of the Contour Terminal projects. Everything lands as one branch,
build/core-cpp, and one pull request, in this commit order. Each commit is green on its own.build: fetch dependencies with CPM instead of FetchContentCPMAddPackage, using core-cpp's pinnedcmake/CPM.cmake(0.40.8 plus its SHA-256).cmake/DepCache.cmakeis replaced by CPM'sCPM_SOURCE_CACHE, which defaults to.cache/cpm.ci.yml,wasm-ladder.ymlandwasm-demo.ymlcache that directory.core: TimeoutScheduler is one implementation over core-cpp's event-loop timerscore::base,core::asyncandcore::net, pluscore::platformnatively.TimeoutSchedulerbecomes one class:core::net::PlatformLoop;PlatformLoopwith no thread.cancel()still releases the callback's captures immediately, and in the browser it now also retires the timer.net: base64 and the wakeup pipe come from core-cppmorph/net/detail/base64.hppis replaced bycore::base64.SocketServer's nestedWakeupPipeis replaced bycore::platform::Wakeup.core::async, spec first (docs/spec/core/coroutines.md):Completion<T>is awaitable, viaoperator co_await() &&;morph::async::spawnandmorph::async::delay;StrandCoroExecutor;Constraints
docs/ARCHITECTURE.mdwill say.wasm_singlethread, emsdk 3.1.56) must keep working.wasm-ladderandwasm-demothen compile core-cpp's WebAssembly subset.Verification status. Nothing is measured yet; this issue is filed before the work starts. The pull request will carry a gate table covering:
wasm-ladderandwasm-demo.What would change this plan: a gap in core-cpp's API, or in its WebAssembly subset, that morph would have to work around. Any such gap is reported to core-cpp and fixed there, not patched here.