Skip to content

Commit c2da9a9

Browse files
committed
symmetric executor skeleton
1 parent 9dc5739 commit c2da9a9

File tree

9 files changed

+3381
-0
lines changed

9 files changed

+3381
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[workspace]
2+
package.version = "0.1.0"
3+
package.edition = "2021"
4+
5+
[package]
6+
name = "symmetric_executor"
7+
edition.workspace = true
8+
version.workspace = true
9+
10+
[dependencies]
11+
futures = "0.3.31"
12+
libc = "0.2.167"
13+
wit-bindgen = { version = "0.36.0", path = "../guest-rust" }
14+
wit-bindgen-rt = { version = "0.36.0", path = "../guest-rust/rt" }
15+
16+
[lib]
17+
crate-type = ["cdylib"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
(cd rust-client/src;../../../../target/debug/wit-bindgen rust ../../wit -w module --symmetric --async none)
3+
(cd rsrc;../../../target/debug/wit-bindgen rust ../wit -w executor --symmetric --async none)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
3+
[package]
4+
name = "symmetric-runtime"
5+
version = "0.1.0"
6+
edition = "2021"
7+
8+
[dependencies]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

0 commit comments

Comments
 (0)