wasm binary generation for unit test
Use makefile to generate wasm binary for unit testing
Should we remove wasm binary from repo and add it as part of make file for unit test and integration test?
Two wasm files as of now :
- For rust chaincode: https://github.com/hyperledger-labs/fabric-chaincode-wasm/blob/master/sample-wasm-chaincode/chaincode_example02/rust/app_main.wasm
- For C chaincode: https://github.com/hyperledger-labs/fabric-chaincode-wasm/pull/24/files#diff-cb10420c29b4a5c425041df14b70572d
If we can achieve that in the CI, it would help enforce the reproducibility of the repository.
Given how small these are, and that they're already in the repo, it's not going to save us any space.
I am in favor of the idea.
Did you want to do this work, or merge #24?
The only problem I see in removing wasm binaries from repo is, we need these binaries for running unit tests, and it takes an awful lot of time to compile and generate rust chaincode to wasm. Ignoring the fact that the user has to also install rust/c tools for generating this wasm binary for running wasmcc unit tests alone.
How about, using Git Actions to publish wasm binaries under GitHub Packages.
And, make can curl download these GitHub packages for unit tests.
In the last discussion, we were planning to build wasm binary as part of our CI and push it to the repository.
But that might result in a very bulky repository because it will add binary files in every PR.
Thoughts?
I do not understand how it adds it to every pr. Binary push can be done pseudo outside of the repo by pushing to the repository "releases". https://help.github.com/en/github/administering-a-repository/creating-releases
So should we publish both rust and C generated wasm binaries to releases?