diff --git a/Cargo.lock b/Cargo.lock index 9870528a07c..6a140a5e033 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -365,7 +365,7 @@ dependencies = [ "regex", "serde", "serde_cbor", - "serde_derive", + "serde_derive 1.0.125 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json", "tinytemplate", "walkdir", @@ -1737,9 +1737,9 @@ checksum = "b18befed8bc2b61abc79a457295e7e838417326da1586050b919414073977f19" [[package]] name = "postcard" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9083a4e478606d952014ad10e2fad31c43030942cec1f2bf8f12d4cc7089e62d" +checksum = "c8863e251332eb18520388099b8b0acc4810ed6e602e3b6f674e8a46ba20e15c" dependencies = [ "heapless", "postcard-cobs", @@ -2108,10 +2108,8 @@ dependencies = [ [[package]] name = "serde" version = "1.0.125" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" dependencies = [ - "serde_derive", + "serde_derive 1.0.125", ] [[package]] @@ -2144,6 +2142,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_derive" +version = "1.0.125" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_derive" version = "1.0.125" diff --git a/Cargo.toml b/Cargo.toml index b81df2092ca..2b9165d2b5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,3 +56,6 @@ lto = true [profile.bench] debug = true debug-assertions = false + +[patch.crates-io] +serde = { path = "../Git/serde/serde" } diff --git a/ffi/capi/Cargo.toml b/ffi/capi/Cargo.toml index 2841f173ec0..68d44abba7a 100644 --- a/ffi/capi/Cargo.toml +++ b/ffi/capi/Cargo.toml @@ -37,7 +37,7 @@ skip_optional_dependencies = true denylist = ["bench", "wearos", "freertos", "x86tiny", "smaller_static", "malloc"] [lib] -crate-type = ["staticlib", "rlib", "cdylib"] +crate-type = ["staticlib"] path = "src/lib.rs" [features] diff --git a/ffi/cpp/examples/fixeddecimal_wasm/Makefile b/ffi/cpp/examples/fixeddecimal_wasm/Makefile index c41aa8e1a02..fee1305d0c7 100644 --- a/ffi/cpp/examples/fixeddecimal_wasm/Makefile +++ b/ffi/cpp/examples/fixeddecimal_wasm/Makefile @@ -15,11 +15,11 @@ $(ALL_HEADERS): -../../../../target/wasm32-unknown-emscripten/debug/libicu_capi.a: $(ALL_RUST) - cargo +nightly build -p icu_capi --target wasm32-unknown-emscripten -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort +../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a: $(ALL_RUST) + RUSTFLAGS="-Cpanic=abort" cargo +nightly build --release -p icu_capi --target wasm32-unknown-emscripten -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort # Currently this doesn't run successfully, however it's the status quo of compiling ICU4X in C++ to WASM -main.html: ../../../../target/wasm32-unknown-emscripten/debug/libicu_capi.a $(ALL_HEADERS) test.cpp - emcc -std=c++17 test.cpp ../../../../target/wasm32-unknown-emscripten/debug/libicu_capi.a -ldl -lpthread -lm -g -o main.html --emrun -sWASM=1 +main.html: ../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a $(ALL_HEADERS) test.cpp + emcc -std=c++17 test.cpp ../../../../target/wasm32-unknown-emscripten/release/libicu_capi.a -ldl -lpthread -lm -g -o main.html --emrun -sWASM=1 build: main.html diff --git a/ffi/cpp/examples/fixeddecimal_wasm/test.cpp b/ffi/cpp/examples/fixeddecimal_wasm/test.cpp index d6ea355bed9..2eba355913b 100644 --- a/ffi/cpp/examples/fixeddecimal_wasm/test.cpp +++ b/ffi/cpp/examples/fixeddecimal_wasm/test.cpp @@ -7,8 +7,8 @@ #include extern "C" void diplomat_init(); -extern "C" void trace_js(char* s) { - std::cout<<"TRACE: " <