-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjustfile
More file actions
194 lines (158 loc) · 5.25 KB
/
Copy pathjustfile
File metadata and controls
194 lines (158 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
set shell := ["zsh", "-uc"]
set positional-arguments
default:
just --list
prek:
prek run --all-files
prek-all:
prek run --all-files --hook-stage manual
clean:
rm moyopy/python/moyopy/*.so
rm -rf moyopy/site
################################################################################
# Rust
################################################################################
[group('rust')]
test:
cargo test
[group('rust')]
doc:
cargo doc --open
[group('rust')]
upgrade:
cargo upgrade -i
[group('rust')]
[working-directory: 'moyo']
profile:
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --test test_moyo_dataset --root
################################################################################
# Python
################################################################################
[group('python')]
py-build:
uv run maturin develop --release --manifest-path moyopy/Cargo.toml
[group('python')]
py-install:
uv sync --all-extras --directory moyopy
[group('python')]
py-test:
python -m pytest -v moyopy/python/tests
[group('python')]
[working-directory: 'moyopy']
py-docs:
uv run zensical serve
################################################################################
# C
################################################################################
[group('c')]
[working-directory: 'moyoc']
c-build:
cmake -S . -B build
cmake --build build
[group('c')]
[working-directory: 'moyoc']
c-test: c-build
ctest --test-dir build --output-on-failure
[group('c')]
[working-directory: 'moyoc']
c-docs:
cbindgen --config cbindgen.toml --output build/moyoc.h
doxygen Doxyfile
uvx ford ford.md
uvx zensical serve
[group('c')]
[working-directory: 'moyoc']
c-clean:
rm -rf build
################################################################################
# JS (WASM)
################################################################################
[group('js')]
[working-directory: 'moyo-wasm']
js-install:
npm install
[group('js')]
[working-directory: 'moyo-wasm']
js-build:
npm run build
[group('js')]
[working-directory: 'moyo-wasm']
js-test:
npm test
# Generate the TypeDoc API reference, build the moyo-wasm doc site, and serve it.
[group('js')]
[working-directory: 'moyo-wasm']
js-docs: js-build
npm run docs
uvx zensical serve
################################################################################
# Web app (apps/web)
################################################################################
[group('web')]
[working-directory: 'apps/web']
web-install: js-build
npm install
[group('web')]
[working-directory: 'apps/web']
web-dev: js-build
npm run dev
[group('web')]
[working-directory: 'apps/web']
web-build:
npm run build
[group('web')]
[working-directory: 'apps/web']
web-preview: web-build
npm run preview
[group('web')]
[working-directory: 'apps/web']
web-test:
npm test
[group('web')]
[working-directory: 'apps/web']
web-check:
npm run check
################################################################################
# Landing hub (apps/landing)
################################################################################
[group('landing')]
[working-directory: 'apps/landing']
landing-build:
uv run zensical build --clean --strict
################################################################################
# All documents + viewer (apps/landing + moyopy + moyoc + apps/web)
#
# `docs` builds every doc site AND the web viewer, assembles them under
# apps/landing/site in the GitHub Pages layout (root = landing, /python = moyopy,
# /c = moyoc, /viewer = apps/web), then serves the bundle under the production
# base path at http://localhost:8000/moyo/ so every cross-interface link
# resolves locally exactly as it does in production.
#
# Prerequisites: wasm-pack + the wasm32-unknown-unknown Rust target, and the
# apps/web node deps installed once via `just web-install`.
################################################################################
# Build all doc sites + the viewer and assemble them under apps/landing/site.
[group('docs')]
docs-build:
cd moyo-wasm && npm run build
cd apps/web && VITE_BASE=/moyo/viewer/ npm run build
cd moyo-wasm && npm run docs && uvx zensical build --clean --strict
cd moyopy && uv run zensical build --clean --strict
cd apps/landing && uv run zensical build --clean --strict
cd moyoc && cbindgen --config cbindgen.toml --output build/moyoc.h && doxygen Doxyfile && uvx ford ford.md && uvx zensical build --clean --strict
rm -rf apps/landing/site/python apps/landing/site/c apps/landing/site/viewer apps/landing/site/js
cp -r moyopy/site apps/landing/site/python
cp -r moyoc/site apps/landing/site/c
cp -r apps/web/dist apps/landing/site/viewer
cp -r moyo-wasm/site apps/landing/site/js
# The site is mounted under /moyo/ (a gitignored symlink) so the local URL
# structure matches the GitHub Pages base path.
#
# Build everything, then serve the assembled hub at http://localhost:8000/moyo/.
[group('docs')]
docs: docs-build
rm -rf apps/landing/.preview
mkdir -p apps/landing/.preview
ln -sfn ../site apps/landing/.preview/moyo
@echo "Serving moyo docs hub at http://localhost:8000/moyo/"
python3 -m http.server -d apps/landing/.preview 8000