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

Don't build wasm-demo in build target + ci job to run the wasm demo #1393

Merged
merged 26 commits into from
Aug 29, 2023

Conversation

fmoletta
Copy link
Member

Aims to fix #1392 .

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@fmoletta fmoletta changed the title Don't built wasm-demo in build targets + add target & ci job to run the wasm demo Don't build wasm-demo in build targets + add target & ci job to run the wasm demo Aug 23, 2023
@fmoletta fmoletta changed the title Don't build wasm-demo in build targets + add target & ci job to run the wasm demo Don't build wasm-demo in build target + add target & ci job to run the wasm demo Aug 23, 2023
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #1393 (1abeda0) into main (d2b9b07) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1393   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files          94       94           
  Lines       38635    38635           
=======================================
  Hits        37463    37463           
  Misses       1172     1172           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 4.106 ± 0.026 4.083 4.160 1.00
head big_factorial 4.112 ± 0.039 4.091 4.218 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 3.455 ± 0.012 3.445 3.485 1.00
head big_fibonacci 3.462 ± 0.024 3.443 3.528 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 9.665 ± 0.051 9.619 9.804 1.00
head blake2s_integration_benchmark 9.666 ± 0.037 9.630 9.735 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 3.547 ± 0.015 3.532 3.578 1.00 ± 0.01
head compare_arrays_200000 3.540 ± 0.010 3.530 3.563 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.371 ± 0.070 2.343 2.569 1.01 ± 0.03
head dict_integration_benchmark 2.359 ± 0.019 2.340 2.395 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.796 ± 0.085 1.726 1.936 1.04 ± 0.05
head field_arithmetic_get_square_benchmark 1.730 ± 0.002 1.726 1.733 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.628 ± 0.291 9.496 10.441 1.01 ± 0.03
head integration_builtins 9.518 ± 0.020 9.486 9.551 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.796 ± 0.017 9.759 9.817 1.00
head keccak_integration_benchmark 9.860 ± 0.099 9.757 10.050 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 3.506 ± 0.015 3.489 3.533 1.00
head linear_search 3.529 ± 0.054 3.492 3.673 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.592 ± 0.004 2.582 2.596 1.00
head math_cmp_and_pow_integration_benchmark 2.592 ± 0.005 2.584 2.599 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.311 ± 0.006 2.305 2.323 1.00
head math_integration_benchmark 2.312 ± 0.007 2.302 2.323 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.052 ± 0.008 2.043 2.071 1.00
head memory_integration_benchmark 2.061 ± 0.027 2.044 2.137 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.268 ± 0.018 2.256 2.318 1.00
head operations_with_data_structures_benchmarks 2.269 ± 0.028 2.251 2.347 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 807.1 ± 18.5 798.9 859.8 1.01 ± 0.02
head pedersen 800.5 ± 0.9 799.4 802.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.531 ± 0.069 1.492 1.674 1.03 ± 0.05
head poseidon_integration_benchmark 1.487 ± 0.005 1.483 1.500 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.831 ± 0.004 2.828 2.839 1.00
head secp_integration_benchmark 2.845 ± 0.005 2.838 2.853 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.672 ± 0.069 1.626 1.815 1.00
head set_integration_benchmark 1.676 ± 0.048 1.648 1.810 1.00 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 6.347 ± 0.058 6.308 6.497 1.00 ± 0.01
head uint256_integration_benchmark 6.330 ± 0.017 6.306 6.369 1.00

@fmoletta fmoletta marked this pull request as ready for review August 23, 2023 18:43
Makefile Outdated
Comment on lines 312 to 313
npm install live-server && \
npx live-server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new deps AFAICT. We should add them both to our deps targets/scripts and to the docs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dependencies are only needed for the wasm-demo, which is not an integral part of the project, so I wouldn't force its dependencies for any user of the project (the main purpose of this PR is to separate it's build from the project's build). There is a separate README with instructions on how to build & run the demo, and its dependencies, so we could remove this target altogether

@fmoletta fmoletta changed the title Don't build wasm-demo in build target + add target & ci job to run the wasm demo Don't build wasm-demo in build target + ci job to run the wasm demo Aug 24, 2023
@fmoletta fmoletta mentioned this pull request Aug 24, 2023
6 tasks
@@ -6,6 +6,11 @@ members = [
"hint_accountant",
"examples/wasm-demo",
]
default-members = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check @fmoletta
Why are we adding this default-members?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem we want to fix is that the build fails due to the wasm-demo needing the compiled cairo files in order to build.
Someone that wants to build the cairo-vm crate shouldn't have to compile a cairo file in order to build a demo for the vm crate to build.
Therefore, by setting the default members we can build the core crates (vm, cli & felt) with cargo/make build without building the wasm demo and running into compilation errors

Copy link
Member

@pefontana pefontana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@pefontana pefontana added this pull request to the merge queue Aug 29, 2023
Merged via the queue into main with commit 722b2e2 Aug 29, 2023
39 checks passed
@pefontana pefontana deleted the fix-build branch August 29, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project fails to build due to wasm-demo crate
4 participants