[Merged by Bors] - feat: capability to validate WASM files#2760
[Merged by Bors] - feat: capability to validate WASM files#2760LeoBorai wants to merge 6 commits intofluvio-community:masterfrom LeoBorai:feat/validate-smartmodule-wasmfile
Conversation
Introduce `validate_binary` to validate WASM files (binary variant). The validation approach consists on parsing WASM file bytes, when an error is found the parser will short-circuit by returning an `Err` early. To ensure the WASM file is valid, the file is parsed to the end.
There was a problem hiding this comment.
The code LGTM. I like the unit tests cases - those cover some nice basics. Have you looked at the full range of users of fluvio-controlplane-metadata. I don't want to blow up the wasm size for the dashboard for example. One option is to put this fcn behind a feature.
Yeah! I thought about the feature approach as well. Let me do that so we can include it only when needed 😄 |
|
bors r+ |
Introduce `validate_binary` to validate WASM files (binary variant). The validation approach consists on parsing WASM file bytes, when an error is found the parser will short-circuit by returning an `Err` early. To ensure the WASM file is valid, the file is parsed to the end.
|
Build failed: |
|
I reduced the scope of the validation to Hub Util for our current use case. At some point it would be great to have a single representation we could use for both use cases, so validation is centralized |
sehz
left a comment
There was a problem hiding this comment.
LGTM. Later, we need to consolidate validation of WASM
Totally agree! |
|
bors r+ |
Introduce `validate_binary` to validate WASM files (binary variant). The validation approach consists on parsing WASM file bytes, when an error is found the parser will short-circuit by returning an `Err` early. To ensure the WASM file is valid, the file is parsed to the end.
|
Build failed: |
|
bors r+ |
Introduce `validate_binary` to validate WASM files (binary variant). The validation approach consists on parsing WASM file bytes, when an error is found the parser will short-circuit by returning an `Err` early. To ensure the WASM file is valid, the file is parsed to the end.
|
Pull request successfully merged into master. Build succeeded: |
Introduce `validate_binary` to validate WASM files (binary variant). The validation approach consists on parsing WASM file bytes, when an error is found the parser will short-circuit by returning an `Err` early. To ensure the WASM file is valid, the file is parsed to the end.
Introduce
validate_binaryto validate WASM files (binary variant).The validation approach consists on parsing WASM file bytes, when
an error is found the parser will short-circuit by returning an
Errearly.To ensure the WASM file is valid, the file is parsed to the end.