From a3452bbf652fbf7723d2df99115e5417f664c147 Mon Sep 17 00:00:00 2001 From: Abdelrahman Ashraf Date: Thu, 18 Apr 2024 22:19:04 +0700 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20upgrade=20dependencies?= =?UTF-8?q?=20[emsdk@v3.1.57=20-=20uniffi-bindgen-cpp@v0.6.0+v0.25.0]=20(#?= =?UTF-8?q?133)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): 🤖 upgrade emsdk@3.1.57 * chore: 🤖 run npm install after emsdk setup * chore(deps): 🤖 upgrade uniffi-bindgen-cpp@v0.6.0+v0.25.0 * chore: 🤖 fix typo --- .mac-setup.sh | 4 +++- Makefile | 6 +++--- deps/modules/emsdk | 2 +- dotlottie-ffi/Cargo.toml | 4 ---- dotlottie-ffi/emscripten_bindings.cpp | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.mac-setup.sh b/.mac-setup.sh index 4af4b56d..81f08c2e 100755 --- a/.mac-setup.sh +++ b/.mac-setup.sh @@ -11,7 +11,7 @@ NC=$(tput sgr0) # Environment EMSDK_VERSION=${EMSDK_VERSION:-latest} -UNIFFI_BINDGEN_CPP_VERSION=${UNIFFI_BINDGEN_CPP_VERSION:-"v0.5.0+v0.25.0"} +UNIFFI_BINDGEN_CPP_VERSION=${UNIFFI_BINDGEN_CPP_VERSION:-"v0.6.0+v0.25.0"} die() { printf %s "${@+$@$'\n'}" 1>&2 ; exit 1; } @@ -85,6 +85,8 @@ echo "Setting up emsdk" cd "${SCRIPT_DIR}/deps/modules/emsdk" || die "Could not find Emscripten SDK under ${RED}deps/modules/emsdk${NC}!" ./emsdk install "${EMSDK_VERSION}" ./emsdk activate "${EMSDK_VERSION}" +cd "${SCRIPT_DIR}/deps/modules/emsdk/upstream/emscripten" || die "Could not find Emscripten under ${RED}deps/modules/emsdk/upstream/emscripten${NC}!" +npm install echo echo "Disabling unneeded webp features" diff --git a/Makefile b/Makefile index 7e01330c..3a7f1ed7 100644 --- a/Makefile +++ b/Makefile @@ -94,11 +94,11 @@ WASM_BUILD := $(BUILD)/$(WASM) EMSDK := emsdk EMSDK_DIR := $(PROJECT_DIR)/$(DEPS_MODULES_DIR)/$(EMSDK) -EMSDK_VERSION := 3.1.51 +EMSDK_VERSION := 3.1.57 EMSDK_ENV := emsdk_env.sh UNIFFI_BINDGEN_CPP := uniffi-bindgen-cpp -UNIFFI_BINDGEN_CPP_VERSION := v0.5.0+v0.25.0 +UNIFFI_BINDGEN_CPP_VERSION := v0.6.0+v0.25.0 WASM_MODULE := DotLottiePlayer @@ -260,7 +260,7 @@ cpp_link_args = [ '-sDYNAMIC_EXECUTION=0', '--no-entry', '--strip-all', - '--embind-emit-tsd=${WASM_MODULE}.d.ts', + '--emit-tsd=${WASM_MODULE}.d.ts', '--minify=0'] [host_machine] diff --git a/deps/modules/emsdk b/deps/modules/emsdk index e10826f9..229d83fc 160000 --- a/deps/modules/emsdk +++ b/deps/modules/emsdk @@ -1 +1 @@ -Subproject commit e10826f9196bb0e704014af2252ef58fb4ba261b +Subproject commit 229d83fc706e10a39d4948a804cbbf17225cdda0 diff --git a/dotlottie-ffi/Cargo.toml b/dotlottie-ffi/Cargo.toml index cf6c4509..18657222 100644 --- a/dotlottie-ffi/Cargo.toml +++ b/dotlottie-ffi/Cargo.toml @@ -20,15 +20,11 @@ name = "uniffi-bindgen" path = "uniffi-bindgen.rs" [dependencies] -# uncomment uniffi v0.25.3 when building with uniffi-cpp-bindgen targetting C++/WASM -# uniffi = { version = "0.25.3", features = ["cli"] } uniffi = { version = "0.27.1", features = ["cli"] } dotlottie_player = { path = "../dotlottie-rs" } dotlottie_fms = { path = "../dotlottie-fms" } cfg-if = "1.0" [build-dependencies] -# uncomment uniffi v0.25.3 when building with uniffi-cpp-bindgen targetting C++/WASM -# uniffi = { version = "0.25.3", features = ["build"] } uniffi = { version = "0.27.1", features = ["build"] } lazy_static = "1.4" diff --git a/dotlottie-ffi/emscripten_bindings.cpp b/dotlottie-ffi/emscripten_bindings.cpp index 7071f65e..9d8ccb1f 100644 --- a/dotlottie-ffi/emscripten_bindings.cpp +++ b/dotlottie-ffi/emscripten_bindings.cpp @@ -29,18 +29,18 @@ EMSCRIPTEN_BINDINGS(DotLottiePlayer) // register_vector("VectorManifestAnimation"); enum_("Mode") - .value("Forward", Mode::FORWARD) - .value("Reverse", Mode::REVERSE) - .value("Bounce", Mode::BOUNCE) - .value("ReverseBounce", Mode::REVERSE_BOUNCE); + .value("Forward", Mode::kForward) + .value("Reverse", Mode::kReverse) + .value("Bounce", Mode::kBounce) + .value("ReverseBounce", Mode::kReverseBounce); enum_("Fit") - .value("Contain", Fit::CONTAIN) - .value("Cover", Fit::COVER) - .value("Fill", Fit::FILL) - .value("FitWidth", Fit::FIT_WIDTH) - .value("FitHeight", Fit::FIT_HEIGHT) - .value("None", Fit::NONE); + .value("Contain", Fit::kContain) + .value("Cover", Fit::kCover) + .value("Fill", Fit::kFill) + .value("FitWidth", Fit::kFitWidth) + .value("FitHeight", Fit::kFitHeight) + .value("None", Fit::kNone); value_object("Layout") .field("fit", &Layout::fit)