Skip to content

Phase 2: Freestanding / embedded profile (no exceptions/RTTI option) #15

Description

@tap

Part of Phase 2 — Reach (ROADMAP.md).

A build profile that lets the parse/serialize core compile and run with C++ exceptions and RTTI disabled and the hosted-only facilities dropped — the shape an embedded target needs (see the Pico 2W demand signal, sibling issue).

Groundwork — landed (branch claude/phase-2-prep-h8q9mz):

  • osc/OscConfig.h build seam: auto-detect OSCTAP_HAS_EXCEPTIONS; route every core throw through OSCTAP_THROW (plain throw when exceptions are on; non-returning, user-overridable OSCTAP_FATAL_HANDLER, default std::abort(), when off).
  • OSCTAP_FREESTANDING drops <iostream>, the std::vector-backed OwnedMessage, and the std::string operator<<.
  • OSCTAP_FREESTANDING CMake option builds tests/OscFreestandingTest.cpp with -fno-exceptions -fno-rtti (flags PRIVATE to that target); freestanding CI job (GCC + Clang, C++17/20) keeps it green.
  • Hosted builds byte-for-byte unchanged (OSCTAP_THROW(X)throw X).

Deferred follow-up:

  • Non-throwing TryInit/validate entry point so a no-exceptions build can reject untrusted packets by returning an error instead of aborting. Until then, malformed input on an exceptions-off build is fatal — safe only on a trusted link (open networks should keep exceptions on and catch the Malformed*Exception types). See the security note in docs/EMBEDDED_PICO2W.md.
  • A non-throwing realtime blob accessor (also tracked from the Phase 1 RTSan deferral).

C++ feature discipline and the realtime contract in ROADMAP.md apply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions