@libwebp-wasm/gif2webp

1.0.5 • Public • Published

Gif2Webp

Introduction

The process of converting the libwebp project from C/C++ to WASM is achieved using the Emscripten compiler. The general workflow is as follows:

Emscripten Compilation Flow

Usage

Installation

Toolchain

This includes installing emsdk, cmake, and pnpm. For specific installation methods, refer to the Emscripten official documentation, pnpm official documentation, and installing cmake.

submodule

git submodule update --init --recursive --remote --rebase

Build

MacOS

If you are using zsh, it is recommended to install the dotenv plugin to enable features like setting environment variables if a .env file is present in the current directory.

pnpm build:mac

Docker

Build Image
docker build -f ./docker/Dockerfile -t libwebp-wasm/gif2webp:latest .
Run Image
docker run --rm  -v $(pwd)/dist:/gif2webp/dist -v $(pwd)/es:/gif2webp/es -v $(pwd)/lib:/gif2webp/lib libwebp-wasm/gif2webp

Other

Note: The modification of upstream submodule project code is currently done by running the git apply command. Sometimes you need to commit your own changes in the submodule directory and manually generate the patch.

pnpm build:patch

Example

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @libwebp-wasm/gif2webp

Weekly Downloads

5

Version

1.0.5

License

MIT

Unpacked Size

2.16 MB

Total Files

11

Last publish

Collaborators

  • liuliangsir