code wiki / (root) / nx_static_io.nx

nx_static_io.nx

buildroot/runtime/nx_static_io.nx

9342 B253 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic static
docsdependenciesstructsconstsfunctions

about

nx_static_io.nx -- sovereign static-file serving over HTTP. Companion to nx_http_io that knows how to: - Map a URL path to a filesystem path (with safety: no .. escape) - Detect content-type from filename suffix - stream the file body to a TCP socket Built for nishi-web: a NishiLang HTTP server that hosts a static site (e.g. andelinwest.com) without nginx / apache / wordpress. genealogy_id: rfc_7230_http_1_1 + nginx_static_serve + caddy_file_server lineage_id: nx_static_serve_sovereign_q10

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_static_io.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

38func _ct_html(out: *u8) -> i64
47func _ct_css(out: *u8) -> i64
56func _ct_js(out: *u8) -> i64
62func _ct_json(out: *u8) -> i64
68func _ct_md(out: *u8) -> i64
73func _ct_png(out: *u8) -> i64
77func _ct_jpeg(out: *u8) -> i64
81func _ct_svg(out: *u8) -> i64
85func _ct_octet(out: *u8) -> i64
94func nx_static_content_type(path: *u8, path_len: i64, out: *u8) -> i64
173func nx_static_load_file(path: *u8, cap: i64, out_len: *i64) -> *u8
196func nx_static_path_is_safe(path: *u8, path_len: i64) -> i64
221func nx_static_join_path(