Install

View Creator (also referred to as Viewkit) is the developer-facing toolchain for defining, packaging, and deploying Shinzo Views. It provides a workflow for turning raw indexed blockchain data into reusable, versioned data APIs that can be executed and served by Hosts.

Prerequisites

  • Git
  • Make
  • Go 1.25

Setup

  1. Make sure you've got all the prerequisites installed properly:

    git --version && make --version && go version
    
    git version 2.43.0
    GNU Make 4.3
    [...]
    go version go1.25.12 linux/arm64
    
  2. Clone the repository:

    git clone https://github.com/shinzonetwork/shinzo-view-creator.git
    cd shinzo-view-creator
    
  3. Build the viewkit binary:

    make build
    

    You should see a build directory:

  4. Run Viewkit:

    ./build/viewkit --help
    
    Viewkit helps you initialize, manage, and publish Shinzo views through a simple CLI interface.
    
    Usage:
      viewkit [command]
    
    [...]
    
  5. Move the viewkit executable somewhere resonable and (optional):

    sudo mv ./build/viewkit /usr/local/bin
    

    Now you can run viewkit from anywhere.

Wasmer runtime

Viewkit can execute WebAssembly lenses locally to validate and preview them.

Under the hood, it uses wasmer-go, which depends on a native dynamic library (libwasmer.dylib). If your local system cannot find that library, any command that touches lenses will fail with an error like:

image not found library not loaded: libwasmer.dylib

  1. Move back into the shinzo-view-creator repo if you moved out of it:

    cd shinzo-view-creator
    
  2. Install the Wasmer Go module

    go get github.com/wasmerio/[email protected]
    
    go: downloading github.com/wasmerio/wasmer-go v1.0.4
    go: added github.com/wasmerio/wasmer-go v1.0.4
    

    This ensures wasmer-go and its packaged native libraries are present in your GOPATH.

Environment variables

We need to set three new environment variables:

  • WASMER_ROOT: points to the directory where libwasmer.dylib lives.
  • WASMER_LIB_PATH: used by wasmer-go to find the dynamic library.
  • DYLD_LIBRARY_PATH: MacOS-specific dynamic loader search path. We prepend WASMER_ROOT so the loader can find libwasmer.dylib when viewkit starts.
  1. Append these lines to your shell's RC file.

    MacOS:

    echo 'export WASMER_ROOT="$(go env GOPATH)/pkg/mod/github.com/wasmerio/[email protected]/wasmer/packaged/lib/darwin-aarch64"' >> ~/.zshrc
    echo 'export WASMER_LIB_PATH="$WASMER_ROOT"' >> ~/.zshrc
    echo 'export DYLD_LIBRARY_PATH="$WASMER_ROOT:$DYLD_LIBRARY_PATH"' >> ~/.zshrc
    

    Linux:

    echo 'export WASMER_ROOT="$(go env GOPATH)/pkg/mod/github.com/wasmerio/[email protected]/wasmer/packaged/lib/linux-amd64"' >> ~/.zshrc
    echo 'export WASMER_LIB_PATH="$WASMER_ROOT"' >> ~/.zshrc
    echo 'export LD_LIBRARY_PATH="$WASMER_ROOT:$LD_LIBRARY_PATH"' >> ~/.zshrc
    
  2. Reload your shell configuration:

    source ~/.zshrc
    
  3. Verify that the variables are set:

    echo "$WASMER_ROOT"
    ls "$WASMER_ROOT"
    
    /home/user/go/pkg/mod/github.com/wasmerio/[email protected]/wasmer/packaged/lib/linux-amd64
    dummy.go  libwasmer.so
    

[!WARNING] If libwasmer.dylib is missing, re-run the go get step and ensure go env GOPATH returns a valid path.