elvwasm

Crates.ioelvwasm
lib.rselvwasm
version1.0.0
sourcesrc
created_at2023-04-05 16:21:49.723877
updated_at2023-04-05 16:21:49.723877
descriptionContains and collects the bitcode extension API for the Eluvio content fabric
homepagehttps://eluvio.co/
repositoryhttps://github.com/eluv-io/elv-wasm
max_upload_size
id831218
size94,355
(JanFalkin)

documentation

README

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

Commit count: 188

cargo fmt