-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 846 Bytes
/
Makefile
File metadata and controls
29 lines (23 loc) · 846 Bytes
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
setup: install-extism
rustup target add wasm32-unknown-unknown
cargo install wasm-opt
# Build with optimizations and minimal size
build:
cargo build --release --features extism --target wasm32-unknown-unknown
wasm-opt -Oz -o ./target/wasm32-unknown-unknown/release/diff_html.wasm ./target/wasm32-unknown-unknown/release/diff_html_rs.wasm
# Clean build artifacts
clean:
cargo clean
# Install Extism CLI if not present
install-extism:
which extism || curl -fsSL https://extism.org/install.sh | bash
# Clean build artifacts
clean:
cargo clean
rm -f diff_html_rs.wasm
.PHONY: build clean install-extism test tag
# Create git tag from Cargo.toml version and push to remote
tag:
@version=$$(grep -m 1 '^version =' Cargo.toml | awk -F'"' '{print $$2}') && \
git tag -a v$$version -m "Version $$version" && \
git push origin v$$version