jetc: rename --shared build output convention from .so to .jtc

Purely a naming-convention change per user request, not a format
change - the output is still a real ELF shared object (-shared -fPIC),
still dlopen()-able exactly as before. .jtc ("jet compiled") marks it as
an APIServer-loadable content module rather than a generic library.

build-shared.sh: usage text and STEM derivation
(basename "$OUTPUT" .so -> .jtc) both updated - the STEM change is the
one functional piece here, everything else in this commit is comments/
usage strings. Doc comments in jetc.cpp/JetCodegen.h/host_test.cpp/
api_test.cpp updated to match.

Verified live: rebuilt jetc and all five demo*.jtc modules, reran
api_test/host_test against demo3.jtc (still resolves jetc_api_demo3/
jetc_render_demo3 and renders correctly) - the extension is purely
cosmetic to dlopen(), as expected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Brad ArantandClaude Sonnet 5 committed 2026-08-25 11:41:44 -07:00
1 parent 3f273b0a95
commit 9bbb95cc57
6 files changed
+28 -22

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ namespace jetc {
// One `#api METHOD /path` directive from the top of the source template
// (see jetc.cpp) - a compile-time-known route this template wants to
// serve once loaded as a .so. Purely descriptive data handed to Codegen;
// serve once loaded as a .jtc. Purely descriptive data handed to Codegen;
// jetc itself never interprets the method/path beyond storing them.
struct ApiRoute {
std::string method;
@@ -34,7 +34,7 @@ namespace jetc {
//
// sharedMode == true: emits no main() at all. Instead the render
// logic is exported as `extern "C" void <entrySymbol>(jet::Global
// &global, coreutils::MString &out)`, meant to be built into a .so
// &global, coreutils::MString &out)`, meant to be built into a .jtc
// (see build-shared.sh) and dlsym()'d by a long-running host server -
// one call renders one request into the caller-owned `out`, using
// whatever Global the host passes in (its lifecycle, cgi/session
@@ -45,7 +45,7 @@ namespace jetc {
// letting coreutils::Exception propagate to the caller) across the
// dlopen() boundary is safe; this is a same-ABI plugin boundary, not
// a foreign C ABI one. entrySymbol should be unique per compiled
// template (see jetc.cpp) so multiple .so's can coexist even if a
// template (see jetc.cpp) so multiple .jtc's can coexist even if a
// host ever dlopen()s them RTLD_GLOBAL instead of keeping separate
// handles.
//