41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
/*
|
|
catcrafts.net
|
|
Copyright (C) 2026 Catcrafts
|
|
|
|
The source code of this website is made available for viewing purposes only.
|
|
No permission is granted to copy, modify, distribute, or create derivative works.
|
|
*/
|
|
|
|
// Catcrafts.Shared — the target-neutral half of the site.
|
|
//
|
|
// Everything here compiles for BOTH wasm32-wasip1 (the browser app) and the
|
|
// host triple (the server that will render the same pages for crawlers and
|
|
// no-JS clients). That is the entire point: one set of page renderers, not
|
|
// two that drift.
|
|
//
|
|
// THE RULE: this module imports `std` and its own partitions. Nothing else.
|
|
//
|
|
// Not a style preference — Crafter.Build's dependency scanner does not respect
|
|
// `#ifdef` around `import` statements (Crafter.Graphics/project.cpp:116-121
|
|
// documents the same constraint), so an `#ifdef`-guarded
|
|
// `import Crafter.Graphics;` in here would still force Crafter.Graphics onto
|
|
// the native build, where it cannot compile. There is no conditional-import
|
|
// escape hatch, so the boundary has to be absolute.
|
|
//
|
|
// Consequently Catcrafts.Shared is a pure function:
|
|
//
|
|
// (route, data) -> RenderedPage
|
|
//
|
|
// Each host does its own I/O — fetch/DOM on wasm, sockets/SQLite on native —
|
|
// and calls in with plain data.
|
|
|
|
export module Catcrafts.Shared;
|
|
|
|
export import :Html;
|
|
export import :Json;
|
|
export import :Form;
|
|
export import :Model;
|
|
export import :Content;
|
|
export import :Money;
|
|
export import :Route;
|
|
export import :Views;
|