Skip to content

Commit 1474506

Browse files
committed
(frontend) wasm markdown rendering
this speeds up markdown rendering. Yes I did do some performance testing, will allow for future live preview.
1 parent 9a7da36 commit 1474506

12 files changed

+537
-34
lines changed

.run-tool.yml

+8
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ targets:
1010
- mod
1111
- download
1212
cwd: backend
13+
build-frontend-wasm:
14+
program: npm
15+
args:
16+
- run
17+
- wasm
18+
cwd: frontend
1319
dev-frontend:
1420
program: npm
1521
args:
1622
- run
1723
- dev
1824
cwd: frontend
25+
before_hooks:
26+
- build-frontend-wasm
1927
dev-backend:
2028
program: go
2129
args:

frontend/Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# syntax=docker/dockerfile:1.4
22

3-
FROM node:20-alpine3.17 as builder
3+
FROM node:20-bullseye as builder
44

55
WORKDIR /app
66

7+
RUN \
8+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \
9+
&& \
10+
rustup target add wasm32-unknown-unknown
11+
712
COPY package.json package-lock.json ./
813

914
RUN npm ci
1015

1116
COPY . .
1217

18+
RUN npm run wasm
1319
RUN npm run build
1420

1521
FROM nginxinc/nginx-unprivileged:1.24-alpine

frontend/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Note Mark - Frontend
2-
The frontend web UI, written in TypeScript using the Solid.JS framework.
2+
The frontend web UI, written in TypeScript using the Solid.JS framework. Accelerated with WASM using Rust for markdown rendering.

0 commit comments

Comments
 (0)