Skip to content

Commit

Permalink
fixup! fixup! fixup! build wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 1, 2024
1 parent 3f6fa7e commit 54e760c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ EXTRA_DIST += $(REL_SPEC) $(REL_SPEC_NVIM) $(REL_SPEC_SILE)

typst: typst/decasify.wasm

_RUST_OUT_TYPST = @builddir@/target/@RUST_TARGET_SUBDIR@/.cargo_out_dir

typst/decasify.wasm: CARGO_TARGET_TRIPLE = wasm32-unknown-unknown
typst/decasify.wasm: CARGO_WASM_DIR = @builddir@/target/$(CARGO_TARGET_TRIPLE)
typst/decasify.wasm: CARGO_FEATURE_ARGS =
typst/decasify.wasm:
$(CARGO_ENV) $(CARGO) build $(CARGO_VERBOSE) $(CARGO_FEATURE_ARGS) $(CARGO_RELEASE_ARGS) --target $(CARGO_TARGET_TRIPLE) -p typst
$(CARGO_ENV) $(CARGO) build --target $(CARGO_TARGET_TRIPLE) --quiet --message-format=json $(CARGO_FEATURE_ARGS) $(CARGO_RELEASE_ARGS) | \
$(JQ) -sr 'map(select(.reason == "build-script-executed")) | last | .out_dir' > $(_RUST_OUT_TYPST)
$(WASMOPT) -Oz $$(cat $(_RUST_OUT_TYPST))/typst/@[email protected] -o typst/@TRANSFORMED_PACKAGE_NAME.wasm
$(WASMOPT) -Oz $(CARGO_WASM_DIR)/typst.wasm -o typst/$(TRANSFORMED_PACKAGE_NAME).wasm

check: busted pytest

Expand Down

0 comments on commit 54e760c

Please sign in to comment.