Closed
Description
Describe the bug
The wasm-demo crate imports a compiled json file using include_bytes
macro, causing its build to fail if the file is not present. This causes the build
target to fail.
To Reproduce
1- Clone the repo
2- Run make deps
/make deps-macos
(Optional)
3- Run make build
4- See error
cargo build --release
Compiling wasm-demo v0.8.6 (/Users/federica/cairo-vm/examples/wasm-demo)
error: couldn't read examples/wasm-demo/src/./array_sum.json: No such file or directory (os error 2)
--> examples/wasm-demo/src/lib.rs:30:33
|
30 | const PROGRAM_JSON: &[u8] = include_bytes!("./array_sum.json");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
Expected behavior
Running make build
should build the repo without failing
What version/commit are you on?
commit 2d214f7
(After v0.8.6)
Additional context
Compiling cairo files shouldn't be a prerequisite to build the project