Skip to content

Commit

Permalink
Use .wat instead of .wasm in tree (#5282)
Browse files Browse the repository at this point in the history
Fixes #5194
  • Loading branch information
sffc authored Jul 24, 2024
1 parent 1ac5262 commit e0ed5ac
Show file tree
Hide file tree
Showing 9 changed files with 14,302 additions and 4 deletions.
38 changes: 38 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ toml = "0.5.8"
ureq = "2.3.0"
walkdir = "2.3.2"
wasmi = "0.31.2"
wat = "1"

# Size optimized builds
[profile.release-opt-size]
Expand Down
3 changes: 2 additions & 1 deletion components/collections/codepointtrie_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ independent = true
[features]
# Use the wasm builder
default = ["wasm"]
wasm = ["dep:wasmi"]
wasm = ["dep:wasmi", "dep:wat"]
# Use the ICU4C builder
# needs the ICU4C_LIB_PATH variable set and pointing to an ICU4C lib folder
# containing dylibs. If you want to use staticlibs, set ICU4C_LINK_STATICALLY.
Expand All @@ -42,6 +42,7 @@ icu4c = []
icu_collections = { workspace = true, features = ["serde"] }
zerovec = { workspace = true }
wasmi = { workspace = true, optional = true }
wat = { workspace = true, optional = true }

[dev-dependencies]
icu = { path = "../../icu" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
list_to_ucptrie
list_to_ucptrie.wasm
list_to_ucptrie.wat
ucptrie_wrap.wasm
icu4c_obj/
wasm_obj/
5 changes: 5 additions & 0 deletions components/collections/codepointtrie_builder/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

ICU4C_SOURCE ?= $(HOME)/icu/icu4c/source
CXX := clang++
WASM2WAT := wasm2wat

.PHONY: all clean
all: ucptrie_wrap.wasm
Expand Down Expand Up @@ -74,8 +75,12 @@ ucptrie_wrap.wasm: $(wasm_obj_files)
-I$(ICU4C_SOURCE)/common \
-I$(ICU4C_SOURCE)/tools/toolutil \
$(wasm_obj_files) \
-g \
-o ucptrie_wrap.wasm

%.wat: %.wasm
$(WASM2WAT) $< -o $@

clean:
rm -rf wasm_obj
rm -f ucptrie_wrap.wasm
6 changes: 5 additions & 1 deletion components/collections/codepointtrie_builder/cpp/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e0ed5ac

Please sign in to comment.