Skip to content

Commit

Permalink
chore: πŸ€– upgrade dependencies [[email protected] - uniffi-bindgen-cpp@v0.…
Browse files Browse the repository at this point in the history
…6.0+v0.25.0] (#133)

* chore(deps): πŸ€– upgrade [email protected]

* chore: πŸ€– run npm install after emsdk setup

* chore(deps): πŸ€– upgrade [email protected]+v0.25.0

* chore: πŸ€– fix typo
  • Loading branch information
theashraf authored Apr 18, 2024
1 parent 5ed5fbc commit a3452bb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .mac-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion deps/modules/emsdk
4 changes: 0 additions & 4 deletions dotlottie-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
20 changes: 10 additions & 10 deletions dotlottie-ffi/emscripten_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ EMSCRIPTEN_BINDINGS(DotLottiePlayer)
// register_vector<ManifestAnimation>("VectorManifestAnimation");

enum_<Mode>("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>("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>("Layout")
.field("fit", &Layout::fit)
Expand Down

0 comments on commit a3452bb

Please sign in to comment.