Features
Framework
- Full Stack Framework fully written in C
- event based http Server
- Server-Side-Rendered
- Auto Compression with brotli & gzip
- minified Responses
- Asynchronous scheduling via cweb_async(...) on top of the event loop
- Session system with in-memory session store, expiration, and key-value session data
- internal performance measurement through speedbench with request history and per-path timing
- Development mode and production mode
- Logging System
- Leak tracking with allocation recording, outstanding allocation counting, dump, and reset
- RAII like resource management in c with AUTOFREE
- Path and URL helper functions
- cwagger API documentation support with registered endpoints, request/response schema fields, and a built-in documentation page
- Automatic Routing (folder structure based) + manually routing
- Routing system with registrable routes, fallback handlers, dynamic subpaths, and dynamic path parameters
- integrated fileserver with In-Memory-Cache and Hybrid Mode
- zero runtime file openings
- modular design
- Asnyc Fetch/Http request client with event loop integration
- Custom request and response types including header management, body parsing, status handling, and response serialization
- zero runtime file openings
Fetch / HTTP client
- Asynchronous HTTP client and fetch functionality
- Fetch client with configurable timeouts, redirects, SSL verification, proxy support, CA path, and compression
- Fetch callbacks for completion and progress reporting
- JSON helpers for fetch with object, array, string, number, boolean, and null operations
- URL encoding and URL decoding in the fetch module
- Pending request/response system for asynchronous responses
Template Engine
- Own Template Engine (.cweb)
- Template engine for .cweb templates with lexer, parser, AST, and C code generation.
- type safety (:int, :string, :time etc)
- write c code and html code together in one .cweb file
- automatic escaping
- <cloop> html element
- <cif> / <celse> html elemt
- <cstyle> with or without setline option (generates for response a css file or innline)
CLI
- cweb build: compiles templates, generates files, set up routing
- version command
- create command to generate new route page files
- colored
- Automatic creation of missing target directories during build and create workflows