Skip to content

Commit

Permalink
Add xsvm VM
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Sep 19, 2023
1 parent 53eb9c7 commit 2f8eb4d
Show file tree
Hide file tree
Showing 47 changed files with 3,845 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/build_xsvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -euo pipefail

if ! [[ "$0" =~ scripts/build_xsvm.sh ]]; then
echo "must be run from repository root"
exit 255
fi

source ./scripts/constants.sh

PLUGIN_FILENAME="v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH"

# Set the PATHS
GOPATH="$(go env GOPATH)"
if [[ $# -eq 1 ]]; then
BINARY_DIRECTORY=$1
elif [[ $# -eq 0 ]]; then
BINARY_DIRECTORY="${GOPATH}/src/github.com/ava-labs/avalanchego/build/plugins/${PLUGIN_FILENAME}"
else
echo "Invalid arguments to build xsvm. Requires either no arguments (default) or one arguments to specify plugin location."
exit 1
fi

echo "Building xsvm plugin into ${BINARY_DIRECTORY}"
go build -o "${BINARY_DIRECTORY}" ./vms/example/xsvm/cmd/xsvm/

echo "Symlinking ${BINARY_DIRECTORY} to ./build/xsvm"
ln -sf "${BINARY_DIRECTORY}" ./build/xsvm
Loading

0 comments on commit 2f8eb4d

Please sign in to comment.