A shared library for crypto operations in Lightspark's SDKs.
Generated via wasm-packing lightspark-crypto-uniffi.
Currently only can be used in Node environments, so if you are using this in Lightspark SDK, make sure to only import using dynamic imports after checking the environment.
sync.sh script will wasm-pack the lightspark-crypto-uniffi lib and copy over the files to this package.
- Clone webdev into
- Clone lightspark-crypto-uniffi into
- Install rust and wasm-pack. Note rustup is recommended instead of homebrew for installing rust - homebrew requires extra configuration that is not guarenteed to work for all configurations.
cd ~/src/lightspark-crypto-uniffi && cargo install --path .
⚠️If you are using an M1 chip macbook, you will need to run the x86_64 toolchain:
# Note - this is going to install and use a separate instance of homebrew than you probably already have installed that installs into /usr/local/bin instead of /opt/homebrew/bin. For M1 macs the default is /opt/homebrew/bin - read more about why this is necessary [here](https://earthly.dev/blog/homebrew-on-m1/). arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" arch -x86_64 /usr/local/bin/brew install llvm export PATH="/usr/local/opt/llvm/bin:$PATH" # add this to your shell profile too so it's sourced automatically