Closed joyosive closed 2 years ago
First must execute the build script in the simple_coin_transfer directory, which will generate the wasm file in question: https://github.com/spacemeshos/svm/blob/master/simple-coin-transfer-template/build.sh
I will caution that this repository will be undergoing very large changes in the coming months, so please do not regard its current design & implementation as stable or indicative of its future direction :)
Please let me know if this resolves your problem.
@WilfredTA thanks I acknowledge that this repository will undergo changes.
I executed the build script in the simple_coin_transfer directory, then executed cargo build
it was successful with a warning.
The cargo test
fails with following error
error: couldn't read crates/host/runtime/tests/wasm/runtime_calldata.wasm: No such file or directory (os error 2) --> crates/host/runtime/tests/runtime_tests.rs:133:26 133 WasmFile::Binary(include_bytes!("wasm/runtime_calldata.wasm")), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
In general, if this error appears anywhere, locate the parent directory of the missing file. There will likely be a build.sh
script that needs to be executed.
This should certainly be refactored so that a single command (e.g., a make
recipe) can be used to build all of the relevant script dependencies. Apologies for this friction when attempting to experiment with the svm.
Anyway, this is the build.sh file that should be run to address the latest error you've reported https://github.com/spacemeshos/svm/blob/master/crates/host/runtime/tests/wasm/calldata/build.sh
@WilfredTA Okay got it, make recipe will be great!
Thank you for helping out
Overview / Motivation
Trying to build svm project on local ubuntu 22.04
The Task
Rust nightly setup done from following link - https://doc.rust-lang.org/1.2.0/book/nightly-rust.html
Cloned [svm] -
git clone https://github.com/spacemeshos/svm.git
Executed build command -
cargo build
Error Output for cargo build -
Implementation Notes
Followed the project's readme