#content #fabric #api-bindings #wasm-client #eluvio

elvwasm

Contains and collects the bitcode extension API for the Eluvio content fabric

1 stable release

1.0.0 Apr 5, 2023

#818 in WebAssembly

Apache-2.0 and GPL-3.0-only

81KB
1.5K SLoC

Eluvio Fabric WASM Client Library

Installing

Install nvm and nodejs

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm install 14.7.0

Install Assemblyscript

npm i assemblyscript

Install Rust and add nightly toolchain and wasm32 targets

curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup toolchain install nightly
rustup update
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup default nightly

Install Tinygo

For Linux

wget https://github.com/tinygo-org/tinygo/releases/download/v0.27.0/tinygo_0.27.0_amd64.deb
sudo dpkg -i tinygo_0.27.0_amd64.deb

Alternately, for macos, run

brew tap tingo-org/tools
brew install tinygo

Building

Rust

If you do not use nightly rust by default, you can add +nightly between cargo and build in order to use nightly rust to build this. Otherwise, the below command suffices.

cargo build --target wasm32-unknown-unknown --release --workspace

Programming interface

API

Dependencies

~3.5–9.5MB
~89K SLoC