How pebal/sgcl works
SGCL is a header-only C++20 application platform rather than a single end-user application. Its central use is for a C++ program to include a module, build on managed objects and core types, and use higher-level facilities such as tasks, I/O, networking, and data processing. The graph highlights that foundation and several documented or tree-visible capability areas. Source excerpts are limited, so connections are included only where the README or source index supports them; many modules’ internal wiring is not shown.
Main entry points: coroutine.h Tasks and coroutines · tracked_ptr.h Managed objects · server.h HTTP server · scheduler.h Worker scheduler
Components 24
Memory and core
- Managed objects
sgcl/core/tracked_ptr.h - Managed allocation
sgcl/core/make_tracked.h - Core containers
sgcl/core/vector.h - Strings
sgcl/core/string.h - Duration types
sgcl/core/duration.h - Callable values
sgcl/core/function.h
Async runtime
- Tasks and coroutines
sgcl/async/coroutine.h - Worker scheduler
sgcl/async/scheduler.h - Channels and select
sgcl/async/channel.h - Cancellation and timers
sgcl/async/stop_token.h - Blocking bridges
sgcl/async/blocking.h
I/O and networking
- I/O streams
sgcl/io/stream.h - Sockets
sgcl/net/socket.h - Connections
sgcl/net/connection.h - TLS
sgcl/net/tls.h - HTTP server
sgcl/net/http/server.h
Data formats
- Structured encoding
sgcl/encoding/json.h - Image codecs
sgcl/codec/decode.h - Compression and archives
sgcl/compress/compress.h
Platform modules
- Cryptography
sgcl/crypto/crypto.h - Concurrent collections
sgcl/concurrent/concurrent.h - Time and localization
sgcl/time/time.h - Text processing
sgcl/txt/format.h
Other components
- C++ program
Connections 17
- C++ program → Managed objects: uses pointers
- C++ program → Tasks and coroutines: starts tasks
- C++ program → I/O streams: uses streams
- C++ program → Sockets: uses networking
- Managed objects → Managed allocation: owns allocation
sgcl/core/make_tracked.h - Managed objects → Core containers: backs storage
sgcl/core/vector.h - Managed objects → Strings: backs strings
sgcl/core/string.h - Tasks and coroutines → Worker scheduler: enqueues tasks
sgcl/async/coroutine.h - Worker scheduler → Tasks and coroutines: runs coroutines
sgcl/async/scheduler.h - Tasks and coroutines → Channels and select: coordinates through
- Tasks and coroutines → Cancellation and timers: supports cancellation
- Sockets → Connections: uses connections
sgcl/net/socket.h - HTTP server → Connections: serves over
sgcl/net/http/server.h - HTTP server → Sockets: accepts sockets
sgcl/net/http/server.h - HTTP server → TLS: supports TLS
sgcl/net/http/server.h - Worker scheduler → Concurrent collections: uses task queue
sgcl/async/scheduler.h - Tasks and coroutines → Duration types: uses time values