A new home for SafeC
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's new — and what stayed exactly where it was.
What's new
- A landing page 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.
- Learn gathers the Book, the guide, the language reference, the standard library, examples and benchmarks in one hub.
- Install has per-platform instructions with copy buttons, the requirements (clang 21+) and every installer option.
- Tools covers
safeguard,sc-lspwith VS Code, Neovim and Emacs setups, andsafecitself. - Community explains where development happens and how to report bugs and contribute.
- The Playground 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 Run in Playground link.
- This blog, with tags, an Atom feed and an RSS feed. Release notes are generated from SafeC's release history and its
CHANGELOG.mdat build time, and the changelog shows what has been merged but not yet released. - A fresh design: light and dark themes, a layout that works on phones, keyboard navigation and a search that covers the docs and the blog.
What didn't change
Every existing URL still works — /guide/introduction, /reference/types, /stdlib/http and all the rest are where they were, in English and in Korean. New short URLs like /docs/ and /download are static redirect pages, since GitHub Pages has no server-side redirects.
Built with SafeC
The site is generated by a SafeC program in site/ of the docs repository, using only the standard library: std/serial/markdown parses CommonMark with GitHub's extensions, std/serial/yaml reads the configuration and frontmatter, scx templates (SafeC's JSX-style markup) lay out the pages, and the dev server is std/http. The interactive parts — the theme switch, search, tabs, copy buttons and the playground's editor — are a SafeC module compiled to WebAssembly on std/wasm's DOM bindings, with a few lines of JavaScript to load it. There is no JavaScript framework, and every page works without scripts.
What's next
The playground's Run button was waiting on a self-hosted SafeC compiler built to WebAssembly. Update: it has landed — Run now compiles and runs programs in the browser with scc (What's coming next). Versioned docs are planned too: the version selector in the docs sidebar lists the releases already.
Found a broken link or a page that could be clearer? Open an issue or send a pull request — the Community page explains how.