Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project fails to build due to wasm-demo crate #1392

Closed
fmoletta opened this issue Aug 23, 2023 · 0 comments · Fixed by #1393
Closed

Project fails to build due to wasm-demo crate #1392

fmoletta opened this issue Aug 23, 2023 · 0 comments · Fixed by #1393
Labels
bug Something isn't working

Comments

@fmoletta
Copy link
Contributor

fmoletta commented Aug 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant