substreams 0.0.7-beta

Substreams SDK - A streaming data engine for The Graph - by StreamingFast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{env, io::Result, path::Path};
fn main() -> Result<()> {
    let out_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
    let path = Path::new(&out_dir).join("..").join("..").join("proto");
    println!("Proto path {:?}", &path);

    println!("cargo:rerun-if-changed=../../proto");

    let mut prost_build = prost_build::Config::new();
    prost_build.out_dir("./src/pb");
    prost_build.compile_protos(
        &["sf/substreams/v1/substreams.proto"],
        &["../../proto", "../../../proto"],
    )
}