fix: sync template sysroot, add script

This commit is contained in:
2026-06-12 11:56:20 +02:00
parent 22691c5c17
commit 44f86a8b19
33 changed files with 5172 additions and 147 deletions
+11 -2
View File
@@ -42,12 +42,13 @@ myapp/
│ └── cxxrt.cpp C++ new/delete runtime (keep this)
├── sysroot/
│ ├── include/
│ │ ├── montauk/ syscall.h, heap.h, string.h, config.h, toml.h, user.h
│ │ ├── gui/ gui.hpp, canvas.hpp, truetype.hpp, widgets.hpp, svg.hpp, ...
│ │ ├── montauk/ syscall.h, heap.h, thread.h, string.h, config.h, toml.h, user.h
│ │ ├── gui/ gui.hpp, canvas.hpp, truetype.hpp, widgets.hpp, mtk.hpp, dialogs.hpp, ...
│ │ ├── http/ http.hpp (HTTP GET/POST/etc. wrapper)
│ │ ├── tls/ tls.hpp (HTTPS/TLS, for USE_TLS=1)
│ │ ├── Api/ Syscall.hpp (low-level syscall numbers)
│ │ ├── libc/ stdio.h, stdlib.h, string.h, ...
│ │ ├── libloader/ libloader.h (shared library loading, used by gui/dialogs.hpp)
│ │ ├── bearssl*.h BearSSL headers (for USE_TLS=1)
│ │ └── (freestanding C/C++ standard headers)
│ └── lib/
@@ -74,3 +75,11 @@ myapp/
- No exceptions, no RTTI, 32 KiB user stack
`USE_CRT=1` is meant for plain C ports and other code that already expects `main(argc, argv)`. The current CRT does not run global constructors or destructors yet, so keep using `_start()` for the default C++ template flow.
## Keeping the SDK Current
The sysroot is a snapshot of the MontaukOS tree (headers from `programs/include` plus the freestanding toolchain headers, libraries from `programs/lib`). To refresh it after kernel or library changes, run from the MontaukOS project root:
```bash
make programs && ./scripts/sync_template.sh
```