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

[WIP] Add wasm to wasm support #8

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

[WIP] Add wasm to wasm support #8

wants to merge 12 commits into from

Conversation

dm4
Copy link
Member

@dm4 dm4 commented Oct 17, 2022

This PR is for WasmEdge/WasmEdge#1981

Signed-off-by: dm4 <dm4@secondstate.io>
Co-authored-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
@dm4 dm4 changed the title [WIP] Add ItemForeignMod support [WIP] Add wasm to wasm support Oct 17, 2022
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
idea is converting below
```
extern "C" {
  fn foo(String) -> String
}
```
to
```
extern "C" {
  fn env_foo(*mut u32, i32) -> i32
}
fn foo(String) -> String {
  // call `env_foo`
  // polyfill result to String
}
```

Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Still debugging the encoding

Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Problem: (disallowed by compiler)
* dereference raw pointer
* move `unsafe` memory
* call to `unsafe`

Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@gmail.com>
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.

2 participants