<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="https://safec-org.github.io/">
<title>SafeC Blog</title>
<subtitle>News from the SafeC project — announcements, release notes and what the language and its standard library are growing into.</subtitle>
<link rel="self" href="https://safec-org.github.io/safec-docs/blog/feed.xml"/>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/"/>
<id>https://safec-org.github.io/safec-docs/blog/</id>
<updated>2026-10-27T00:00:00Z</updated>
<entry>
<title>SafeC 1.0.0-beta-7 released</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-7.html"/>
<id>https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-7.html</id>
<published>2026-10-27T00:00:00Z</published>
<updated>2026-10-27T00:00:00Z</updated>
<author><name>SafeC release notes</name></author>
<category term="release"/>
<summary>SafeC 1.0.0-beta-7 ships a web stack with HTTPS, Rust-style async, a GUI toolkit, real-time audio and MIDI, safeguard doc and publish, and the self-hosted compiler behind the online playground — and two breaking changes: a std API built on slices instead of void* and pointer + length pairs, and compiler-enforced Drop and Send/Sync.</summary>
<content type="html">&lt;p&gt;SafeC &lt;strong&gt;1.0.0-beta-7&lt;/strong&gt; was released on 2026-10-27. It is a pre-release: the language and std are still moving quickly.&lt;/p&gt;
&lt;p&gt;It is the largest release so far: pull requests &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/51&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#51&lt;/a&gt; through &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/88&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#88&lt;/a&gt;, everything merged since &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-6.html&quot;&gt;1.0.0-beta-6&lt;/a&gt;. &lt;a href=&quot;/safec-docs/blog/whats-coming-next.html&quot;&gt;What&#39;s coming next&lt;/a&gt; tracked it as it landed and has the longer write-up of each area; the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt; lists every change down to individual signatures.&lt;/p&gt;
&lt;p&gt;Install this exact release:&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/safec-org/SafeC/main/install.sh | bash -s -- --version=v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;language-powershell code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;powershell&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&amp;amp; ([scriptblock]::&lt;span class=&quot;tok-fn&quot;&gt;Create&lt;/span&gt;((irm https://raw.githubusercontent.com/safec-org/SafeC/main/install.ps1))) -Version v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;highlights&quot; tabindex=&quot;-1&quot;&gt;Highlights &lt;a class=&quot;header-anchor&quot; href=&quot;#highlights&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A web stack&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/57&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#57&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/http.html&quot;&gt;&lt;code&gt;std/http&lt;/code&gt;&lt;/a&gt; is a keep-alive server with a router and middleware, static files, cookies, multipart forms, server-sent events and WebSocket, plus a URL client that follows redirects and decodes gzip; &lt;code&gt;std/encoding/url&lt;/code&gt; and &lt;code&gt;std/encoding/deflate&lt;/code&gt; come with it, and &lt;a href=&quot;/safec-docs/stdlib/wasm.html&quot;&gt;&lt;code&gt;std/wasm&lt;/code&gt;&lt;/a&gt; has full DOM and browser-API interop.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTPS&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/66&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#66&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/tls.html&quot;&gt;&lt;code&gt;std/tls&lt;/code&gt;&lt;/a&gt; uses the operating system&#39;s TLS (OpenSSL, SChannel, Secure Transport) with a SafeC TLS 1.3 fallback, and &lt;code&gt;std/http&lt;/code&gt; speaks &lt;code&gt;https://&lt;/code&gt; and &lt;code&gt;wss://&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Async&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/61&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#61&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/async.html&quot;&gt;&lt;code&gt;std/async&lt;/code&gt;&lt;/a&gt; brings Rust&#39;s &lt;code&gt;Future&lt;/code&gt; / &lt;code&gt;Poll&lt;/code&gt; / &lt;code&gt;Waker&lt;/code&gt; model as &lt;code&gt;goto&lt;/code&gt; state machines, with timers, combinators, channels, a no-heap &lt;code&gt;LocalExecutor&lt;/code&gt;, a multi-threaded &lt;code&gt;ThreadPool&lt;/code&gt; and async TCP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A GUI toolkit&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/65&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#65&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/gui.html&quot;&gt;&lt;code&gt;std/gui&lt;/code&gt;&lt;/a&gt; has an anti-aliased vector canvas with TrueType text, a widget toolkit and multi-window &lt;code&gt;GuiApp&lt;/code&gt;, on X11, Wayland, Win32, Cocoa and the web, with GL ES, Metal and D3D11 presenters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audio and MIDI&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/59&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#59&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/audio.html&quot;&gt;&lt;code&gt;std/audio&lt;/code&gt;&lt;/a&gt; is one callback API over ALSA, JACK, Core Audio, WASAPI and Web Audio, with MIDI on every platform.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;safeguard doc&lt;/code&gt; and &lt;code&gt;safeguard publish&lt;/code&gt;&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/69&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#69&lt;/a&gt;): a rustdoc-style &lt;a href=&quot;/safec-docs/advanced/safeguard.html#safeguard-doc&quot;&gt;API reference&lt;/a&gt; for any package (std&#39;s is at &lt;a href=&quot;/safec-docs/api/&quot;&gt;/api/&lt;/a&gt;), and &lt;a href=&quot;/safec-docs/advanced/safeguard.html#safeguard-publish&quot;&gt;library publishing&lt;/a&gt; with CI, release archives and Pages docs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;scc&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/70&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#70&lt;/a&gt;): a SafeC compiler written in SafeC that emits WebAssembly and reproduces itself byte for byte. It runs the &lt;a href=&quot;/safec-docs/playground.html&quot;&gt;Playground&lt;/a&gt; in your browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;safeguard packages&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/51&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#51&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/55&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#55&lt;/a&gt;): C, C++ and Objective-C packages and dependencies, library headers, Windows DLLs and app bundles; a build links only the std modules a project uses, with their system libraries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ML on Vulkan and WebGPU&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/54&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#54&lt;/a&gt;): &lt;code&gt;std/ml&lt;/code&gt; tensor devices for SPIR-V (Vulkan) and WebGPU, beside CUDA, ROCm and Metal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prebuilt std in sections&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt;): releases ship std compiled per platform, one archive per section, chosen with &lt;code&gt;install.sh --std=...&lt;/code&gt; / &lt;code&gt;install.ps1 -Std ...&lt;/code&gt;; the release binaries run on macOS 11 and glibc 2.25 or newer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Versions you can check&lt;/strong&gt;: &lt;code&gt;safec --version&lt;/code&gt; and the new &lt;code&gt;safeguard --version&lt;/code&gt; both print &lt;code&gt;1.0.0-beta-7&lt;/code&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/85&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#85&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fixes&lt;/strong&gt;: variadic calls promote &lt;code&gt;bool&lt;/code&gt; / &lt;code&gt;char&lt;/code&gt; / &lt;code&gt;short&lt;/code&gt; to &lt;code&gt;int&lt;/code&gt;; safety-check gaps around &lt;code&gt;const &amp;amp;T&lt;/code&gt; field writes, &lt;code&gt;-&amp;gt;&lt;/code&gt; escapes and container element references are closed; every container now drops its elements; &lt;code&gt;Typedef** x&lt;/code&gt; locals parse; the lifetime analysis treats &lt;code&gt;const &amp;amp;R T&lt;/code&gt; as a reference to const and ends expression temporaries at their full expression; and Windows and macOS CI are green (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/52&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#52&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/53&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#53&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/64&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#64&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/68&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#68&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/71&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#71&lt;/a&gt;–&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/75&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#75&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/78&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#78&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/79&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#79&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/82&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#82&lt;/a&gt;–&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/84&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#84&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compiler and safeguard fixes&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/86&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#86&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/87&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#87&lt;/a&gt;): &lt;code&gt;__VA_ARGS__&lt;/code&gt; expands to every argument; &lt;code&gt;#line&lt;/code&gt; works; &lt;code&gt;atomic_cas&lt;/code&gt; with &lt;code&gt;&amp;quot;release&amp;quot;&lt;/code&gt; / &lt;code&gt;&amp;quot;acq_rel&amp;quot;&lt;/code&gt; is valid; including a libc header twice is a no-op; safeguard links libm on Linux; a file with many &lt;code&gt;BST&amp;lt;..., struct&amp;gt;&lt;/code&gt; inserts compiles in a fraction of a second instead of tens; warnings are printed again when a file comes from the incremental cache.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;breaking&quot; tabindex=&quot;-1&quot;&gt;Breaking changes &lt;a class=&quot;header-anchor&quot; href=&quot;#breaking&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every breaking change below is reported by the compiler at each affected line — a wrong argument count or type, an ownership error with a note at the declaration, or a missing header. Nothing changes behaviour silently except where the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt; says so.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;std&#39;s API takes slices, not &lt;code&gt;void*&lt;/code&gt; or pointer + length pairs&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/76&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#76&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/80&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#80&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/81&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#81&lt;/a&gt;). Buffers are &lt;code&gt;[]T&lt;/code&gt; / &lt;code&gt;[]const T&lt;/code&gt;, callback contexts are typed &lt;code&gt;?&amp;amp;T&lt;/code&gt; stored as &lt;code&gt;?&amp;amp;Erased&lt;/code&gt;, and no &lt;code&gt;void*&lt;/code&gt; is left anywhere in std. Allocators hand out &lt;code&gt;?&amp;amp;heap unsigned char&lt;/code&gt;; audio and MIDI callback contexts must be &lt;code&gt;Send + Sync&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compiler-enforced &lt;code&gt;Drop&lt;/code&gt;, &lt;code&gt;Send&lt;/code&gt; and &lt;code&gt;Sync&lt;/code&gt;&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/77&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#77&lt;/a&gt;). A value of a &lt;code&gt;Drop&lt;/code&gt; type must be dropped or moved exactly once on every path; &lt;code&gt;spawn&lt;/code&gt;, channels and thread pools accept only data that is safe to share or move.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Containers own their elements&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/83&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#83&lt;/a&gt;). &lt;code&gt;clear()&lt;/code&gt;, &lt;code&gt;drop()&lt;/code&gt; and overwriting a key drop the values; don&#39;t free them yourself first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;std headers are &lt;code&gt;&amp;lt;std/...&amp;gt;&lt;/code&gt; only&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/83&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#83&lt;/a&gt;). safeguard no longer puts &lt;code&gt;std/&lt;/code&gt; itself on the include path, so a bare &lt;code&gt;&amp;lt;math.h&amp;gt;&lt;/code&gt; is the C library&#39;s and &lt;code&gt;#include &amp;lt;io.h&amp;gt;&lt;/code&gt; must become &lt;code&gt;#include &amp;lt;std/io.h&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;migrating&quot; tabindex=&quot;-1&quot;&gt;Migrating &lt;a class=&quot;header-anchor&quot; href=&quot;#migrating&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Buffers:&lt;/strong&gt; pass slices — &lt;code&gt;f.read(buf[..])&lt;/code&gt;, &lt;code&gt;w.write(buf[0..n])&lt;/code&gt;, &lt;code&gt;sha256(bytes, digest[..])&lt;/code&gt;, &lt;code&gt;str_copy(dst[..], src)&lt;/code&gt;; &lt;code&gt;safe_memcpy&lt;/code&gt; now counts elements. See &lt;a href=&quot;/safec-docs/reference/types.html#slice-types&quot;&gt;Types: slices&lt;/a&gt;, &lt;a href=&quot;/safec-docs/reference/types.html#read-only-slices&quot;&gt;read-only&lt;/a&gt; and &lt;a href=&quot;/safec-docs/reference/types.html#optional-slices&quot;&gt;optional slices&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ownership:&lt;/strong&gt; add &lt;code&gt;defer v.drop();&lt;/code&gt; after creating a value of a &lt;code&gt;Drop&lt;/code&gt; type (or release it on every path), and move data into threads with &lt;code&gt;thread_spawn&lt;/code&gt; or share it through &lt;code&gt;Mutex&amp;lt;T&amp;gt;&lt;/code&gt;. See &lt;a href=&quot;/safec-docs/reference/ownership.html&quot;&gt;Ownership &amp;amp; Drop&lt;/a&gt; and &lt;a href=&quot;/safec-docs/reference/threads.html&quot;&gt;Thread Safety&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Containers:&lt;/strong&gt; drop the container alone — remove any &lt;code&gt;m.foreach(free_value)&lt;/code&gt; before &lt;code&gt;m.drop()&lt;/code&gt;. See &lt;a href=&quot;/safec-docs/stdlib/collections.html#ownership&quot;&gt;Collections: containers own their elements&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Includes:&lt;/strong&gt; replace &lt;code&gt;#include &amp;lt;io.h&amp;gt;&lt;/code&gt; / &lt;code&gt;&amp;quot;prelude.h&amp;quot;&lt;/code&gt; with &lt;code&gt;#include &amp;lt;std/io.h&amp;gt;&lt;/code&gt; / &lt;code&gt;&amp;lt;std/prelude.h&amp;gt;&lt;/code&gt;. See &lt;em&gt;Including std&lt;/em&gt; in &lt;a href=&quot;/safec-docs/advanced/safeguard.html#standard-library-linking&quot;&gt;Standard Library Modules&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom allocators and hashers:&lt;/strong&gt; switch &lt;code&gt;alloc&lt;/code&gt; / &lt;code&gt;dealloc&lt;/code&gt; to &lt;code&gt;?&amp;amp;heap unsigned char&lt;/code&gt;, and a user &lt;code&gt;Hasher&lt;/code&gt; to the slice signatures.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The full before/after table and two runnable examples are in &lt;a href=&quot;/safec-docs/blog/whats-coming-next.html#migration&quot;&gt;What&#39;s coming next: Migrating&lt;/a&gt;; the changelog&#39;s &lt;em&gt;Breaking changes&lt;/em&gt; section lists every changed signature, module by module.&lt;/p&gt;
&lt;h2 id=&quot;upgrading&quot; tabindex=&quot;-1&quot;&gt;Upgrading &lt;a class=&quot;header-anchor&quot; href=&quot;#upgrading&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Re-run the installer to upgrade an existing install in place (it installs the newest release, pre-releases included; pass the version to pin this one):&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/safec-org/SafeC/main/install.sh | bash -s -- --version=v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;language-powershell code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;powershell&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&amp;amp; ([scriptblock]::&lt;span class=&quot;tok-fn&quot;&gt;Create&lt;/span&gt;((irm https://raw.githubusercontent.com/safec-org/SafeC/main/install.ps1))) -Version v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Keep your std sections with &lt;code&gt;--std=...&lt;/code&gt; / &lt;code&gt;-Std ...&lt;/code&gt;, or add one later with &lt;code&gt;--std=+&amp;lt;section&amp;gt;&lt;/code&gt;; see &lt;a href=&quot;/safec-docs/install.html#options&quot;&gt;Install&lt;/a&gt; for every option. Then check what you have:&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;safec --version       &lt;span class=&quot;tok-com&quot;&gt;# safec 1.0.0-beta-7&lt;/span&gt;
safeguard --version   &lt;span class=&quot;tok-com&quot;&gt;# safeguard 1.0.0-beta-7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Rebuild your projects from clean (&lt;code&gt;safeguard clean &amp;amp;&amp;amp; safeguard build&lt;/code&gt;) so nothing compiled against the old std is linked in.&lt;/p&gt;
&lt;h2 id=&quot;known-issues&quot; tabindex=&quot;-1&quot;&gt;Known issues &lt;a class=&quot;header-anchor&quot; href=&quot;#known-issues&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is known in 1.0.0-beta-7:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GPU backends are compile-tested only.&lt;/strong&gt; The CUDA, ROCm, Metal, Vulkan and WebGPU paths in &lt;code&gt;std/ml&lt;/code&gt; and &lt;code&gt;std/gui&lt;/code&gt;&#39;s GPU presenters compile in CI on every platform, but this release has not been run on GPU hardware.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you hit something else, please &lt;a href=&quot;https://github.com/safec-org/SafeC/issues&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;open an issue&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;pull-requests&quot; tabindex=&quot;-1&quot;&gt;Pull requests &lt;a class=&quot;header-anchor&quot; href=&quot;#pull-requests&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;safeguard: library headers, Windows DLLs, C/C++/Objective-C packages and dependencies, app bundles (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/51&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#51&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler: &lt;code&gt;const &amp;amp;R T&lt;/code&gt; is a reference to const; dataflow analysis for heap/arena lifetimes (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/52&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#52&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler: expression temporaries die at the end of their full expression (lifetime analysis false positive) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/53&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#53&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml: Vulkan (SPIR-V) and WebGPU tensor devices (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/54&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#54&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;safeguard: link only the std modules a project uses, with their system libraries; OS-seeded rng; prebuilt std in releases; README (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/55&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#55&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std prebuilt in sections; std always optimized; releases for macOS 11 and glibc 2.25; llvm-nm on Linux CI (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std web: URL/query/forms, deflate+gzip, keep-alive server, router, static files, cookies, multipart, SSE, WS client, browser DOM APIs (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/57&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#57&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: dir/path, CommonMark+GFM markdown, YAML flow, wasm runtime allocator; scx fixes; lexer escape fix (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/58&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#58&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/audio: real-time audio + MIDI I/O (ALSA, JACK, Core Audio/MIDI, WASAPI/WinMM, WebAudio/Web MIDI, dummy) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/59&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#59&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/async: Rust-style futures/executors over goto state machines; goto scope checks in the compiler (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/61&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#61&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;README: restore the Async/Await row lost in #57&#39;s merge (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/62&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#62&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/gui: AA vector canvas + TrueType text, multi-window GuiApp, full widget toolkit (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix main&#39;s Windows CI: generic COMDATs after ABI lowering; full-size WSADATA (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/64&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#64&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/gui: Wayland, web (&lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;/WebGL/DOM) backends and GPU presenters (GL ES, Metal, D3D11) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/65&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#65&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;HTTPS/TLS: std/tls with OS backends (OpenSSL, SChannel, SecureTransport) and a SafeC TLS 1.3 fallback; https/wss in std/http (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/66&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#66&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;README: restore the GUI platforms sentence lost in #66&#39;s merge (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/67&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#67&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix main&#39;s macOS/Windows CI: std_modules check counts linkonce generic instances as linker-merged (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/68&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#68&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;safeguard doc (rustdoc-like, built with SafeC&#39;s web std) and safeguard publish (git + CI for GitHub/GitLab/Gitea/Forgejo) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/69&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#69&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;selfhost: scc, a SafeC compiler in SafeC emitting WebAssembly — bootstraps, powers the web playground (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/70&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#70&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler: promote bool/char/short to int in variadic calls (&lt;code&gt;printf(&amp;quot;%d&amp;quot;, !x)&lt;/code&gt; printed 254) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/71&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#71&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Close safety gaps: const-ref field writes, &lt;code&gt;-&amp;gt;&lt;/code&gt;/call-root escapes, container element references (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/72&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#72&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix method calls through by-reference call results; MemoryFlow false positive with StrMap in recursion (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/73&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#73&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler: check atomic_cas arguments against the pointee type (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/74&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#74&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix main CI on every platform (package.sh, glibc 2.43 headers, macOS/Windows doc and test fixes) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/75&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#75&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: no void* and no pointer + length pairs in the public API (slices and typed erasure) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/76&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#76&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Compiler-enforced Drop and thread safety (Send/Sync, spawn rules, Mutex guards) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/77&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#77&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler/examples/stdlib_complete.sc: port to the slice API (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/78&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#78&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix main&#39;s macOS/Windows CI: ABI-lowered functions keep their place; mutex test pinned to Linux (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/79&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#79&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/audio without void*: typed backends, slices, typed FFI; Send+Sync audio/MIDI callback contexts (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/80&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#80&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: no void* anywhere — typed memory layer, ML autograd/GPU, GUI, TLS, OS bindings; api_lint enforces it (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/81&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#81&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Parser: &lt;code&gt;Typedef** x&lt;/code&gt; local declarations; nested prefix operators (&lt;code&gt;**pp&lt;/code&gt;, &lt;code&gt;- -x&lt;/code&gt;) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/82&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#82&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix bugs found by the docs audit: containers drop their elements, Reactor::drop, WsConn::closed, &lt;code&gt;&amp;lt;math.h&amp;gt;&lt;/code&gt; in safeguard, playground time functions (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/83&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#83&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;selfhost: fail loudly when a string literal overflows g_tmp (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/84&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#84&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Release 1.0.0-beta-7 (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/85&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#85&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix 13 compiler and safeguard bugs: BST compile time, libc headers included twice, libm, &lt;code&gt;__VA_ARGS__&lt;/code&gt;, &lt;code&gt;#line&lt;/code&gt;, atomic_cas orderings, must_use on prototypes (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/86&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#86&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;safec: keep warnings on incremental-cache hits (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/87&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#87&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Release: smoke test accepts a versioned clang; #86 and #87 in the beta-7 changelog (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/88&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#88&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/releases/tag/v1.0.0-beta-7&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;The release on GitHub&lt;/a&gt; · &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;Changelog&lt;/a&gt;&lt;/p&gt;
</content>
</entry>
<entry>
<title>A new home for SafeC</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/new-website.html"/>
<id>https://safec-org.github.io/safec-docs/blog/new-website.html</id>
<published>2026-10-26T00:00:00Z</published>
<updated>2026-10-26T00:00:00Z</updated>
<author><name>The SafeC Team</name></author>
<category term="announcement"/>
<category term="website"/>
<summary>safec-org.github.io/safec-docs is now a proper language website — a landing page, a Learn hub, install instructions, a playground, this blog — and it is built entirely by a SafeC program.</summary>
<content type="html">&lt;p&gt;The SafeC documentation started life as a VitePress site: a sidebar of reference pages and not much else. It has grown into the website a language needs. Here is what&#39;s new — and what stayed exactly where it was.&lt;/p&gt;
&lt;h2 id=&quot;whats-new&quot; tabindex=&quot;-1&quot;&gt;What&#39;s new &lt;a class=&quot;header-anchor&quot; href=&quot;#whats-new&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A landing page&lt;/strong&gt; that says what SafeC is in one screen, with a runnable example, the bugs SafeC rejects at compile time side by side with the C that compiles them, and a tour of the standard library.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/safec-docs/learn/&quot;&gt;Learn&lt;/a&gt;&lt;/strong&gt; gathers the Book, the guide, the language reference, the standard library, examples and benchmarks in one hub.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/safec-docs/install.html&quot;&gt;Install&lt;/a&gt;&lt;/strong&gt; has per-platform instructions with copy buttons, the requirements (clang 21+) and every installer option.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/safec-docs/tools.html&quot;&gt;Tools&lt;/a&gt;&lt;/strong&gt; covers &lt;code&gt;safeguard&lt;/code&gt;, &lt;code&gt;sc-lsp&lt;/code&gt; with VS Code, Neovim and Emacs setups, and &lt;code&gt;safec&lt;/code&gt; itself.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/safec-docs/community.html&quot;&gt;Community&lt;/a&gt;&lt;/strong&gt; explains where development happens and how to report bugs and contribute.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/safec-docs/playground.html&quot;&gt;The Playground&lt;/a&gt;&lt;/strong&gt; edits SafeC in the browser with highlighting and line numbers, loads every runnable example from the Book, and shares programs as links. Every SafeC program on the site that the playground can build now has a &lt;em&gt;Run in Playground&lt;/em&gt; link.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;This blog&lt;/strong&gt;, with tags, an &lt;a href=&quot;/safec-docs/blog/feed.xml&quot;&gt;Atom feed&lt;/a&gt; and an &lt;a href=&quot;/safec-docs/blog/rss.xml&quot;&gt;RSS feed&lt;/a&gt;. Release notes are generated from SafeC&#39;s release history and its &lt;code&gt;CHANGELOG.md&lt;/code&gt; at build time, and the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt; shows what has been merged but not yet released.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A fresh design&lt;/strong&gt;: light and dark themes, a layout that works on phones, keyboard navigation and a search that covers the docs and the blog.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;unchanged&quot; tabindex=&quot;-1&quot;&gt;What didn&#39;t change &lt;a class=&quot;header-anchor&quot; href=&quot;#unchanged&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every existing URL still works — &lt;code&gt;/guide/introduction&lt;/code&gt;, &lt;code&gt;/reference/types&lt;/code&gt;, &lt;code&gt;/stdlib/http&lt;/code&gt; and all the rest are where they were, in English and in Korean. New short URLs like &lt;code&gt;/docs/&lt;/code&gt; and &lt;code&gt;/download&lt;/code&gt; are static redirect pages, since GitHub Pages has no server-side redirects.&lt;/p&gt;
&lt;h2 id=&quot;built-with-safec&quot; tabindex=&quot;-1&quot;&gt;Built with SafeC &lt;a class=&quot;header-anchor&quot; href=&quot;#built-with-safec&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The site is generated by a SafeC program in &lt;a href=&quot;https://github.com/safec-org/safec-docs/tree/main/site&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;site/&lt;/code&gt;&lt;/a&gt; of the docs repository, using only the standard library: &lt;code&gt;std/serial/markdown&lt;/code&gt; parses CommonMark with GitHub&#39;s extensions, &lt;code&gt;std/serial/yaml&lt;/code&gt; reads the configuration and frontmatter, scx templates (SafeC&#39;s JSX-style markup) lay out the pages, and the dev server is &lt;code&gt;std/http&lt;/code&gt;. The interactive parts — the theme switch, search, tabs, copy buttons and the playground&#39;s editor — are a SafeC module compiled to WebAssembly on &lt;code&gt;std/wasm&lt;/code&gt;&#39;s DOM bindings, with a few lines of JavaScript to load it. There is no JavaScript framework, and every page works without scripts.&lt;/p&gt;
&lt;h2 id=&quot;next&quot; tabindex=&quot;-1&quot;&gt;What&#39;s next &lt;a class=&quot;header-anchor&quot; href=&quot;#next&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The playground&#39;s &lt;em&gt;Run&lt;/em&gt; button was waiting on a self-hosted SafeC compiler built to WebAssembly. &lt;em&gt;Update:&lt;/em&gt; it has landed — &lt;em&gt;Run&lt;/em&gt; now compiles and runs programs in the browser with scc (&lt;a href=&quot;/safec-docs/blog/whats-coming-next.html#scc&quot;&gt;What&#39;s coming next&lt;/a&gt;). Versioned docs are planned too: the version selector in the docs sidebar lists the releases already.&lt;/p&gt;
&lt;p&gt;Found a broken link or a page that could be clearer? &lt;a href=&quot;https://github.com/safec-org/safec-docs/issues&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Open an issue&lt;/a&gt; or send a pull request — the &lt;a href=&quot;/safec-docs/community.html#docs&quot;&gt;Community&lt;/a&gt; page explains how.&lt;/p&gt;
</content>
</entry>
<entry>
<title>What&#39;s coming next: everything merged since 1.0.0-beta-6</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/whats-coming-next.html"/>
<id>https://safec-org.github.io/safec-docs/blog/whats-coming-next.html</id>
<published>2026-10-26T00:00:00Z</published>
<updated>2026-10-26T00:00:00Z</updated>
<author><name>The SafeC Team</name></author>
<category term="release"/>
<category term="std"/>
<category term="compiler"/>
<category term="safety"/>
<category term="breaking"/>
<category term="tools"/>
<summary>Shipped in 1.0.0-beta-7. The log of everything merged on SafeC&#39;s main branch after 1.0.0-beta-6 — the web stack, async, the GUI toolkit, audio and MIDI, HTTPS, safeguard doc and publish, the self-hosted compiler behind the online playground — and the two breaking changes: a std API without void* or pointer + length pairs, and compiler-enforced Drop and Send/Sync. With a migration guide.</summary>
<content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Shipped in 1.0.0-beta-7.&lt;/strong&gt; Everything below was released on 2026-10-27 as &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-7.html&quot;&gt;SafeC 1.0.0-beta-7&lt;/a&gt;, together with &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/82&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#82&lt;/a&gt;–&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/88&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#88&lt;/a&gt;. The release notes have the install and upgrade instructions, a short migration list and the known issues; this post stays as the record of the cycle.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;SafeC&#39;s &lt;code&gt;main&lt;/code&gt; branch had moved a long way since &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-6.html&quot;&gt;1.0.0-beta-6&lt;/a&gt;. This post was the running log of what the next release would contain: the pull requests merged since then, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt; through &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/81&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#81&lt;/a&gt;, grouped by area. Two of them are &lt;strong&gt;breaking changes&lt;/strong&gt; that the compiler reports at every affected call site; the &lt;a href=&quot;#migration&quot;&gt;migration guide&lt;/a&gt; at the end shows how to update code.&lt;/p&gt;
&lt;p&gt;SafeC&#39;s &lt;a href=&quot;https://github.com/safec-org/SafeC/blob/main/CHANGELOG.md&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;CHANGELOG.md&lt;/code&gt;&lt;/a&gt;, which this site renders as the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt;, records the later changes — &lt;code&gt;safeguard doc&lt;/code&gt; and &lt;code&gt;publish&lt;/code&gt;, scc, the slice API and the ownership checks — under &lt;em&gt;1.0.0-beta-7&lt;/em&gt; (they were under &lt;em&gt;Unreleased&lt;/em&gt; while this post was written), down to individual signatures. The first half of this cycle — the web stack, async, the GUI toolkit, audio and HTTPS — has a longer write-up in &lt;a href=&quot;/safec-docs/blog/this-release-cycle.html&quot;&gt;This cycle in SafeC&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;at-a-glance&quot; tabindex=&quot;-1&quot;&gt;At a glance &lt;a class=&quot;header-anchor&quot; href=&quot;#at-a-glance&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;What changed&lt;/th&gt;
&lt;th&gt;Pull requests&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#web&quot;&gt;Web stack&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;std/http&lt;/code&gt; server, router, WebSocket, SSE; URL and DEFLATE codecs; DOM interop for wasm&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/57&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#57&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#async&quot;&gt;Async&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust-style futures as &lt;code&gt;goto&lt;/code&gt; state machines, executors, async TCP&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/61&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#61&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#gui&quot;&gt;GUI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Vector canvas, widgets, multiple windows; X11, Wayland, Win32, Cocoa and the web; GPU presenters&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/65&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#65&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#audio&quot;&gt;Audio &amp;amp; MIDI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;One callback API over ALSA, JACK, Core Audio, WASAPI, Web Audio&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/59&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#59&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#https&quot;&gt;HTTPS&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;std/tls&lt;/code&gt;: the OS&#39;s TLS, with a SafeC TLS 1.3 fallback&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/66&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#66&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#safeguard-doc&quot;&gt;safeguard doc &amp;amp; publish&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;rustdoc-style API reference; library publishing with CI&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/69&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#69&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#scc&quot;&gt;scc &amp;amp; the playground&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A SafeC compiler written in SafeC, compiling to WebAssembly&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/70&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#70&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#slices&quot;&gt;Slices, not &lt;code&gt;void*&lt;/code&gt;&lt;/a&gt; — &lt;strong&gt;breaking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;std&#39;s public API takes slices and typed erasure; no &lt;code&gt;void*&lt;/code&gt; left anywhere in std&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/76&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#76&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/80&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#80&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/81&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#81&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#ownership&quot;&gt;Drop, Send and Sync&lt;/a&gt; — &lt;strong&gt;breaking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Compiler-checked ownership and thread safety&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/77&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#77&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#fixes&quot;&gt;Fixes&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Codegen, safety-check gaps, Windows and macOS CI&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/64&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#64&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/68&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#68&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/71&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#71&lt;/a&gt;–&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/75&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#75&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/78&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#78&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/79&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#79&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/82&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#82&lt;/a&gt;, &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/83&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#83&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Releases also now ship std prebuilt per platform, one archive per section (&lt;code&gt;core&lt;/code&gt;, &lt;code&gt;collections&lt;/code&gt;, &lt;code&gt;gui&lt;/code&gt;, …), selected with &lt;code&gt;install.sh --std=...&lt;/code&gt; / &lt;code&gt;install.ps1 -Std ...&lt;/code&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt;), and this website is now &lt;a href=&quot;/safec-docs/blog/new-website.html&quot;&gt;built by a SafeC program&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/58&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#58&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;web&quot; tabindex=&quot;-1&quot;&gt;A web stack &lt;a class=&quot;header-anchor&quot; href=&quot;#web&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/http.html&quot;&gt;&lt;code&gt;std/http&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/57&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#57&lt;/a&gt;) is now a stack for real services: structured headers, a keep-alive &lt;code&gt;HttpServer&lt;/code&gt; with chunked transfer coding, a &lt;code&gt;Router&lt;/code&gt; with middleware and route patterns, static files, cookies, multipart forms, server-sent events and WebSocket upgrades, and a URL client that follows redirects and decodes gzip. It brought &lt;a href=&quot;/safec-docs/stdlib/encoding.html&quot;&gt;&lt;code&gt;std/encoding&lt;/code&gt;&lt;/a&gt;&#39;s URL (RFC 3986) and DEFLATE / zlib / gzip codecs. On the browser side, &lt;a href=&quot;/safec-docs/stdlib/wasm.html&quot;&gt;&lt;code&gt;std/wasm&lt;/code&gt;&lt;/a&gt; gained DOM and browser-API interop — events, timers, fetch, storage, history — with its JavaScript glue shipped in std. &lt;code&gt;examples/fullstack_demo&lt;/code&gt; puts a Router server and a SafeC-to-wasm client together.&lt;/p&gt;
&lt;h2 id=&quot;async&quot; tabindex=&quot;-1&quot;&gt;Async: futures as &lt;code&gt;goto&lt;/code&gt; state machines &lt;a class=&quot;header-anchor&quot; href=&quot;#async&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/async.html&quot;&gt;&lt;code&gt;std/async&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/61&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#61&lt;/a&gt;) brings Rust&#39;s &lt;code&gt;Future&lt;/code&gt; / &lt;code&gt;Poll&lt;/code&gt; / &lt;code&gt;Waker&lt;/code&gt; / &lt;code&gt;Context&lt;/code&gt; model to SafeC as a library, with no language coroutines: the &lt;code&gt;ASYNC_BEGIN&lt;/code&gt; / &lt;code&gt;AWAIT&lt;/code&gt; / &lt;code&gt;ASYNC_RETURN&lt;/code&gt; macros turn a struct with a &lt;code&gt;poll&lt;/code&gt; method into a resumable state machine over &lt;code&gt;goto&lt;/code&gt;, keeping every local that lives across an await in the struct. On top come timers, &lt;code&gt;join&lt;/code&gt; / &lt;code&gt;select&lt;/code&gt; / timeout combinators, channels, &lt;code&gt;Mutex&lt;/code&gt;, &lt;code&gt;Semaphore&lt;/code&gt;, &lt;code&gt;Notify&lt;/code&gt;, cancellation, a no-heap &lt;code&gt;LocalExecutor&lt;/code&gt; that also runs on bare metal and wasm32, a multi-threaded &lt;code&gt;ThreadPool&lt;/code&gt;, and an &lt;code&gt;IoDriver&lt;/code&gt; + &lt;code&gt;Runtime&lt;/code&gt; with async TCP on the epoll, kqueue and WSAPoll reactor.&lt;/p&gt;
&lt;h2 id=&quot;gui&quot; tabindex=&quot;-1&quot;&gt;A GUI toolkit &lt;a class=&quot;header-anchor&quot; href=&quot;#gui&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/gui.html&quot;&gt;&lt;code&gt;std/gui&lt;/code&gt;&lt;/a&gt; became a toolkit in &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt;: an anti-aliased &lt;a href=&quot;/safec-docs/stdlib/gui-graphics.html&quot;&gt;vector canvas&lt;/a&gt; with TrueType text, a retained &lt;a href=&quot;/safec-docs/stdlib/gui-widgets.html&quot;&gt;widget toolkit&lt;/a&gt; with layout and theming, and &lt;code&gt;GuiApp&lt;/code&gt; for multi-window applications, all on a &lt;code&gt;GuiBackend&lt;/code&gt; interface over the X11, Win32 and Cocoa window layers. &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/65&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#65&lt;/a&gt; added &lt;a href=&quot;/safec-docs/stdlib/gui-platforms.html&quot;&gt;more platforms&lt;/a&gt;: Wayland (chosen at run time on Linux), a WebAssembly backend that draws into a &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; or through WebGL with DOM interop and IME text input, and GPU presenters over OpenGL ES (EGL), Metal and Direct3D 11. &lt;code&gt;safeguard bundle --target wasm32&lt;/code&gt; packages a GUI app as a web page.&lt;/p&gt;
&lt;h2 id=&quot;audio&quot; tabindex=&quot;-1&quot;&gt;Audio and MIDI &lt;a class=&quot;header-anchor&quot; href=&quot;#audio&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/audio.html&quot;&gt;&lt;code&gt;std/audio&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/59&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#59&lt;/a&gt;) is one callback-based API for audio streams and MIDI ports, with format conversion. Audio runs on ALSA, JACK, Core Audio, WASAPI, Web Audio and a dummy device for tests; MIDI on the ALSA sequencer, JACK, Core MIDI, WinMM and Web MIDI.&lt;/p&gt;
&lt;h2 id=&quot;https&quot; tabindex=&quot;-1&quot;&gt;HTTPS &lt;a class=&quot;header-anchor&quot; href=&quot;#https&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/tls.html&quot;&gt;&lt;code&gt;std/tls&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/66&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#66&lt;/a&gt;) uses the operating system&#39;s TLS where there is one — OpenSSL (loaded at run time), SChannel, SecureTransport — and falls back to a TLS 1.3 client and server written in SafeC, with X.509 path validation against the system&#39;s trust roots. &lt;a href=&quot;/safec-docs/stdlib/crypto.html&quot;&gt;&lt;code&gt;std/crypto&lt;/code&gt;&lt;/a&gt; grew X25519, P-256 / P-384 ECDH and ECDSA, RSA (PKCS#1 v1.5 and PSS), HKDF and ChaCha20 for it. &lt;code&gt;http_fetch&lt;/code&gt; and friends speak &lt;code&gt;https://&lt;/code&gt;, &lt;code&gt;WsConn&lt;/code&gt; speaks &lt;code&gt;wss://&lt;/code&gt;, and &lt;code&gt;HttpServer&lt;/code&gt; serves HTTPS with a &lt;code&gt;TlsServerConfig&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;safeguard-doc&quot; tabindex=&quot;-1&quot;&gt;&lt;code&gt;safeguard doc&lt;/code&gt; and &lt;code&gt;safeguard publish&lt;/code&gt; &lt;a class=&quot;header-anchor&quot; href=&quot;#safeguard-doc&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/advanced/safeguard.html#safeguard-doc&quot;&gt;&lt;code&gt;safeguard doc&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/69&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#69&lt;/a&gt;) generates a package&#39;s API reference, like rustdoc: a page per item with highlighted declarations, Markdown &lt;a href=&quot;/safec-docs/advanced/doc-comments.html&quot;&gt;doc comments&lt;/a&gt; with intra-doc links (&lt;code&gt;[Vec::push]&lt;/code&gt;) and examples, a module per header, source pages, client-side search (SafeC compiled to wasm32), light and dark themes, and a link check of the result. &lt;code&gt;--serve&lt;/code&gt; serves it, &lt;code&gt;--std&lt;/code&gt; documents std itself — that is how this site&#39;s &lt;a href=&quot;/safec-docs/api/&quot;&gt;std API reference&lt;/a&gt; is built. Underneath is the new &lt;code&gt;safec --emit-doc-json&lt;/code&gt;, which dumps the declarations and their doc comments as JSON from the real front end.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/advanced/safeguard.html#safeguard-publish&quot;&gt;&lt;code&gt;safeguard publish&lt;/code&gt;&lt;/a&gt; prepares a library&#39;s git repository for publishing: README / LICENSE / metadata checks, &lt;code&gt;--bump&lt;/code&gt; for semver, and generated CI (GitHub Actions by default; GitLab CI, Gitea or Forgejo with &lt;code&gt;--ci=&lt;/code&gt;) that tests on Linux, macOS and Windows and, on a tag, attaches prebuilt static and shared libraries to a release and deploys the docs to Pages. It is a dry run unless you pass &lt;code&gt;--write&lt;/code&gt;. &lt;code&gt;Package.toml&lt;/code&gt; gained &lt;code&gt;repository&lt;/code&gt;, &lt;code&gt;homepage&lt;/code&gt;, &lt;code&gt;documentation&lt;/code&gt;, &lt;code&gt;readme&lt;/code&gt;, &lt;code&gt;keywords&lt;/code&gt; and a &lt;code&gt;[publish]&lt;/code&gt; table, and &lt;code&gt;safeguard build --crate-type staticlib|cdylib|bin&lt;/code&gt; overrides &lt;code&gt;[build] crate_type&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;scc&quot; tabindex=&quot;-1&quot;&gt;scc and the online playground &lt;a class=&quot;header-anchor&quot; href=&quot;#scc&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;scc&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/70&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#70&lt;/a&gt;) is a SafeC compiler written in SafeC, in SafeC&#39;s new &lt;a href=&quot;https://github.com/safec-org/SafeC/tree/main/selfhost&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;selfhost/&lt;/code&gt;&lt;/a&gt; directory. It compiles SafeC straight to a WebAssembly binary with no LLVM and no linker, through its own lexer, preprocessor, parser, semantic analysis (with safec&#39;s safety checks and diagnostics) and wasm backend. It builds with the C++ &lt;code&gt;safec&lt;/code&gt;, natively and as WebAssembly, and it compiles itself: &lt;code&gt;selfhost/bootstrap.sh&lt;/code&gt; checks that the self-compiled compiler reproduces itself byte for byte. A differential test harness compiles the Book, the reference programs and a corpus with both compilers and compares the results, in a new &lt;code&gt;selfhost&lt;/code&gt; CI job — it is what found the variadic promotion bug &lt;a href=&quot;#fixes&quot;&gt;below&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;scc is what powers this site&#39;s &lt;a href=&quot;/safec-docs/playground.html&quot;&gt;Playground&lt;/a&gt;: its &lt;em&gt;Run&lt;/em&gt; button now compiles and runs your program entirely in the browser, in a Web Worker with time and memory limits. scc accepts the subset of the language listed in &lt;code&gt;selfhost/SUBSET.md&lt;/code&gt; and does not run the ownership and thread-safety checks; for those and the full std, build locally.&lt;/p&gt;
&lt;h2 id=&quot;slices&quot; tabindex=&quot;-1&quot;&gt;Breaking: std&#39;s API without &lt;code&gt;void*&lt;/code&gt; or pointer + length pairs &lt;a class=&quot;header-anchor&quot; href=&quot;#slices&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/76&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#76&lt;/a&gt; removed every &lt;code&gt;void*&lt;/code&gt;, raw &lt;code&gt;T*&lt;/code&gt; buffer and &lt;code&gt;(pointer, length)&lt;/code&gt; pair from std&#39;s public declarations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Buffers are &lt;a href=&quot;/safec-docs/reference/types.html#slice-types&quot;&gt;slices&lt;/a&gt;.&lt;/strong&gt; &lt;code&gt;[]T&lt;/code&gt; is a buffer the function writes, &lt;code&gt;[]const T&lt;/code&gt; one it only reads. A slice carries its length and indexing it is bounds-checked; a fixed-size argument (a key, a nonce, a digest) is checked on entry and panics if it is too short, instead of being read or written past. &lt;code&gt;std::str_bytes(&amp;quot;text&amp;quot;)&lt;/code&gt; gives a string&#39;s bytes as a &lt;code&gt;[]const char&lt;/code&gt;, accepted wherever &lt;code&gt;[]const unsigned char&lt;/code&gt; is expected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Type erasure is typed.&lt;/strong&gt; Where std stores callbacks with different context types side by side — executors, wakers, timers, widgets, the VFS, audio and MIDI callbacks, HTTP handlers, DOM listeners, thread entry points — the slot is a &lt;code&gt;?&amp;amp;Erased&lt;/code&gt; (&lt;code&gt;std/erased.h&lt;/code&gt;) filled only by generic methods that take a matching &lt;code&gt;fn(?&amp;amp;T)&lt;/code&gt; / &lt;code&gt;?&amp;amp;T&lt;/code&gt;. Opaque handles are typed structs too.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The language grew to match:&lt;/strong&gt; &lt;a href=&quot;/safec-docs/reference/types.html#read-only-slices&quot;&gt;read-only slices&lt;/a&gt; &lt;code&gt;[]const T&lt;/code&gt;, &lt;a href=&quot;/safec-docs/reference/types.html#optional-slices&quot;&gt;optional slices&lt;/a&gt; &lt;code&gt;?[]T&lt;/code&gt; and nullable function references &lt;code&gt;?fn R(Args)&lt;/code&gt;, slice-returning functions and slice fields, range-checked re-slicing (&lt;code&gt;a[i..j]&lt;/code&gt; traps when &lt;code&gt;i &amp;gt; j&lt;/code&gt; or &lt;code&gt;j &amp;gt; len&lt;/code&gt; outside &lt;code&gt;unsafe&lt;/code&gt;), and byte slices that interconvert across &lt;code&gt;char&lt;/code&gt;, &lt;code&gt;signed char&lt;/code&gt; and &lt;code&gt;unsigned char&lt;/code&gt;. Casting a slice to a pointer is now an error: use &lt;code&gt;s.ptr&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;New in std: &lt;code&gt;Erased&lt;/code&gt;, &lt;code&gt;S24&lt;/code&gt; (a packed 24-bit audio sample, so 24-bit buffers are &lt;code&gt;[]S24&lt;/code&gt;), &lt;code&gt;struct TimeFields&lt;/code&gt;, &lt;code&gt;Vec::from_slice&lt;/code&gt; / &lt;code&gt;as_slice&lt;/code&gt;, &lt;code&gt;String::from_bytes&lt;/code&gt; / &lt;code&gt;push_bytes&lt;/code&gt; / &lt;code&gt;as_bytes&lt;/code&gt;, and &lt;code&gt;over([]T)&lt;/code&gt; constructors for &lt;code&gt;StaticVec&lt;/code&gt;, &lt;code&gt;StaticMap&lt;/code&gt;, &lt;code&gt;RingBuffer&lt;/code&gt;, &lt;code&gt;LFQueue&lt;/code&gt; and the allocators.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/80&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#80&lt;/a&gt; and &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/81&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#81&lt;/a&gt; finished the job inside std: the audio, GUI, ML, TLS and OS backends bind their C, Objective-C, CUDA, HIP, Metal, Vulkan and WebGPU APIs through typed handles and byte pointers, audio and MIDI callback contexts must be &lt;code&gt;Send + Sync&lt;/code&gt;, allocators hand out &lt;code&gt;?&amp;amp;heap unsigned char&lt;/code&gt;, and &lt;code&gt;malloc_defer&lt;/code&gt; takes its type from the declaration. No &lt;code&gt;void*&lt;/code&gt; is left anywhere in std, and a lint in SafeC&#39;s test suite fails the build if one reappears, or if a raw pointer reappears in a public std declaration.&lt;/p&gt;
&lt;h2 id=&quot;ownership&quot; tabindex=&quot;-1&quot;&gt;Breaking: compiler-enforced Drop, Send and Sync &lt;a class=&quot;header-anchor&quot; href=&quot;#ownership&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/77&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#77&lt;/a&gt; makes resource ownership and thread safety compile-time checks. See &lt;a href=&quot;/safec-docs/reference/ownership.html&quot;&gt;Ownership &amp;amp; Drop&lt;/a&gt; and &lt;a href=&quot;/safec-docs/reference/threads.html&quot;&gt;Thread Safety&lt;/a&gt; for the full rules.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Drop&lt;/code&gt;.&lt;/strong&gt; A type with a &lt;code&gt;void drop()&lt;/code&gt; method, or one holding such a value, must be dropped or moved exactly once on every path — &lt;code&gt;return&lt;/code&gt;, &lt;code&gt;break&lt;/code&gt;, &lt;code&gt;continue&lt;/code&gt;, &lt;code&gt;goto&lt;/code&gt;, &lt;code&gt;match&lt;/code&gt;, &lt;code&gt;defer&lt;/code&gt;, loops. Leaks, use after drop or move, double drops, overwriting a live value, and moving out of borrowed memory are compile errors. The check is per generic instantiation and inserts nothing into the generated code.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;consume&lt;/code&gt; methods (&lt;code&gt;int close() consume;&lt;/code&gt;) destroy their receiver like &lt;code&gt;drop()&lt;/code&gt;; &lt;code&gt;drop(x)&lt;/code&gt; is drop glue for any type; &lt;code&gt;std::replace&lt;/code&gt; and &lt;code&gt;std::swap&lt;/code&gt; live in &lt;code&gt;std/ownership.h&lt;/code&gt;; &lt;code&gt;forget(x)&lt;/code&gt; is allowed only in &lt;code&gt;unsafe&lt;/code&gt;. A reference a method returns into its receiver (&lt;code&gt;Vec::at()&lt;/code&gt;, &lt;code&gt;MutexGuard::get()&lt;/code&gt;) borrows from it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Send&lt;/code&gt; / &lt;code&gt;Sync&lt;/code&gt;&lt;/strong&gt; are derived from each type&#39;s structure, overridable with &lt;code&gt;unsafe impl Send;&lt;/code&gt; / &lt;code&gt;impl !Send;&lt;/code&gt;, and usable as generic bounds. &lt;code&gt;spawn&lt;/code&gt; takes only Sync static data, &lt;code&gt;spawn_scoped&lt;/code&gt; lends a local until it is joined, and &lt;code&gt;chan_send&lt;/code&gt; moves a Send value.&lt;/li&gt;
&lt;li&gt;New in &lt;code&gt;std/thread.h&lt;/code&gt;: &lt;code&gt;thread_spawn&lt;/code&gt; / &lt;code&gt;SpawnedThread&amp;lt;T, R&amp;gt;&lt;/code&gt; (moves its argument into the thread; &lt;code&gt;join()&lt;/code&gt; returns the result), &lt;code&gt;Mutex&amp;lt;T&amp;gt;&lt;/code&gt; / &lt;code&gt;MutexGuard&amp;lt;T&amp;gt;&lt;/code&gt; (the value is reachable only through the guard, which unlocks in &lt;code&gt;drop()&lt;/code&gt;) and &lt;code&gt;RwLock&amp;lt;T&amp;gt;&lt;/code&gt;; &lt;code&gt;std/atomic.h&lt;/code&gt; has &lt;code&gt;AtomicInt&lt;/code&gt; and &lt;code&gt;AtomicLong&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;std&#39;s owning types — collections, &lt;code&gt;File&lt;/code&gt;, sockets, TLS, HTTP, threads, sync primitives, GUI, audio, async, ML containers — implement &lt;code&gt;Drop&lt;/code&gt;; &lt;code&gt;free()&lt;/code&gt; / &lt;code&gt;close()&lt;/code&gt; / &lt;code&gt;destroy()&lt;/code&gt; stay as &lt;code&gt;consume&lt;/code&gt; aliases. &lt;code&gt;ThreadPool::spawn&lt;/code&gt;, &lt;code&gt;Chan&amp;lt;T&amp;gt;&lt;/code&gt;, &lt;code&gt;AsyncChannel&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;Oneshot&amp;lt;T&amp;gt;&lt;/code&gt; require Send values, GUI windows are &lt;code&gt;!Send&lt;/code&gt;, and dropping an unfinished &lt;code&gt;AsyncTask&lt;/code&gt; panics instead of leaving its executor polling freed memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Turning the checks on across std found real bugs, now fixed: leaks, double frees and use-after-frees in TLS error paths, the GUI SVG renderer, widget and PNG loaders, static-file and router helpers, &lt;code&gt;Audio::open&lt;/code&gt;, LLM and LoRA paths in &lt;code&gt;std/ml&lt;/code&gt;, and safec-doc&#39;s link checker.&lt;/p&gt;
&lt;h2 id=&quot;fixes&quot; tabindex=&quot;-1&quot;&gt;Notable fixes &lt;a class=&quot;header-anchor&quot; href=&quot;#fixes&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Variadic calls&lt;/strong&gt; promote &lt;code&gt;bool&lt;/code&gt;, &lt;code&gt;char&lt;/code&gt; and &lt;code&gt;short&lt;/code&gt; to &lt;code&gt;int&lt;/code&gt;, as C requires: &lt;code&gt;printf(&amp;quot;%d&amp;quot;, !x)&lt;/code&gt; used to print 254 (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/71&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#71&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety-check gaps closed&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/72&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#72&lt;/a&gt;): writing a field through a &lt;code&gt;const &amp;amp;T&lt;/code&gt; is rejected; the &lt;code&gt;&amp;amp;stack&lt;/code&gt; / &lt;code&gt;&amp;amp;arena&lt;/code&gt; escape check follows &lt;code&gt;-&amp;gt;&lt;/code&gt;; an element reference from &lt;code&gt;Vec::at&lt;/code&gt;, &lt;code&gt;HashMap&lt;/code&gt; or &lt;code&gt;StrMap&lt;/code&gt; held across a &lt;code&gt;push&lt;/code&gt; or a rehashing insert is reported. Mutation through a reference-returning call chain (&lt;code&gt;v.at(i).field.push(x)&lt;/code&gt;) now reaches the real field instead of a temporary copy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Method calls&lt;/strong&gt; on a field of a by-reference call result act on the referent, and a false positive with &lt;code&gt;StrMap&lt;/code&gt; in recursive functions is gone (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/73&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#73&lt;/a&gt;); &lt;code&gt;atomic_cas&lt;/code&gt; arguments are checked against the pointee type (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/74&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#74&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C header import&lt;/strong&gt; skips 128-bit float and &lt;code&gt;_Complex&lt;/code&gt; declarations, so newer glibc headers import; &lt;code&gt;safeguard test&lt;/code&gt; runs the test&#39;s &lt;code&gt;.exe&lt;/code&gt; on Windows (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/75&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#75&lt;/a&gt;). In a library package, &lt;code&gt;safeguard test&lt;/code&gt; links the library into each test.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows and macOS:&lt;/strong&gt; a generic function keeps its COMDAT through ABI lowering, &lt;code&gt;std/sched&lt;/code&gt; passes &lt;code&gt;WSAStartup&lt;/code&gt; a correctly sized &lt;code&gt;WSADATA&lt;/code&gt;, the WSAPoll reactor no longer reads its watch list after dispatch (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/64&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#64&lt;/a&gt;); ABI-lowered functions keep their place in the module (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/79&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#79&lt;/a&gt;); the std module check accepts generic instances repeated across sections on Mach-O and COFF (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/68&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#68&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parser:&lt;/strong&gt; a local declared with a typedef name and two or more &lt;code&gt;*&lt;/code&gt; (&lt;code&gt;Foo_t** x = pp;&lt;/code&gt;) is a declaration, and prefix operators nest (&lt;code&gt;**pp&lt;/code&gt;, &lt;code&gt;-*p&lt;/code&gt;, &lt;code&gt;- -x&lt;/code&gt;), in safec and scc alike (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/82&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#82&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Found by the website audit&lt;/strong&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/83&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#83&lt;/a&gt;): every container now drops its elements on &lt;code&gt;clear()&lt;/code&gt; / &lt;code&gt;drop()&lt;/code&gt; and when a key is overwritten, as &lt;code&gt;Vec&lt;/code&gt; does (&lt;code&gt;BTree&lt;/code&gt;, &lt;code&gt;StaticVec&lt;/code&gt; and &lt;code&gt;StaticMap&lt;/code&gt;, which have no &lt;code&gt;drop()&lt;/code&gt;, are &lt;code&gt;clear()&lt;/code&gt;ed) — see &lt;a href=&quot;/safec-docs/stdlib/collections.html#ownership&quot;&gt;Collections&lt;/a&gt;; &lt;code&gt;Reactor&lt;/code&gt; has a &lt;code&gt;drop()&lt;/code&gt;, and &lt;code&gt;close_()&lt;/code&gt; frees its tables and is idempotent; &lt;code&gt;WsConn::closed()&lt;/code&gt; is the value to &lt;code&gt;accept()&lt;/code&gt; into, and a closed connection never touches fd 0; safeguard reaches std only as &lt;code&gt;&amp;lt;std/...&amp;gt;&lt;/code&gt;, so a bare &lt;code&gt;#include &amp;lt;math.h&amp;gt;&lt;/code&gt; is the C library&#39;s (&lt;strong&gt;breaking&lt;/strong&gt; for &lt;code&gt;#include &amp;lt;io.h&amp;gt;&lt;/code&gt;: write &lt;code&gt;&amp;lt;std/io.h&amp;gt;&lt;/code&gt;); and &lt;code&gt;std/time&lt;/code&gt; works in the &lt;a href=&quot;/safec-docs/playground.html&quot;&gt;playground&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;migration&quot; tabindex=&quot;-1&quot;&gt;Migrating &lt;a class=&quot;header-anchor&quot; href=&quot;#migration&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Both breaking changes fail loudly: every affected call is a compile error (a wrong argument count or type, or an ownership error with a note at the declaration), and nothing changes behaviour silently except where the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt; says so. The common edits:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;f.read(buf, n)&lt;/code&gt;, &lt;code&gt;w.write(buf, n)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;f.read(buf[..])&lt;/code&gt;, &lt;code&gt;w.write(buf[0..n])&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sha256(data, len, digest)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;sha256(bytes, digest[..])&lt;/code&gt; with &lt;code&gt;bytes&lt;/code&gt; a slice, e.g. &lt;code&gt;buf[0..len]&lt;/code&gt; or &lt;code&gt;std::str_bytes(s)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;str_copy(dst, src, size)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;str_copy(dst[..], src)&lt;/code&gt; — returns 1 if it fit, 0 if truncated, always NUL-terminates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;safe_memcpy(dst, src, bytes)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;safe_memcpy(dst[..], src[..])&lt;/code&gt; — counts &lt;strong&gt;elements&lt;/strong&gt;, copies &lt;code&gt;min&lt;/code&gt; of the two lengths&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;time_gmtime(t, fields)&lt;/code&gt; (9-int array)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;struct TimeFields tm = time_gmtime(t);&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Vec::from_arr(p, n)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Vec::from_slice(a[..])&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;String::from_n(p, n)&lt;/code&gt; / &lt;code&gt;push_n&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;String::from_bytes(s)&lt;/code&gt; / &lt;code&gt;push_bytes(s)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sys_bsearch(...)&lt;/code&gt; returning &lt;code&gt;?&amp;amp;T&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;returns the index as &lt;code&gt;?unsigned long&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;void*&lt;/code&gt; callback context&lt;/td&gt;
&lt;td&gt;a typed &lt;code&gt;?&amp;amp;T&lt;/code&gt;, stored as &lt;code&gt;?&amp;amp;Erased&lt;/code&gt; by std&#39;s generic methods&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a custom allocator&#39;s &lt;code&gt;?&amp;amp;heap void alloc(size, align)&lt;/code&gt; / &lt;code&gt;dealloc(?&amp;amp;heap void)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;?&amp;amp;heap unsigned char&lt;/code&gt; in both (std&#39;s allocators and &lt;code&gt;heap_alloc&lt;/code&gt; hand out bytes; &lt;code&gt;alloc_t&lt;/code&gt; / &lt;code&gt;dealloc_t&lt;/code&gt; are unchanged)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;(T*)slice&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;slice.ptr&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;a value with &lt;code&gt;free()&lt;/code&gt; / &lt;code&gt;close()&lt;/code&gt; that is never released on some path&lt;/td&gt;
&lt;td&gt;&lt;code&gt;defer v.drop();&lt;/code&gt; right after creating it, or release it on every path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thread_create(&amp;amp;tid, work, ctx)&lt;/code&gt; sharing a pointer&lt;/td&gt;
&lt;td&gt;&lt;code&gt;thread_spawn(fn, value)&lt;/code&gt; moving the data in, or &lt;code&gt;Mutex&amp;lt;T&amp;gt;&lt;/code&gt; / &lt;code&gt;spawn_scoped&lt;/code&gt; for shared data&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A typical ownership error, and its fix:&lt;/p&gt;
&lt;div class=&quot;language-c code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;c&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;sum_positive&lt;/span&gt;([]&lt;span class=&quot;tok-kw&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; xs) {
    &lt;span class=&quot;tok-kw&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;&amp;lt;&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;&amp;gt; v = std::&lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;::&lt;span class=&quot;tok-kw&quot;&gt;new&lt;/span&gt;();
    &lt;span class=&quot;tok-kw&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;tok-ty&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt; i = &lt;span class=&quot;tok-num&quot;&gt;0UL&lt;/span&gt;; i &amp;lt; xs.len; i = i + &lt;span class=&quot;tok-num&quot;&gt;1UL&lt;/span&gt;) {
        &lt;span class=&quot;tok-kw&quot;&gt;if&lt;/span&gt; (xs[i] &amp;lt; &lt;span class=&quot;tok-num&quot;&gt;0&lt;/span&gt;) { &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; -&lt;span class=&quot;tok-num&quot;&gt;1&lt;/span&gt;; }   &lt;span class=&quot;tok-com&quot;&gt;// error: value of Drop type &#39;Vec&amp;lt;int&amp;gt;&#39; leaks when the&lt;/span&gt;
        v.&lt;span class=&quot;tok-fn&quot;&gt;push&lt;/span&gt;(xs[i]);                  &lt;span class=&quot;tok-com&quot;&gt;//   function returns: &#39;v&#39; is never dropped;&lt;/span&gt;
    }                                   &lt;span class=&quot;tok-com&quot;&gt;//   call v.drop() or add &#39;defer v.drop()&#39;&lt;/span&gt;
    &lt;span class=&quot;tok-com&quot;&gt;// ...&lt;/span&gt;
    v.&lt;span class=&quot;tok-fn&quot;&gt;drop&lt;/span&gt;();
    &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;tok-num&quot;&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Adding &lt;code&gt;defer v.drop();&lt;/code&gt; after the declaration (and removing the final &lt;code&gt;v.drop()&lt;/code&gt;) releases &lt;code&gt;v&lt;/code&gt; on every path.&lt;/p&gt;
&lt;p&gt;The slice forms, in a program the &lt;a href=&quot;/safec-docs/playground.html&quot;&gt;Playground&lt;/a&gt; can run — a read-only slice parameter, a bounded &lt;code&gt;str_copy&lt;/code&gt; and an element-wise &lt;code&gt;safe_memcpy&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;language-c code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;c&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/str.h&amp;gt;
&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/mem.h&amp;gt;
&lt;span class=&quot;tok-kw&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;printf&lt;/span&gt;(&lt;span class=&quot;tok-kw&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;char&lt;/span&gt;* fmt, ...);

&lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;sum&lt;/span&gt;([]&lt;span class=&quot;tok-kw&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; xs) {           &lt;span class=&quot;tok-com&quot;&gt;// a read-only slice: the length comes with it&lt;/span&gt;
    &lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt; s = &lt;span class=&quot;tok-num&quot;&gt;0L&lt;/span&gt;;
    &lt;span class=&quot;tok-kw&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;tok-ty&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt; i = &lt;span class=&quot;tok-num&quot;&gt;0UL&lt;/span&gt;; i &amp;lt; xs.len; i = i + &lt;span class=&quot;tok-num&quot;&gt;1UL&lt;/span&gt;) { s = s + (&lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt;)xs[i]; }
    &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; s;
}

&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;main&lt;/span&gt;() {
    &lt;span class=&quot;tok-ty&quot;&gt;char&lt;/span&gt; name[&lt;span class=&quot;tok-num&quot;&gt;8&lt;/span&gt;];
    &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; fit = std::&lt;span class=&quot;tok-fn&quot;&gt;str_copy&lt;/span&gt;(name[..], &lt;span class=&quot;tok-str&quot;&gt;&quot;truncated!&quot;&lt;/span&gt;);   &lt;span class=&quot;tok-com&quot;&gt;// bounded by the slice&lt;/span&gt;
    &lt;span class=&quot;tok-fn&quot;&gt;printf&lt;/span&gt;(&lt;span class=&quot;tok-str&quot;&gt;&quot;fit=%d name=%s\n&quot;&lt;/span&gt;, fit, name);

    &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; src[&lt;span class=&quot;tok-num&quot;&gt;4&lt;/span&gt;] = {&lt;span class=&quot;tok-num&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;tok-num&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;tok-num&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;tok-num&quot;&gt;4&lt;/span&gt;};
    &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; dst[&lt;span class=&quot;tok-num&quot;&gt;3&lt;/span&gt;];
    &lt;span class=&quot;tok-ty&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;long&lt;/span&gt; n = std::&lt;span class=&quot;tok-fn&quot;&gt;safe_memcpy&lt;/span&gt;(dst[..], src[..]);   &lt;span class=&quot;tok-com&quot;&gt;// elements, not bytes&lt;/span&gt;
    &lt;span class=&quot;tok-fn&quot;&gt;printf&lt;/span&gt;(&lt;span class=&quot;tok-str&quot;&gt;&quot;copied=%lu sum=%ld\n&quot;&lt;/span&gt;, n, &lt;span class=&quot;tok-fn&quot;&gt;sum&lt;/span&gt;(dst[..]));
    &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;tok-num&quot;&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;a class=&quot;run-link&quot; href=&quot;/safec-docs/playground.html#code=I2luY2x1ZGUgPHN0ZC9zdHIuaD4KI2luY2x1ZGUgPHN0ZC9tZW0uaD4KZXh0ZXJuIGludCBwcmludGYoY29uc3QgY2hhciogZm10LCAuLi4pOwoKbG9uZyBzdW0oW11jb25zdCBpbnQgeHMpIHsgICAgICAgICAgIC8vIGEgcmVhZC1vbmx5IHNsaWNlOiB0aGUgbGVuZ3RoIGNvbWVzIHdpdGggaXQKICAgIGxvbmcgcyA9IDBMOwogICAgZm9yICh1bnNpZ25lZCBsb25nIGkgPSAwVUw7IGkgPCB4cy5sZW47IGkgPSBpICsgMVVMKSB7IHMgPSBzICsgKGxvbmcpeHNbaV07IH0KICAgIHJldHVybiBzOwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgbmFtZVs4XTsKICAgIGludCBmaXQgPSBzdGQ6OnN0cl9jb3B5KG5hbWVbLi5dLCAidHJ1bmNhdGVkISIpOyAgIC8vIGJvdW5kZWQgYnkgdGhlIHNsaWNlCiAgICBwcmludGYoImZpdD0lZCBuYW1lPSVzXG4iLCBmaXQsIG5hbWUpOwoKICAgIGludCBzcmNbNF0gPSB7MSwgMiwgMywgNH07CiAgICBpbnQgZHN0WzNdOwogICAgdW5zaWduZWQgbG9uZyBuID0gc3RkOjpzYWZlX21lbWNweShkc3RbLi5dLCBzcmNbLi5dKTsgICAvLyBlbGVtZW50cywgbm90IGJ5dGVzCiAgICBwcmludGYoImNvcGllZD0lbHUgc3VtPSVsZFxuIiwgbiwgc3VtKGRzdFsuLl0pKTsKICAgIHJldHVybiAwOwp9Cg&quot;&gt;&lt;svg viewBox=&quot;0 0 24 24&quot; aria-hidden=&quot;true&quot;&gt;&lt;path fill=&quot;currentColor&quot; d=&quot;M8 5v14l11-7L8 5Z&quot;/&gt;&lt;/svg&gt;Run in Playground&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;It prints &lt;code&gt;fit=0 name=truncat&lt;/code&gt; (the copy was truncated to the 8-byte buffer, NUL included) and &lt;code&gt;copied=3 sum=6&lt;/code&gt;. The same with crypto and a thread that owns its data — this one needs the full std, so build it locally with &lt;code&gt;safeguard run&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&quot;language-c code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;c&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/crypto/sha256.h&amp;gt;
&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/str.h&amp;gt;
&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/thread.h&amp;gt;
&lt;span class=&quot;tok-pp&quot;&gt;#include&lt;/span&gt; &amp;lt;std/collections/vec.h&amp;gt;
&lt;span class=&quot;tok-kw&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;printf&lt;/span&gt;(&lt;span class=&quot;tok-kw&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;char&lt;/span&gt;* fmt, ...);

&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;count&lt;/span&gt;(&lt;span class=&quot;tok-kw&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;&amp;lt;&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;&amp;gt; v) {
    &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; n = (&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;)v.len;
    v.&lt;span class=&quot;tok-fn&quot;&gt;drop&lt;/span&gt;();                       &lt;span class=&quot;tok-com&quot;&gt;// the thread owns v and must drop it&lt;/span&gt;
    &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; n;
}

&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;tok-fn&quot;&gt;main&lt;/span&gt;() {
    &lt;span class=&quot;tok-ty&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;char&lt;/span&gt; digest[&lt;span class=&quot;tok-num&quot;&gt;32&lt;/span&gt;];
    std::&lt;span class=&quot;tok-fn&quot;&gt;sha256&lt;/span&gt;(std::&lt;span class=&quot;tok-fn&quot;&gt;str_bytes&lt;/span&gt;(&lt;span class=&quot;tok-str&quot;&gt;&quot;abc&quot;&lt;/span&gt;), digest[..]);   &lt;span class=&quot;tok-com&quot;&gt;// was sha256(data, len, digest)&lt;/span&gt;

    &lt;span class=&quot;tok-kw&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;&amp;lt;&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;&amp;gt; v = std::&lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;::&lt;span class=&quot;tok-kw&quot;&gt;new&lt;/span&gt;();
    v.&lt;span class=&quot;tok-fn&quot;&gt;push&lt;/span&gt;(&lt;span class=&quot;tok-num&quot;&gt;1&lt;/span&gt;); v.&lt;span class=&quot;tok-fn&quot;&gt;push&lt;/span&gt;(&lt;span class=&quot;tok-num&quot;&gt;2&lt;/span&gt;);
    &lt;span class=&quot;tok-kw&quot;&gt;struct&lt;/span&gt; SpawnedThread&amp;lt;&lt;span class=&quot;tok-kw&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;tok-ty&quot;&gt;Vec&lt;/span&gt;&amp;lt;&lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;&amp;gt;, &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt;&amp;gt; t = std::&lt;span class=&quot;tok-fn&quot;&gt;thread_spawn&lt;/span&gt;(count, v);
    &lt;span class=&quot;tok-com&quot;&gt;// v.push(3);                   // error: use of &#39;v&#39; after it was moved&lt;/span&gt;
    &lt;span class=&quot;tok-ty&quot;&gt;int&lt;/span&gt; len = t.&lt;span class=&quot;tok-fn&quot;&gt;join&lt;/span&gt;();             &lt;span class=&quot;tok-com&quot;&gt;// join() consumes t and returns count&#39;s result&lt;/span&gt;

    &lt;span class=&quot;tok-fn&quot;&gt;printf&lt;/span&gt;(&lt;span class=&quot;tok-str&quot;&gt;&quot;digest[0]=0x%02x len=%d\n&quot;&lt;/span&gt;, (&lt;span class=&quot;tok-ty&quot;&gt;unsigned&lt;/span&gt;)digest[&lt;span class=&quot;tok-num&quot;&gt;0&lt;/span&gt;], len);
    &lt;span class=&quot;tok-kw&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;tok-num&quot;&gt;0&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It prints &lt;code&gt;digest[0]=0xba len=2&lt;/code&gt;; uncommenting &lt;code&gt;v.push(3)&lt;/code&gt; is the compile error &lt;code&gt;use of &#39;v&#39; after it was moved&lt;/code&gt;, with a note pointing at the &lt;code&gt;thread_spawn&lt;/code&gt; call.&lt;/p&gt;
&lt;p&gt;Where to look while migrating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/safec-docs/reference/types.html#slice-types&quot;&gt;Types: slices&lt;/a&gt;, &lt;a href=&quot;/safec-docs/reference/types.html#read-only-slices&quot;&gt;read-only slices&lt;/a&gt; and &lt;a href=&quot;/safec-docs/reference/types.html#optional-slices&quot;&gt;optional slices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/safec-docs/reference/ownership.html&quot;&gt;Ownership &amp;amp; Drop&lt;/a&gt; — the rule, every error, &lt;a href=&quot;/safec-docs/reference/ownership.html#consume-methods&quot;&gt;consume methods&lt;/a&gt;, &lt;a href=&quot;/safec-docs/reference/ownership.html#forget&quot;&gt;&lt;code&gt;forget&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/safec-docs/reference/threads.html&quot;&gt;Thread Safety&lt;/a&gt; — &lt;a href=&quot;/safec-docs/reference/threads.html#send-and-sync&quot;&gt;Send and Sync&lt;/a&gt;, &lt;a href=&quot;/safec-docs/reference/threads.html#thread-spawn&quot;&gt;&lt;code&gt;thread_spawn&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;/safec-docs/reference/threads.html#mutex&quot;&gt;&lt;code&gt;Mutex&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The std pages for the modules you use: &lt;a href=&quot;/safec-docs/stdlib/mem.html&quot;&gt;mem&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/str.html&quot;&gt;str&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/io.html&quot;&gt;io&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/collections.html&quot;&gt;collections&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/crypto.html&quot;&gt;crypto&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/thread.html&quot;&gt;thread&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/async.html&quot;&gt;async&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/audio.html&quot;&gt;audio&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/dsp.html&quot;&gt;dsp&lt;/a&gt;, &lt;a href=&quot;/safec-docs/stdlib/http.html&quot;&gt;http&lt;/a&gt;, and the &lt;a href=&quot;/safec-docs/api/&quot;&gt;std API reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt;&#39;s &lt;em&gt;Breaking changes&lt;/em&gt; list, module by module&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;try&quot; tabindex=&quot;-1&quot;&gt;Try it &lt;a class=&quot;header-anchor&quot; href=&quot;#try&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;All of this shipped in &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-7.html&quot;&gt;1.0.0-beta-7&lt;/a&gt;: &lt;a href=&quot;/safec-docs/install.html&quot;&gt;install it&lt;/a&gt;, or try the language in the &lt;a href=&quot;/safec-docs/playground.html&quot;&gt;Playground&lt;/a&gt;. If something you depend on broke in a way the compiler didn&#39;t explain, please &lt;a href=&quot;https://github.com/safec-org/SafeC/issues&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;open an issue&lt;/a&gt;.&lt;/p&gt;
</content>
</entry>
<entry>
<title>This cycle in SafeC: async, audio, a web stack, a GUI toolkit and HTTPS</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/this-release-cycle.html"/>
<id>https://safec-org.github.io/safec-docs/blog/this-release-cycle.html</id>
<published>2026-10-25T00:00:00Z</published>
<updated>2026-10-25T00:00:00Z</updated>
<author><name>The SafeC Team</name></author>
<category term="release"/>
<category term="std"/>
<category term="async"/>
<category term="audio"/>
<category term="web"/>
<category term="gui"/>
<summary>Since 1.0.0-beta-6, SafeC&#39;s standard library gained Rust-style async, real-time audio and MIDI, a full web stack with HTTPS, an anti-aliased GUI toolkit that also runs on Wayland and in the browser, and prebuilt sections; the docs are now built with SafeC and Windows CI is green again.</summary>
<content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Shipped in &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-7.html&quot;&gt;1.0.0-beta-7&lt;/a&gt;&lt;/strong&gt; on 2026-10-27.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The weeks since &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-6.html&quot;&gt;1.0.0-beta-6&lt;/a&gt; went into the standard library: a program that serves HTTP, opens a window, plays audio and awaits futures can now be written with nothing but &lt;code&gt;std&lt;/code&gt;. Everything below is merged on &lt;code&gt;main&lt;/code&gt; (pull requests &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt;–&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/67&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#67&lt;/a&gt;) and will ship in the next release (the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt; starts with #69; &lt;a href=&quot;/safec-docs/blog/whats-coming-next.html&quot;&gt;What&#39;s coming next&lt;/a&gt; covers everything since beta-6).&lt;/p&gt;
&lt;h2 id=&quot;async&quot; tabindex=&quot;-1&quot;&gt;std/async: futures without language coroutines &lt;a class=&quot;header-anchor&quot; href=&quot;#async&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/async.html&quot;&gt;&lt;code&gt;std/async&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/61&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#61&lt;/a&gt;) brings Rust&#39;s &lt;code&gt;Future&lt;/code&gt; / &lt;code&gt;Poll&lt;/code&gt; / &lt;code&gt;Waker&lt;/code&gt; / &lt;code&gt;Context&lt;/code&gt; model to SafeC as a library. A future is a struct with a &lt;code&gt;poll&lt;/code&gt; method; the &lt;code&gt;ASYNC_BEGIN&lt;/code&gt; / &lt;code&gt;AWAIT&lt;/code&gt; / &lt;code&gt;ASYNC_RETURN&lt;/code&gt; macros turn it into a resumable state machine over &lt;code&gt;goto&lt;/code&gt;, with every local that lives across an await stored in the struct.&lt;/p&gt;
&lt;p&gt;On top of that: timers, &lt;code&gt;join&lt;/code&gt; / &lt;code&gt;select&lt;/code&gt; / timeout combinators, channels, &lt;code&gt;Mutex&lt;/code&gt;, &lt;code&gt;Semaphore&lt;/code&gt;, &lt;code&gt;Notify&lt;/code&gt; and cancellation, a deterministic no-heap single-threaded &lt;code&gt;LocalExecutor&lt;/code&gt; that also runs on bare metal and wasm32, a multi-threaded &lt;code&gt;ThreadPool&lt;/code&gt;, a host &lt;code&gt;block_on&lt;/code&gt;, and an &lt;code&gt;IoDriver&lt;/code&gt; + &lt;code&gt;Runtime&lt;/code&gt; with async TCP on the epoll, kqueue and WSAPoll reactor. The compiler learned the &lt;code&gt;goto&lt;/code&gt; rules this depends on — duplicate labels, jumps over declarations, labels after &lt;code&gt;return&lt;/code&gt; — and &lt;code&gt;safeguard&lt;/code&gt; gained &lt;code&gt;[build] compat_preprocessor&lt;/code&gt; for packages built on the macros. See &lt;code&gt;examples/async_demo&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;audio&quot; tabindex=&quot;-1&quot;&gt;std/audio: real-time audio and MIDI &lt;a class=&quot;header-anchor&quot; href=&quot;#audio&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/safec-docs/stdlib/audio.html&quot;&gt;&lt;code&gt;std/audio&lt;/code&gt;&lt;/a&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/59&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#59&lt;/a&gt;) is one callback-based API for audio streams and MIDI ports with format conversion. Audio backends: ALSA, JACK, Core Audio, WASAPI, Web Audio and a dummy device for tests; MIDI: the ALSA sequencer, JACK, Core MIDI, WinMM and Web MIDI, over a MIDI core with message types, a parser and a lock-free queue. Runtime tests cover the dummy backend, ALSA&#39;s null and file PCMs, a JACK loopback and MIDI, with a Windows check under Wine; &lt;code&gt;examples/audio_demo&lt;/code&gt; lists devices, plays a sine and monitors MIDI. Along the way &lt;code&gt;safeguard&lt;/code&gt; learned &lt;code&gt;_macos&lt;/code&gt; and &lt;code&gt;_wasm&lt;/code&gt; platform-variant std sources.&lt;/p&gt;
&lt;h2 id=&quot;web&quot; tabindex=&quot;-1&quot;&gt;A web stack &lt;a class=&quot;header-anchor&quot; href=&quot;#web&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/57&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#57&lt;/a&gt; rebuilt &lt;a href=&quot;/safec-docs/stdlib/http.html&quot;&gt;&lt;code&gt;std/http&lt;/code&gt;&lt;/a&gt; into a stack for real services: structured headers and request/response helpers, a keep-alive &lt;code&gt;HttpServer&lt;/code&gt; with chunked transfer coding, a &lt;code&gt;Router&lt;/code&gt; with middleware and route patterns, static files, cookies, multipart forms, server-sent events and WebSocket upgrades, plus a URL client that follows redirects and decodes gzip. It came with &lt;code&gt;std/encoding/url&lt;/code&gt; (RFC 3986 parsing and resolution, query parameters, form encoding) and &lt;code&gt;std/encoding/deflate&lt;/code&gt; (DEFLATE, zlib and gzip, CRC-32 and Adler-32).&lt;/p&gt;
&lt;p&gt;On the browser side, &lt;a href=&quot;/safec-docs/stdlib/wasm.html&quot;&gt;&lt;code&gt;std/wasm&lt;/code&gt;&lt;/a&gt; grew full DOM and browser-API interop — events, timers, fetch, storage, history — with its JavaScript glue shipped in std and tested under Node. &lt;code&gt;examples/fullstack_demo&lt;/code&gt; puts both halves together: a Router server and a SafeC-to-wasm client.&lt;/p&gt;
&lt;h2 id=&quot;gui&quot; tabindex=&quot;-1&quot;&gt;std/gui: a GUI toolkit &lt;a class=&quot;header-anchor&quot; href=&quot;#gui&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt; turned &lt;a href=&quot;/safec-docs/stdlib/gui.html&quot;&gt;&lt;code&gt;std/gui&lt;/code&gt;&lt;/a&gt; into a toolkit: an anti-aliased vector canvas with TrueType font loading, kerning and text layout (&lt;a href=&quot;/safec-docs/stdlib/gui-graphics.html&quot;&gt;GUI Graphics&lt;/a&gt;); a retained &lt;a href=&quot;/safec-docs/stdlib/gui-widgets.html&quot;&gt;widget toolkit&lt;/a&gt; with layout and theming; and &lt;code&gt;GuiApp&lt;/code&gt; for multi-window applications, all over a &lt;code&gt;GuiBackend&lt;/code&gt; interface beneath a portable window layer. Canvas tests compare against a golden image, the widget tests run on a headless backend, and two-window &lt;code&gt;GuiApp&lt;/code&gt; tests run on X11 (under Xvfb) and Win32 (under Wine). Try &lt;code&gt;examples/gui_hello&lt;/code&gt; and &lt;code&gt;examples/gui_gallery&lt;/code&gt;, which shows every widget.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/65&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#65&lt;/a&gt; then took the toolkit to &lt;a href=&quot;/safec-docs/stdlib/gui-platforms.html&quot;&gt;more platforms&lt;/a&gt;: a Wayland backend (chosen at run time on Linux), a WebAssembly backend that draws into a &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; or through WebGL with windows inside the page, IME text input and DOM interop, and GPU presenters over OpenGL ES (EGL), Metal and Direct3D 11. &lt;code&gt;safeguard bundle --target wasm32&lt;/code&gt; packages a GUI app as a runnable web page.&lt;/p&gt;
&lt;h2 id=&quot;sections&quot; tabindex=&quot;-1&quot;&gt;Prebuilt std, in sections &lt;a class=&quot;header-anchor&quot; href=&quot;#sections&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Releases now ship the standard library prebuilt for each platform as one archive per &lt;em&gt;section&lt;/em&gt; — std&#39;s top-level directories, like &lt;code&gt;core&lt;/code&gt;, &lt;code&gt;collections&lt;/code&gt;, &lt;code&gt;gui&lt;/code&gt; or &lt;code&gt;ml&lt;/code&gt; (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/56&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#56&lt;/a&gt;). &lt;code&gt;safeguard&lt;/code&gt; links the sections a project uses instead of compiling them, and &lt;code&gt;install.sh --std=...&lt;/code&gt; / &lt;code&gt;install.ps1 -Std ...&lt;/code&gt; choose which to install. std is now always compiled optimized, in debug builds too, and the release binaries target macOS 11 and glibc 2.25 (Debian 10, Ubuntu 18.04, RHEL 8 and later).&lt;/p&gt;
&lt;h2 id=&quot;docs&quot; tabindex=&quot;-1&quot;&gt;The docs, built with SafeC &lt;a class=&quot;header-anchor&quot; href=&quot;#docs&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The documentation site you&#39;re reading is now generated by a SafeC program instead of VitePress. That work added the std pieces a static-site generator needs (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/58&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#58&lt;/a&gt;): &lt;a href=&quot;/safec-docs/stdlib/dir.html&quot;&gt;&lt;code&gt;std/dir&lt;/code&gt; and &lt;code&gt;std/path&lt;/code&gt;&lt;/a&gt; with whole-file &lt;code&gt;File::read_to_string&lt;/code&gt; / &lt;code&gt;write_bytes&lt;/code&gt;, a CommonMark + GFM &lt;a href=&quot;/safec-docs/stdlib/serial.html&quot;&gt;Markdown&lt;/a&gt; parser with containers, heading ids and render hooks, YAML flow collections and block scalars, &lt;code&gt;html_unescape&lt;/code&gt; / &lt;code&gt;html_strip_tags&lt;/code&gt;, a wasm runtime with a reusing size-class allocator over &lt;code&gt;memory.grow&lt;/code&gt;, and fixes to &lt;a href=&quot;/safec-docs/advanced/scx.html&quot;&gt;scx&lt;/a&gt; templates. The compiler now lexes C&#39;s &lt;code&gt;\a \b \f \v \e&lt;/code&gt; escapes. The &lt;a href=&quot;/safec-docs/blog/new-website.html&quot;&gt;new website&lt;/a&gt; builds on all of it.&lt;/p&gt;
&lt;h2 id=&quot;windows&quot; tabindex=&quot;-1&quot;&gt;Windows fixes &lt;a class=&quot;header-anchor&quot; href=&quot;#windows&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/64&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#64&lt;/a&gt; made Windows CI green again: the compiler keeps a generic function&#39;s COMDAT when the ABI pass rebuilds it, &lt;code&gt;std/sched&lt;/code&gt; passes &lt;code&gt;WSAStartup&lt;/code&gt; a real 408-byte &lt;code&gt;WSADATA&lt;/code&gt;, and the WSAPoll reactor no longer indexes its watch list after dispatching. A smaller compiler fix from &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/63&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#63&lt;/a&gt;: an &lt;code&gt;f&lt;/code&gt;-suffixed floating literal is a &lt;code&gt;float&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;https&quot; tabindex=&quot;-1&quot;&gt;HTTPS &lt;a class=&quot;header-anchor&quot; href=&quot;#https&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The last piece landed as this post was being written: &lt;a href=&quot;https://github.com/safec-org/SafeC/pull/66&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#66&lt;/a&gt; adds &lt;a href=&quot;/safec-docs/stdlib/tls.html&quot;&gt;&lt;code&gt;std/tls&lt;/code&gt;&lt;/a&gt;, with the operating system&#39;s TLS where there is one — OpenSSL (loaded at run time), SChannel and SecureTransport — and a TLS 1.3 engine written in SafeC (client and server) as the fallback, with X.509 parsing, certificate path validation and the system&#39;s trust roots. &lt;code&gt;std/crypto&lt;/code&gt; grew what that needs: X25519, P-256 / P-384 ECDH and ECDSA, RSA PKCS#1 v1.5 and PSS, HKDF and ChaCha20. With it, &lt;code&gt;std/http&lt;/code&gt; speaks &lt;code&gt;https://&lt;/code&gt; in &lt;code&gt;http_fetch&lt;/code&gt; and friends and in the SSE client, &lt;code&gt;WsConn&lt;/code&gt; speaks &lt;code&gt;wss://&lt;/code&gt;, and &lt;code&gt;HttpServer&lt;/code&gt; serves HTTPS with a &lt;code&gt;TlsServerConfig&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;try&quot; tabindex=&quot;-1&quot;&gt;Try it &lt;a class=&quot;header-anchor&quot; href=&quot;#try&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Everything above is on &lt;code&gt;main&lt;/code&gt;. Until the next release, &lt;a href=&quot;/safec-docs/install.html#quick-install&quot;&gt;build from source&lt;/a&gt;, or install &lt;a href=&quot;/safec-docs/blog/releases/v1.0.0-beta-6.html&quot;&gt;1.0.0-beta-6&lt;/a&gt; and follow the &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;changelog&lt;/a&gt;.&lt;/p&gt;
</content>
</entry>
<entry>
<title>SafeC 1.0.0-beta-6 released</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-6.html"/>
<id>https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-6.html</id>
<published>2026-10-22T00:00:00Z</published>
<updated>2026-10-22T00:00:00Z</updated>
<author><name>SafeC release notes</name></author>
<category term="release"/>
<summary>Release notes for SafeC 1.0.0-beta-6.</summary>
<content type="html">&lt;p&gt;SafeC &lt;strong&gt;1.0.0-beta-6&lt;/strong&gt; was released on 2026-10-22. It is a pre-release: the language and std are still moving quickly.&lt;/p&gt;
&lt;p&gt;Install this exact release:&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/safec-org/SafeC/main/install.sh | bash -s -- --version=v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;language-powershell code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;powershell&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&amp;amp; ([scriptblock]::&lt;span class=&quot;tok-fn&quot;&gt;Create&lt;/span&gt;((irm https://raw.githubusercontent.com/safec-org/SafeC/main/install.ps1))) -Version v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;pull-requests&quot; tabindex=&quot;-1&quot;&gt;Pull requests &lt;a class=&quot;header-anchor&quot; href=&quot;#pull-requests&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;cuDNN convolution / U-Net and cuFFT transforms on the CUDA backend (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/3&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#3&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(cuda): close the H200 gaps vs PyTorch (cuDNN graph API, pinned transfers) + fp16/bf16 buffers (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/4&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#4&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;fix: std::alloc size class 33 read past the cache tables (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/5&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#5&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf: CPU SIMD/threads for std/dsp and std/ml; float DSP; vendor BLAS (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/6&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#6&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std): slab allocator, quarantine byte budget, faster Vec/HashMap, half-spectrum rFFT, arena FeatureMaps (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/7&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#7&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(std/ml): flash and linear attention on ROCm (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/9&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#9&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/ml): MPS bf16 decode/flash/linear attention, faster RMSNorm and GEMV (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/8&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#8&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(cuda): flash and linear attention (cuDNN SDPA, tensor-core kernels) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/11&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#11&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(cuda): faster head-dim-128 linear and fp32 flash attention (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/12&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#12&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;fix(std): panic/log print through stderr_compat.h (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/10&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#10&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/ml): MPS flash attention on simdgroup matrices, chunk-parallel linear attention, CUDA/ROCm-compatible API (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/13&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#13&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/ml): ROCm attention on matrix cores (MFMA) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/14&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#14&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/ml): 8-simdgroup MPS flash attention threadgroups where they win (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/15&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#15&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;safeguard: honor $SAFEC and key the std archive cache on the compiler (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/16&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#16&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/dsp): Accelerate vDSP for FIR on Apple; fix fft.sc linking on macOS (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/17&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#17&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(std/ml): ROCm decode ops (half GEMV, RMSNorm, GELU); gpu_mps links off Apple (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/18&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#18&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(std/ml): CPU half_gemv; tensor_blas/tensor_vdsp link on every platform (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/19&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#19&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml CUDA: decode ops from the Gemma 4 engine (half GEMV, RMSNorm, GELU, split-KV attention) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/20&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#20&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;perf(std/ml): Apple Silicon half_gemv, half_gemv_batch, P-core pool (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/21&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#21&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;fix(std/sched): wait out connect() in the http and websocket clients (macOS) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/22&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#22&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/http: bound connect and handshake time in HTTP/WebSocket clients (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/23&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#23&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: residual/pooling, Mamba SSM, training stack, generative models, RL, LoRA/QLoRA (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/24&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#24&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;fix(std): panic/log print through stderr_compat.h (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/26&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#26&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: trainable convnets; fp16/bf16 mixed precision on CPU, ROCm and CUDA (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/27&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#27&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml CUDA: faster mixed-precision ops and 16-bit convolutions (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/28&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#28&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: faster CPU training (sgemm packs once per call, vectorized optimizer) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/29&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#29&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(safeguard): prebuilt and local library dependencies; fix [[dependencies]] parsing (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/31&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#31&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: device-resident training on ROCm (nn_rocm.h) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/30&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#30&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml nn_rocm: MIOpen convolutions, fused passes, fp16/bf16 training (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/32&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#32&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: audit outside std/ml — bug fixes, convention fixes, broader tests (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/33&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#33&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: one training interface over CPU and ROCm (traits), backend picked at build time (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/34&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#34&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: operations on stateful types are methods (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/35&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#35&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: AES-GCM TLS records, real MMU formats, chip-generic HAL, verified GUI backends (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/36&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#36&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Trait composition and bounded generic structs; std/ml models as composed traits (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/37&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#37&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: autograd as methods (Tensor::backward / zero_grad, Autograd state) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/38&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#38&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(compiler): static methods, keyword method names, return-type inference (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/39&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#39&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;feat(compiler): methods with their own type parameters (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/40&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#40&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: static-method constructors; single-tensor ops as methods (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/41&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#41&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;compiler: static calls through a type parameter; generic functions as values (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/42&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#42&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std/ml: generic DenseTensor&lt;E&gt;; HalfTensor/BF16Tensor with autograd (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/44&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#44&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;std: methods, static constructors and composed traits (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/45&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#45&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;fix(compiler): struct-body declarations, trait method shapes, newtype if const, pointer inference (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/43&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#43&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml/mps: typed MpsBuf, GPU Mlp training, const-pointer global and dispatch fixes (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/46&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#46&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml: train on ROCm, CUDA and Metal through tensor devices; fp16/bf16, SparseTensor (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/47&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#47&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml: trainable attention and transformers on tensor devices; fused attention kernels (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/48&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#48&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml/device_cuda: cuDNN graph plans for device convolutions; first H200 run (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/49&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#49&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ml/device: every kernel on the Metal GPU from the shared kernel source; macOS link fix (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/50&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#50&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/releases/tag/v1.0.0-beta-6&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;The release on GitHub&lt;/a&gt; · &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;Changelog&lt;/a&gt;&lt;/p&gt;
</content>
</entry>
<entry>
<title>SafeC 1.0.0-beta-5 released</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-5.html"/>
<id>https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-5.html</id>
<published>2026-10-20T00:00:00Z</published>
<updated>2026-10-20T00:00:00Z</updated>
<author><name>SafeC release notes</name></author>
<category term="release"/>
<summary>Release notes for SafeC 1.0.0-beta-5.</summary>
<content type="html">&lt;p&gt;SafeC &lt;strong&gt;1.0.0-beta-5&lt;/strong&gt; was released on 2026-10-20. It is a pre-release: the language and std are still moving quickly.&lt;/p&gt;
&lt;p&gt;Install this exact release:&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/safec-org/SafeC/main/install.sh | bash -s -- --version=v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;language-powershell code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;powershell&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&amp;amp; ([scriptblock]::&lt;span class=&quot;tok-fn&quot;&gt;Create&lt;/span&gt;((irm https://raw.githubusercontent.com/safec-org/SafeC/main/install.ps1))) -Version v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/releases/tag/v1.0.0-beta-5&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;The release on GitHub&lt;/a&gt; · &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;Changelog&lt;/a&gt;&lt;/p&gt;
</content>
</entry>
<entry>
<title>SafeC 1.0.0-beta-4 released</title>
<link rel="alternate" type="text/html" href="https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-4.html"/>
<id>https://safec-org.github.io/safec-docs/blog/releases/v1.0.0-beta-4.html</id>
<published>2026-10-20T00:00:00Z</published>
<updated>2026-10-20T00:00:00Z</updated>
<author><name>SafeC release notes</name></author>
<category term="release"/>
<summary>Release notes for SafeC 1.0.0-beta-4.</summary>
<content type="html">&lt;p&gt;SafeC &lt;strong&gt;1.0.0-beta-4&lt;/strong&gt; was released on 2026-10-20. It is a pre-release: the language and std are still moving quickly.&lt;/p&gt;
&lt;p&gt;Install this exact release:&lt;/p&gt;
&lt;div class=&quot;language-bash code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;bash&lt;/span&gt;&lt;pre&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/safec-org/SafeC/main/install.sh | bash -s -- --version=v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;language-powershell code-block&quot;&gt;&lt;button class=&quot;copy&quot; type=&quot;button&quot; aria-label=&quot;Copy code&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;powershell&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&amp;amp; ([scriptblock]::&lt;span class=&quot;tok-fn&quot;&gt;Create&lt;/span&gt;((irm https://raw.githubusercontent.com/safec-org/SafeC/main/install.ps1))) -Version v1.&lt;span class=&quot;tok-num&quot;&gt;0.0&lt;/span&gt;-beta-&lt;span class=&quot;tok-num&quot;&gt;4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;pull-requests&quot; tabindex=&quot;-1&quot;&gt;Pull requests &lt;a class=&quot;header-anchor&quot; href=&quot;#pull-requests&quot; aria-hidden=&quot;true&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Honor volatile on variables, fields and pointee types (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/1&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#1&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Target arch macros + WebAssembly targets (wasm32/wasm64) (&lt;a href=&quot;https://github.com/safec-org/SafeC/pull/2&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;#2&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/safec-org/SafeC/releases/tag/v1.0.0-beta-4&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;The release on GitHub&lt;/a&gt; · &lt;a href=&quot;/safec-docs/changelog.html&quot;&gt;Changelog&lt;/a&gt;&lt;/p&gt;
</content>
</entry>
</feed>
