Announcing C+ 0.0.30
C+ 0.0.30 moves the Windows UI and agent stack to WinUI 3, brings native
design-system parity across Apple, Android, Linux, and Windows, adds
#target_feature and #bitcast to the compiler, tightens error and status
checking in the standard library, and expands the package and tooling surface.
Like every C+ release, 0.0.30 compiles to native machine code through LLVM with no virtual machine and no garbage collector.
WinUI 3 on Windows
On Windows, the Facet and agent stacks now target WinUI 3 (Windows App SDK 1.6) through four packages:
winrt: foundationalHSTRING,IInspectable, activation factories, and apartment initialization.winui: typed WinRT COM vtable bindings forMicrosoft.UI.Xaml.*controls, layouts, brushes, and events, with a zero-SDK C ABI stub (winui_c_abi.c) that builds against standard MinGW headers.facet_winui: the Windows Facet backend (App,Window,NavigationView,TabView,CommandBar,MenuBar,ContentDialog,ScrollViewer, and Direct2D canvas).agent_winui,agent_winui_mcp, andfacet_agent_winui: the Windows agent surface and MCP bridge over liveUIElementtrees.
facet_runtime and facet_agent now dispatch to facet_winui and
agent_winui on Windows. facet_win32 is deprecated on Windows and retained
only for legacy compatibility.
Cross-platform design-system parity
Every Facet backend now renders through its platform's native design system
from the same declarative @view tree:
- macOS (
facet_appkit) and iOS (facet_uikit): Liquid Glass materials (NSGlassEffectViewon macOS 26+ withNSVisualEffectViewfallback;UIVisualEffectViewblur chrome on iOS), semantic colors, SF Symbols, and native springs. - Android (
facet_android): Material 3 tonal surfaces, 28 dp dialog radii, pill buttons and badges, Material 3 typography and switches, and spring animator physics. - Linux (
facet_gtk): Libadwaita / GNOME HIG surface hierarchy, semantic badge and progress colors, boxed lists, and 12 px card radii. - Windows (
facet_winui): Fluent 2 / WinUI 3 Mica backdrop, acrylic overlays, and native Xaml controls.
In the shared @view grammar, scroll is now a container block (scroll { ... }, scroll_x { ... }, scroll_both { ... }), matching row, column, and stack. Attaching a trailing { ... } block to a leaf control (text, button, badge, spacer, divider, progress, and so on) is now rejected at compile time with E1010.
Compiler and language updates
#target_feature("NAME") and #bitcast::[T](v)
#target_feature("NAME") is a compile-time bool intrinsic that reports
whether a CPU feature ("avx2", "fma", "avx512f", "neon", "dotprod",
and others) is enabled for the active target by --target-cpu and
--target-feature:
if #target_feature("avx2") {
return dot_256(a, b, n);
}
return dot_128(a, b, n);
A feature belonging to another architecture evaluates to false; an unknown
feature name is rejected with E0903.
Bit-preserving conversion between equal-width scalars (i8/u8,
i16/u16/f16/bf16, i32/u32/f32, i64/u64/f64) is now the
#bitcast::[T](v) intrinsic (introduced in 0.0.29), lowering to an LLVM bitcast
or constant fold:
let bits: u32 = #bitcast::[u32](1.0f32);
let back: f32 = #bitcast::[f32](bits);
Width mismatches and non-scalar operands are rejected with E0310. The
earlier f16::from_bits, bf16::from_bits, f32::from_bits, f64::from_bits,
and .to_bits() methods have been removed.
Template checking on generic impl blocks
Generic impl blocks are now type-checked at template definition time before
any concrete instantiation exists. Bad field accesses, undefined names, return
type mismatches, and unsatisfied interface bounds inside a generic method body
are caught immediately even when no caller instantiates the type.
Diagnostics and safety checks
- W0009 (unused
Status): discarding astatus::Statusreturn value as a bare statement now warns with W0009. Bind the result and check.is_ok(), or writelet _ = ...;when discarding on purpose. - E0415 (
export extern fnsignature collision): declaring twoexport extern fnitems with the same unmangled C symbol and different parameter or return types is now an error. - W0007 (non-UTF-8 string literal): string literals containing raw
\xNNbyte escapes that do not form valid UTF-8 now warn with W0007. - W0008 (redundant import): importing a module that is already in scope or never referenced warns with W0008.
- Exhaustive
guard let ... else Pattern: when aguard letnames a complement pattern afterelse, the compiler verifies that the two patterns cover the enum without gaps (E0340) or overlap (E0350).
Standard library and packages
stdlib/pathandstdlib/template:stdlib/pathprovides allocation-freestrpath slicing (basename,dirname,extension,stem,is_absolute) alongside ownedjoinandwith_extension.stdlib/templaterenders{{key}}placeholders with default HTML escaping and{{{raw}}}unescaped interpolation.- Total stdlib value producers: functions that construct and return a new
TextorVec(text::from_str,text::join,repeating,appending,replacing,pad_start,pad_end,str.split,vec::collect) return a valid empty value if an allocation fails partway through, rather than returning a truncated prefix. appenv: application data, cache, config, state, log, runtime, and temporary directory resolution now live in the standaloneappenvpackage.facet_runtime::app_data_dir()andfacet_runtime::cache_dir()have been removed.hybrid_web: unified around a singlePagehandle (load_url,load_html,eval_js,reload,back,forward,set_title_handler,set_load_handler). Eachfacet_*backend mounts aPagethroughmount_hybrid_web.
Tooling and agent sockets
- Doctests accept
```cplusfences:cpc testnow extracts doctests from both bare```and```cplusdoc-comment code fences. An unclosed C+ doc fence fails the test build instead of being silently skipped. - Per-UID agent socket directory: on macOS and Linux,
agent_mcpplaces Unix-domain sockets inside/tmp/cplus-<uid>/(0700) ascplus-agent-<pid>.sock. On Windows,agent_winui_mcpuses a named pipe (\\.\pipe\cplus-agent-<pid>). - LSP and MCP: added
--log-file PATHfor session tracing, improved hover docs and inlay hints, and addedscope_attocpc queryandcpc mcp.
Install and read
brew update && brew upgrade cplus
cpc --version
Linux and Windows builds are available from the
GitHub releases page. Read the
C+ 0.0.30 manual and the complete release notes
for the full list of changes and migration details. Earlier manuals remain
archived under /docs/{version}.
‹ Back to all posts