smartcontractkit/documentation

[Enhancement]: wasmvm instructions added to BIF docs

kylesmartin opened this issue · 0 comments

What would you like us to improve?

We need to add instructions to the BIF docs mentioning that some operating systems and architectures require users to download wasmvm, a BIF import, and add it to their lib folder.

Example addition:

For certain operating systems and architectures, you may need to install [wasmvm](https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm), a shared library that BIF imports. For example, on MacOS, you must install `​libwasmvm.dylib` using `wget https://raw.githubusercontent.com/CosmWasm/wasmvm/main/internal/api/libwasmvm.dylib` and move it to `/usr/local/lib` using `cp ​libwasmvm.dylib /usr/local/lib`.

How important it is?

These instructions are required for any operating systems and architectures that use the wasmvm shared library. Otherwise, the binary will throw an error like the following:

% ./bif

dyld[12148]: Library not loaded: @rpath/libwasmvm.dylib
  Referenced from: <3DE7D45D-876D-3626-9CB3-BF579FE86118> /Users/bwest/Work/Chainlink/tooling/DevX/binary/v0.0.2/x64/bif
  Reason: tried: '/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libwasmvm.dylib' (no such file), '/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/kylemartin/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.16.6/api/libwasmvm.dylib' (no such file), '/usr/local/lib/libwasmvm.dylib' (code signature in <5399CA85-1AE5-32A7-979C-E29264E4622C> '/usr/local/lib/libwasmvm.dylib' not valid for use in process: library load disallowed by system policy), '/usr/lib/libwasmvm.dylib' (no such file, not in dyld cache)
zsh: abort      ./bif