Phase 2 prep: freestanding/embedded profile groundwork + Pico 2W guide#20
Merged
Conversation
Lay the groundwork for Phase 2 ("Reach") with the one self-contained,
keep-it-green item — the freestanding/embedded profile (no exceptions/RTTI)
— motivated by a concrete demand signal: the Raspberry Pi Pico 2W (RP2350).
- osc/OscConfig.h: build seam. Auto-detects OSCTAP_HAS_EXCEPTIONS and routes
every core throw through OSCTAP_THROW (a plain `throw` when exceptions are
on; a non-returning, user-overridable fatal handler when they are off).
OSCTAP_FREESTANDING drops the hosted-only facilities.
- OscReceivedElements.h / OscOutboundPacketStream.h: route all 78 throw sites
through OSCTAP_THROW; guard <iostream>, <vector>/OwnedMessage, and the
std::string operator<< behind OSCTAP_FREESTANDING. Hosted builds unchanged.
- CMake OSCTAP_FREESTANDING option builds tests/OscFreestandingTest.cpp with
-fno-exceptions -fno-rtti (flags PRIVATE to that target); new `freestanding`
CI job (GCC + Clang) keeps it green.
- docs/EMBEDDED_PICO2W.md: Pico SDK + lwIP integration recipe, including the
untrusted-input/exceptions trade-off and the no-heap RT checklist.
- ROADMAP.md / docs/STATUS.md: mark the groundwork landed, restate the
remaining Reach items as demand-gated, add landmines for the new seam.
Verified: hosted suite green (C++17/20, GCC/Clang/ASan/UBSan); freestanding
test builds+runs under -fno-exceptions -fno-rtti on GCC and Clang, C++17/20.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMR6tmM7H3obaL7SX14bkJ
This was referenced Jun 27, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lays the groundwork for Phase 2 ("Reach") with the one self-contained, keep-it-green item — the freestanding/embedded profile (no exceptions/RTTI) — motivated by a concrete demand signal: the Raspberry Pi Pico 2W (RP2350). The other Reach items (QEMU, Android NDK, multicast) stay demand-gated.
Closes the groundwork portion of #15; adds the guide for #16.
The build seam
New
osctap/osc/OscConfig.h:OSCTAP_HAS_EXCEPTIONSfrom the compiler.throwsites throughOSCTAP_THROW. With exceptions on it is literallythrow X— hosted builds are byte-for-byte unchanged (thetest4/test5malformed-input asserts still pass). Under-fno-exceptionsit calls a non-returning, user-overridable fatal handler (OSCTAP_FATAL_HANDLER, defaultstd::abort()).OSCTAP_FREESTANDINGdrops the hosted-only facilities:<iostream>, thestd::vector-backedOwnedMessage, and thestd::stringoperator<<.Also fixes a latent dependency: the outbound header used
std::stringrelying on<iostream>to transitively include<string>— now explicit.Profile + CI
OSCTAP_FREESTANDINGCMake option buildstests/OscFreestandingTest.cppwith-fno-exceptions -fno-rtti(flags PRIVATE to that target, so the exception-based tests are unaffected). The test serializes then parses a message through the checked accessors (provingOSCTAP_THROWcompiles under-fno-exceptions) and the realtime*Uncheckedpath.freestandingCI job (GCC + Clang).Docs
docs/EMBEDDED_PICO2W.md— Pico SDK + lwIP integration recipe (useosc/core, replaceip/sockets with lwIP UDP), receive/send snippets, no-heap RT checklist, and the untrusted-input/DoS trade-off: with exceptions off a malformed packet hits the fatal handler, so open networks should keep exceptions on andcatch— the non-throwingTryInit/validate to fix this is tracked as deferred work in Phase 2: Freestanding / embedded profile (no exceptions/RTTI option) #15.ROADMAP.md/docs/STATUS.md— mark the groundwork landed, restate the remaining Reach items as demand-gated, fix the stale status line, add landmines for the new seam.Verification
OscFreestandingTestbuilds + runs under-fno-exceptions -fno-rttion GCC and Clang, C++17 and C++20.Follow-up (tracked)
Phase 2 issues opened: #15 (freestanding), #16 (Pico 2W), #17 (QEMU CI), #18 (Android NDK), #19 (multicast). The "Phase 2 — Reach" milestone object is an owner action — the GitHub MCP server exposes no milestone-creation endpoint.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MMR6tmM7H3obaL7SX14bkJ
Generated by Claude Code