Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .wat instead of .wasm in tree #5282

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

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

Loading