WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

feat: component-model proposal's validation

Open dannypsnl opened this issue 1 year ago • 9 comments

Summary

Complete validation for a loaded component binary.

Details

One will need to check

  1. https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md
  2. https://github.com/WebAssembly/component-model/blob/main/design/mvp/Binary.md

in details, and add proper validation process.

  1. #3179
  2. #3619

Appendix

No response

dannypsnl avatar Jan 10 '24 06:01 dannypsnl

@dannypsnl I reviewed the resources you provided but still struggled to grasp a little. Can you give some context about this issue?

arujjval avatar May 20 '24 14:05 arujjval

@dannypsnl I reviewed the resources you provided but still struggled to grasp a little. Can you give some context about this issue?

@dannypsnl is OOO. He will be back after 5/27.

hydai avatar May 20 '24 17:05 hydai

@arujjval sure, the component model is a new binary format that "contains" old wasm in it, the idea is like a linker script and a module interface (consider OCaml's signature).

As a new binary, it needs its own validation, like if import/export does existed, more details than should be able to find in the resources I posted.

dannypsnl avatar May 27 '24 01:05 dannypsnl

@dannypsnl I am giving it a try. Please assign me this.

arujjval avatar May 27 '24 11:05 arujjval

@dannypsnl Do I have to create validate function for each section of Component according to rules given in Binary.md file?

arujjval avatar Jun 03 '24 16:06 arujjval

That's the coding style also applied on module in WasmEdge, but you can do in any style you preferred.

dannypsnl avatar Jun 04 '24 03:06 dannypsnl

NOTE: multiple string-encoding options is invalid in canonical ABI.

dannypsnl avatar Jul 15 '24 08:07 dannypsnl