streamingfast / substreams-playground

Apache License 2.0
19 stars 11 forks source link

unavailable bin target for `cargo run` when following pancakeswap substreams instructions #10

Closed chamorin closed 2 years ago

chamorin commented 2 years ago

Following the steps for compiling the pancakeswap substreams modules I get this error:

error: a bin target must be available for `cargo run`

After running this command:

cargo run --target=wasm32-unknown --release

However running ./build-all.sh worked. Maybe it's a problem on my side, I'm not sure.

Tried with cargo 1.60.0

maoueh commented 2 years ago

Which steps ask to run cargo run? I would like to know to fix it if it's written somewhere because it's wrong.

Substreams are compiled to WASM using cargo build --target=wasm32-unknown-unknown --release and then executed on the server where the WASM is loaded and intrinsics from it are resolved. You cannot run a Substreams using cargo run, you must use substreams CLI and run it from there (which itself interacts with the server and ask it to run your Substreams).

Official documentation can be seen https://substreams.streamingfast.io/ which should give you enough information and where you can come here back. You can also jump on Discord for such help request.

chamorin commented 2 years ago

Here in the pancakeswap README.md

chamorin commented 2 years ago

I opened a PR