Skip to content

Commit 7873cdb

Browse files
feat: WASM SDK docs, demo integration, site updates (#10)
* demo: ux improvements - drop zone, loading overlay, web worker parse, Line/LineArt off by default * demo: non-blocking markdown/html rendering via worker + render cache * chore: clean root PNGs and add /*.png to .gitignore * feat: add WASM SDK docs, demo integration, and site updates - Add docs/09-wasm-sdk.md with objectives, advantages, API ref, and use cases - Update README.md with WebAssembly SDK section, features, and project layout - Add site pages: quick-start-wasm, api/wasm, guides/wasm-use-cases - Add WebAssembly tab to site landing page QuickStart - Add Live Demo link to site hero and footer - Integrate demo/ build into site/public/demo/ for GitHub Pages - Update deploy-site workflow to build demo before site - Add DEMO_BASE_PATH env var to demo vite config for /demo/ base path
1 parent ce4f39d commit 7873cdb

67 files changed

Lines changed: 6308 additions & 24 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-site.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- main
77
paths:
88
- 'site/**'
9+
- 'demo/**'
10+
- 'crates/edgeparse-wasm/pkg/**'
911
- '.github/workflows/deploy-site.yml'
1012
workflow_dispatch:
1113

@@ -43,6 +45,18 @@ jobs:
4345
working-directory: site
4446
run: pnpm install --frozen-lockfile
4547

48+
- name: Build demo app
49+
working-directory: demo
50+
run: |
51+
npm ci
52+
DEMO_BASE_PATH=/demo/ npx vite build
53+
54+
- name: Copy demo into site
55+
run: |
56+
rm -rf site/public/demo
57+
mkdir -p site/public/demo
58+
cp -r demo/dist/* site/public/demo/
59+
4660
- name: Build site
4761
working-directory: site
4862
run: pnpm run build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ examples/output/
4545
mission/
4646
logs/
4747
.playwright-mcp/
48+
49+
# Root-level screenshots (use site/public/ or docs/ for committed images)
50+
/*.png

.vite/deps/_metadata.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hash": "f05f3447",
3+
"configHash": "86da36e8",
4+
"lockfileHash": "e3b0c442",
5+
"browserHash": "82f036c2",
6+
"optimized": {},
7+
"chunks": {}
8+
}

.vite/deps/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

Cargo.lock

Lines changed: 157 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ members = [
66
"crates/pdf-cos",
77
"crates/edgeparse-python",
88
"crates/edgeparse-node",
9+
"crates/edgeparse-wasm",
910
]
1011
default-members = [
1112
"crates/edgeparse-core",
@@ -24,7 +25,7 @@ description = "EdgeParse — High-performance PDF-to-structured-data extraction
2425
[workspace.dependencies]
2526
# PDF parsing (local fork of lopdf 0.39.0, renamed pdf-cos for clarity)
2627
# Using package alias so all existing `use lopdf::...` code works unchanged.
27-
lopdf = { package = "pdf-cos", path = "crates/pdf-cos", version = "0.39.0" }
28+
lopdf = { package = "pdf-cos", path = "crates/pdf-cos", version = "0.39.0", default-features = false }
2829
pdf-extract = "0.10.0"
2930

3031
# CLI

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,30 @@ publish-brew: ## Generate Homebrew formula and push to $(BREW_TAP_REPO)
506506
publish-all: publish-rust publish-python publish-node publish-cli publish-brew ## Publish everything: Rust crates + Python wheels + Node.js packages + CLI binaries + Homebrew formula
507507
$(call ok,All SDKs + CLI + Homebrew tap published)
508508

509+
# ══════════════════════════════════════════════════════════════════════════════
510+
## WASM
511+
# ══════════════════════════════════════════════════════════════════════════════
512+
513+
WASM_CRATE := crates/edgeparse-wasm
514+
515+
wasm-build: ## Build WASM package (release, --target web)
516+
$(call info,Building WASM package...)
517+
@cd $(WASM_CRATE) && wasm-pack build --target web --release --scope edgeparse
518+
$(call ok,WASM package built → $(WASM_CRATE)/pkg/)
519+
520+
wasm-check: ## Check WASM compilation (fast, no codegen)
521+
$(call info,Checking WASM compilation...)
522+
@cargo check --target wasm32-unknown-unknown -p edgeparse-wasm
523+
$(call ok,WASM check passed)
524+
525+
wasm-size: wasm-build ## Show WASM binary size
526+
@echo "Raw WASM size:"
527+
@du -h $(WASM_CRATE)/pkg/edgeparse_wasm_bg.wasm
528+
529+
wasm-clean: ## Remove WASM build artefacts (pkg/)
530+
$(call warn,Removing $(WASM_CRATE)/pkg/ ...)
531+
@rm -rf $(WASM_CRATE)/pkg/
532+
509533
# ══════════════════════════════════════════════════════════════════════════════
510534
## Clean
511535
# ══════════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)