remotebuild

command module
v0.0.0-...-fb56102 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

Remote build

Getting started

Build the docker file locally
docker build -f Dockerfile.remotebuild -t remote-build .
Run the docker file locally
docker run --rm --publish 9000:9000 remote-build
Build request from client
cd examples
# then with any of your substreams that you have zipped up: zip -r substreams.zip ./substreams
go run main.go substreams.zip

The remote build needs some prerequisite files:

  • substreams.yaml (this is the building block and the core of your substreams, you need to have this)
  • Cargo.toml (this will contain all the dependencies that we will install and that are needed for your substreams)
  • proto/all_of_your_protos (a directory containing all the protobuf files which you are using in your substreams)
  • src/ (folder containing the content of your substreams)
  • Makefile (ideally you need to have the build and the package command)

Here is an example of a valid Makefile

.PHONY: protogen
protogen:
	substreams protogen ./substreams.yaml --exclude-paths="google,sf/substreams,substreams/sink/kv,database.proto"

.PHONY: build
build: protogen
	cargo build --target wasm32-unknown-unknown --release

.PHONE: package
package: build
	substreams pack -o substreams.spkg substreams.yaml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL