Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions specs/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ DOM wiring) with an automated test pyramid.
callable surface for the DD table and opening-lead analysis, not a CLI. Shared
base flags come from `WASM_LINKOPTS` ([build-system](build-system.md)),
including pthreads / `PTHREAD_POOL_SIZE`.
- **The page is a static trio plus JS glue.** `dds_web.html` / `dds_web.css` /
`dds_web.js` load the module (`createDdsModule`), marshal a deal into WASM
memory, call `dds_web_calc_table` and `dds_web_solve_leads` via `ccall`, and
read results with `getValue`. `web_site` (`tests/web_site.py`) stages the site
- **The page is a static site plus JS glue.** `dds_web.html` / `dds_web.css` /
`dds_web.js` / `dds_web_deal_import.js` / `dds_web_core.js` /
`dds_web_solve.js` load the module (`createDdsModule`), marshal a deal into
WASM memory, call `dds_web_calc_table` and `dds_web_solve_leads` via `ccall`,
and read results with `getValue`. Deal-file parsers live in
`dds_web_deal_import.js`; the deal model in `dds_web_core.js`; WASM queue /
DD table / leads in `dds_web_solve.js`; UI wiring in `dds_web.js`. `web_site`
(`tests/web_site.py`) stages the site
and provides `make_isolated_http_handler` (COOP/COEP) for system/e2e tests and
`web/serve_web.py`. Helper scripts `gen_wasm_bin_js.py`, `patch_web_wasm.py`,
`verify_wasm_js.py` generate and sanity-check the JS/wasm glue.
Expand Down Expand Up @@ -91,7 +95,8 @@ DOM wiring) with an automated test pyramid.
`web_tests` / `web_system_tests` / `web_e2e_tests` suites; `WASM_WEB_LINKOPTS`.
- `web/dds_web_wasm.cpp` — the native WASM bridge (`dds_web_calc_table`,
`dds_web_solve_leads`).
- `web/{dds_web.html,dds_web.css,dds_web.js}` — the page and JS glue.
- `web/{dds_web.html,dds_web.css,dds_web.js,dds_web_deal_import.js,dds_web_core.js,dds_web_solve.js}`
— the page, deal-file parsers, deal model, solver session, and UI glue.
- `web/coi-serviceworker.js` — COOP/COEP via service worker for hosts without
custom headers (GitHub Pages).
- `web/stage_github_pages.py` — stage static site + `index.html` for Pages.
Expand Down
9 changes: 9 additions & 0 deletions web/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ py_test(
srcs = ["tests/test_dds_web_js.py"],
data = [
"dds_web.js",
"dds_web_deal_import.js",
"dds_web_core.js",
"dds_web_solve.js",
"tests/dds_web_test.mjs",
],
)
Expand All @@ -121,6 +124,9 @@ py_test(
"dds_web.css",
"dds_web.html",
"dds_web.js",
"dds_web_deal_import.js",
"dds_web_core.js",
"dds_web_solve.js",
"gen_wasm_bin_js.py",
"patch_web_wasm.py",
"tests/dds_web_wasm_node.mjs",
Expand All @@ -143,6 +149,9 @@ py_test(
"dds_web.css",
"dds_web.html",
"dds_web.js",
"dds_web_deal_import.js",
"dds_web_core.js",
"dds_web_solve.js",
"gen_wasm_bin_js.py",
"patch_web_wasm.py",
],
Expand Down
3 changes: 3 additions & 0 deletions web/dds_web.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ <h1>

<script src="dds_web_wasm_bin.js"></script>
<script src="dds_web_wasm.js"></script>
<script src="dds_web_deal_import.js"></script>
<script src="dds_web_core.js"></script>
<script src="dds_web_solve.js"></script>
<script src="dds_web.js"></script>
</body>
</html>
Loading