-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
52 lines (41 loc) · 1.32 KB
/
Justfile
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
ghp_branch:='gh-pages'
ghp_dir:='ghp'
index_redirect_html:='<html><head><meta http-equiv="refresh" content="0; url=plasma/index.html"></head><body><a href="plasma/index.html">Redirect</a></body></html>'
# Checkout github pages branch into ghp directory
co-ghp:
mkdir "{{ghp_dir}}" && \
cd "{{ghp_dir}}" && \
git init && \
git remote add -t {{ghp_branch}} -f origin git@github.com:royaltm/rust-plasma.git && \
git checkout {{ghp_branch}}
# Generate Rust and TS documentation
doc: cargo-doc ts-doc
# Udpate github pages directory content
update-ghp: doc
rm -rf web/dist
just web/webpack
mkdir -p "{{ghp_dir}}/master"
rsync -rvah --delete target/doc/ "{{ghp_dir}}/master/rust"
@echo '{{index_redirect_html}}' >"{{ghp_dir}}/master/rust/index.html"
rsync -rvah --delete web/doc/ "{{ghp_dir}}/master/ts"
rm -vf "{{ghp_dir}}/"*.{wasm,js}
rsync -rvah --include '*.js' --include '*.wasm' --exclude '*' web/dist/ "{{ghp_dir}}"
# Generate Rust documentation
cargo-doc:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps -p plasma
# Generate TypeScript documentation
ts-doc:
just web/all
just web/doc
test:
just plasma/test
bench:
just plasma/bench
clean:
just desktop/clean
# Compile and run desktop plasma
run:
just desktop/run
# Compile and run desktop plasma with SIMD
run-simd:
just desktop/run-simd