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

Interface types #3380

Draft
wants to merge 22 commits into
base: component-model/instantiate
Choose a base branch
from
Draft

Conversation

dannypsnl
Copy link
Member

@dannypsnl dannypsnl commented May 2, 2024

NOTE: since we are going to merge #3218, once it merged we cherry-pick 90fdb13.

Copy link
Member

juntao commented May 2, 2024

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


@github-actions github-actions bot added c-CLI An issue related to WasmEdge CLI tools c-Plugin An issue related to WasmEdge Plugin c-Test An issue/PR to enhance the test suite c-WASI-NN labels May 2, 2024
@dannypsnl dannypsnl changed the base branch from master to component-model/instantiate May 2, 2024 07:49
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch 3 times, most recently from 4d01a28 to 3436114 Compare May 8, 2024 06:11
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch 2 times, most recently from d61259d to fdb35e5 Compare May 14, 2024 10:53
@github-actions github-actions bot removed c-Test An issue/PR to enhance the test suite c-WASI-NN labels May 15, 2024
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch from 1a908d8 to f25bc16 Compare May 27, 2024 07:57
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch 2 times, most recently from edf18b4 to fa0f78c Compare May 30, 2024 01:18
* section order will affect index space
* skip validation process for now
* nested core module instantiation
* record all environments had been used
* add type and core:type into index space (in component instance)
* (FIXME) import section: the current implementation will treat a plugin
  as module instance instead a component instance, in the end we should
  have both
* instantiate component sort part
* export function instance out, so we can run it from CLI
  * canoncial lift without options
  * canoncial lower without options
* unify component and module instance in VM
* drafting inline exports concept

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
* wasi-http implementation
* drafting example for test
* fix a bug in store manager, soft modules do it wrong
* fix instance problem
misc
* update to follow review feedback
* mark TODO
* add prefix
* reinterpret_cast
* format stuff

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
- canonical changes
- extracting out the instantiate of each section to its own file
- `alias` is correct, the bug is coming from the demo code

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
1. [component] create `Executor::lowering` function that gets a higher
   function instance, returns a lower function instance
2. add enum `TypeCode::String`
3. add `StrVariant` so host function can operate string
4. [plugin] update wasi-http implementation to use new stuffs

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
* pushing canonical lifting a bit, now call flow has no error came out
* add header
* cannot allocate ValVariant
  * `vector` of component instance use push_back
* fix test build
  * remove const descriptor
  * avoid occurs casting which will fail on some platforms
  * remove `const`
  * proper initialize
  * anonymous namespace
* lift lower function that occurs string correctly

misc
* mark TODO
* use hard code version to allocate string in memory
* abort execution if run into unimplemented option
* add formatter for AST type
* use formatter

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
misc
* complete defined value type formatter
* format the Component function type

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
NOTE: some internal bugs still there, so the demo haven't fully work yet.

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
misc: remove unused code

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
misc
* missing `break` in cases
* adjustment

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
Signed-off-by: Lîm Tsú-thuàn <[email protected]>
…ng content

misc
* missing `break`
* reduce interface of `StrVariant`

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
misc: format

Signed-off-by: Lîm Tsú-thuàn <[email protected]>
Signed-off-by: Lîm Tsú-thuàn <[email protected]>
Signed-off-by: Lîm Tsú-thuàn <[email protected]>
Signed-off-by: Lîm Tsú-thuàn <[email protected]>
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch from fa0f78c to 26b64b1 Compare June 3, 2024 02:37
Signed-off-by: Lîm Tsú-thuàn <[email protected]>
@dannypsnl dannypsnl force-pushed the component-model/instantiate branch from 005c8f2 to cb85c09 Compare June 3, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-CLI An issue related to WasmEdge CLI tools c-Plugin An issue related to WasmEdge Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants