mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 07:58:28 +02:00
🎉 Support for webp images (#6665)
This commit is contained in:
parent
8c337f508b
commit
ed76b1b1ee
7 changed files with 12 additions and 10 deletions
8
render-wasm/Cargo.lock
generated
8
render-wasm/Cargo.lock
generated
|
@ -480,9 +480,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "skia-bindings"
|
name = "skia-bindings"
|
||||||
version = "0.81.0"
|
version = "0.86.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0974d1fad6818b1c84390a8cd26b48a4f48f1dfd2658e130fb0db5ebbb50aa1c"
|
checksum = "fbcd02d7008cdc4ac86b7d7461874c7ac1d2c38cad96629d7617c5d4b848acd0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"cc",
|
"cc",
|
||||||
|
@ -496,9 +496,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "skia-safe"
|
name = "skia-safe"
|
||||||
version = "0.81.0"
|
version = "0.86.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0cade7bc92e092138e3b726ce57162b3e0f4f3099c616b32af740a13ca18cb2a"
|
checksum = "008dec8a6b69f03b2a0bc4520dc06a7a8efc844e59b2a9bc024f0cb02fb60b63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
|
|
@ -20,11 +20,12 @@ path = "src/main.rs"
|
||||||
base64 = "0.22.1"
|
base64 = "0.22.1"
|
||||||
gl = "0.14.0"
|
gl = "0.14.0"
|
||||||
indexmap = "2.7.1"
|
indexmap = "2.7.1"
|
||||||
skia-safe = { version = "0.81.0", default-features = false, features = [
|
skia-safe = { version = "0.86.0", default-features = false, features = [
|
||||||
"gl",
|
"gl",
|
||||||
"svg",
|
"svg",
|
||||||
"textlayout",
|
"textlayout",
|
||||||
"binary-cache",
|
"binary-cache",
|
||||||
|
"webp"
|
||||||
] }
|
] }
|
||||||
uuid = { version = "1.11.0", features = ["v4", "js"] }
|
uuid = { version = "1.11.0", features = ["v4", "js"] }
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ EMCC_CFLAGS="--no-entry \
|
||||||
-sMAX_WEBGL_VERSION=2 \
|
-sMAX_WEBGL_VERSION=2 \
|
||||||
-sMODULARIZE=1 \
|
-sMODULARIZE=1 \
|
||||||
-sEXPORT_NAME=createRustSkiaModule \
|
-sEXPORT_NAME=createRustSkiaModule \
|
||||||
-sEXPORTED_RUNTIME_METHODS=GL,stringToUTF8 \
|
-sEXPORTED_RUNTIME_METHODS=GL,stringToUTF8,HEAPU8,HEAPU32,HEAPF32 \
|
||||||
-sEXPORT_ES6=1"
|
-sEXPORT_ES6=1"
|
||||||
|
|
||||||
export EM_CACHE="/tmp/emsdk_cache";
|
export EM_CACHE="/tmp/emsdk_cache";
|
||||||
|
|
|
@ -9,7 +9,7 @@ pushd $_SCRIPT_DIR;
|
||||||
. ./_build_env
|
. ./_build_env
|
||||||
|
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.81.0-3/skia-binaries-24dee32a277b6c7b5357-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache.tar.gz"}
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||||
|
|
||||||
cargo build $_CARGO_PARAMS
|
cargo build $_CARGO_PARAMS
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ fi
|
||||||
. ./_build_env
|
. ./_build_env
|
||||||
|
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.81.0-3/skia-binaries-24dee32a277b6c7b5357-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache.tar.gz"}
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||||
|
|
||||||
|
|
||||||
ALLOWED_RULES="-D static_mut_refs"
|
ALLOWED_RULES="-D static_mut_refs"
|
||||||
|
|
|
@ -6,7 +6,7 @@ pushd $_SCRIPT_DIR;
|
||||||
|
|
||||||
. ./_build_env
|
. ./_build_env
|
||||||
|
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.81.0-3/skia-binaries-24dee32a277b6c7b5357-x86_64-unknown-linux-gnu-gl-svg-textlayout-binary-cache.tar.gz"}
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-x86_64-unknown-linux-gnu-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"x86_64-unknown-linux-gnu"};
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"x86_64-unknown-linux-gnu"};
|
||||||
|
|
||||||
cargo test --bin render_wasm -- --show-output
|
cargo test --bin render_wasm -- --show-output
|
||||||
|
|
|
@ -7,7 +7,8 @@ pushd $_SCRIPT_DIR;
|
||||||
. ./_build_env
|
. ./_build_env
|
||||||
|
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.81.0-3/skia-binaries-24dee32a277b6c7b5357-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache.tar.gz"}
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||||
|
|
||||||
|
|
||||||
pushd $_SCRIPT_DIR;
|
pushd $_SCRIPT_DIR;
|
||||||
cargo watch \
|
cargo watch \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue