AsyncWebServer
Static files, streamed uploads, and a shared WebSocket canvas running in two browser windows.
The examples are complete programs built from the same library sources as the test suite. Use them to see how the libraries fit together, then follow the links to the source when you need the implementation details.
These recordings show the larger examples running before you explore their source or the focused command-line programs below.
Static files, streamed uploads, and a shared WebSocket canvas running in two browser windows.
Reflected application state moving between binary and JSON representations.
SCExample loading native plugins and replacing them while the host keeps running.
The native backend compiling and linking the repository directly, without generating an IDE project first.
A small external project fetching the launcher with curl and building from its own SC-build.cpp.
Build and run an example from the repository root:
Use SC.bat instead of ./SC.sh on Windows. Project generation, IDE setup, and platform prerequisites are covered in Building (Contributor).
HttpClient example.HttpClient to AsyncStreams and an AsyncEventLoop.To serve a directory with AsyncWebServer, pass an absolute path after --:
Warning:
Awaitis currently experimental. These examples are complete programs for exploring the coroutine API, not a stable compatibility promise.
AwaitBackgroundJobs manages detached work in fixed caller-owned registry slots.AwaitDeadline applies a deadline and cooperative cancellation to a child task.AwaitFirstResponse races two jobs and cancels the slower one.AwaitEcho is the baseline TCP client/server conversation.AwaitDatagramPing demonstrates a bounded UDP request and reply.AwaitLineProtocol builds a small CRLF-framed protocol.AwaitConfigReload composes a child task that reads a configuration file.AwaitFilePatch performs explicit offset writes and reads.AwaitManifestPreview reads into a bounded preview buffer until full or EOF.AwaitTaskGroupFiles reads multiple files with a task group.AwaitFileCourier combines file operations with file-to-socket transfer.AwaitBackgroundDigest moves bounded CPU work to a thread pool.AwaitCallbackBridge runs callback-style Async and coroutine-style Await on the same event loop.AwaitProcessExitCodes waits for multiple child processes.AwaitThreadWakeUp delivers another thread's signal to an Await coroutine.AwaitServiceProbe combines networking, task groups, background work, timeouts, and explicit shutdown.All Await sources are under the Examples directory and use their directory name as the build target.
FibersAsync sleeps, and worker-pool work in three focused sections../SC.sh package install taskflow-benchmarks before configuring the benchmark target.Benchmark results depend on the machine and build configuration; they are development measurements rather than portable performance claims.
SCExample is the native Sokol and Dear ImGui host used to exercise Async, plugins, file watching, state handoff, and hot reload. Its plugins are:
CollaborativeCanvasExample, which hosts a browser canvas through HTTP and WebSockets;SerializationExample, which demonstrates reflected state and binary/JSON serialization;WebServerExample, which configures a static file server from the native UI.SCExample is an integration testbed rather than the shortest introduction to any individual library. Start with a focused console example when learning one API.
The library pages contain compiled snippets for individual APIs. The tests provide broader executable reference code, including error paths and platform-specific behavior. See Tests and the library catalog when an example above is broader than the question you are trying to answer.