-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wazergo-based host module for ww. Change process schema.
- Loading branch information
Showing
19 changed files
with
4,554 additions
and
666 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build wasm || tinygo.wasm || wasi | ||
|
||
package ww | ||
|
||
//go:wasm-module ww | ||
//go:export __test | ||
func test(a, b uint32) uint32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build !purego && !appengine && !wasm && !tinygo.wasm && !wasi | ||
|
||
package ww | ||
|
||
/* | ||
shims.go contains shim functions for WASM imports, which allows | ||
symbol names to resolve on non-WASM architectures. | ||
*/ | ||
|
||
func test(a, b uint32) uint32 { | ||
return a + b | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
ww "github.com/wetware/ww/guest/tinygo" | ||
) | ||
|
||
func main() { | ||
// it, release := ww.Ls(context.Background()) | ||
// defer release() | ||
|
||
// for name := it.Next(); name != ""; name = it.Next() { | ||
// fmt.Println(name) | ||
// } | ||
|
||
fmt.Println(ww.Test(40, 2)) | ||
} |
Binary file not shown.
Oops, something went wrong.