-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e782d35
commit 59485a2
Showing
9 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
crates/moon/tests/test_cases/import_shared_memory.in/.gitignore
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,2 @@ | ||
target/ | ||
.mooncakes/ |
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 @@ | ||
# username/hello |
3 changes: 3 additions & 0 deletions
3
crates/moon/tests/test_cases/import_shared_memory.in/lib/hello.mbt
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,3 @@ | ||
pub fn hello() -> String { | ||
"Hello, world!" | ||
} |
5 changes: 5 additions & 0 deletions
5
crates/moon/tests/test_cases/import_shared_memory.in/lib/hello_test.mbt
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,5 @@ | ||
test "hello" { | ||
if @lib.hello() != "Hello, world!" { | ||
fail!("hello() != \"Hello, world!\"") | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
crates/moon/tests/test_cases/import_shared_memory.in/lib/moon.pkg.json
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 @@ | ||
{} |
3 changes: 3 additions & 0 deletions
3
crates/moon/tests/test_cases/import_shared_memory.in/main/main.mbt
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,3 @@ | ||
fn main { | ||
println(@lib.hello()) | ||
} |
31 changes: 31 additions & 0 deletions
31
crates/moon/tests/test_cases/import_shared_memory.in/main/moon.pkg.json
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,31 @@ | ||
{ | ||
"is-main": true, | ||
"import": [ | ||
"username/hello/lib" | ||
], | ||
"link": { | ||
"wasm": { | ||
"heap-start-address": 65536, | ||
"import-memory": { | ||
"module": "xxx", | ||
"name": "yyy" | ||
}, | ||
"memory-limits": { | ||
"min": 1, | ||
"max": 65536 | ||
}, | ||
"shared-memory": true | ||
}, | ||
"wasm-gc": { | ||
"import-memory": { | ||
"module": "xxx", | ||
"name": "yyy" | ||
}, | ||
"memory-limits": { | ||
"min": 1, | ||
"max": 65536 | ||
}, | ||
"shared-memory": true | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
crates/moon/tests/test_cases/import_shared_memory.in/moon.mod.json
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,9 @@ | ||
{ | ||
"name": "username/hello", | ||
"version": "0.1.0", | ||
"readme": "README.md", | ||
"repository": "", | ||
"license": "", | ||
"keywords": [], | ||
"description": "" | ||
} |
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