Skip to content

Commit 77c3b87

Browse files
committed
feat(host): add capability profiles and async host execution
1 parent 305f19f commit 77c3b87

94 files changed

Lines changed: 14651 additions & 1067 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ members = [
55
"pd-vm-nostd",
66
"pd-vm-wasm",
77
"crates/rustscript",
8+
"crates/pd-host-schema",
89
]
910
resolver = "2"
1011

@@ -27,6 +28,7 @@ name = "vm"
2728
[features]
2829
default = ["runtime", "cli", "cranelift-jit"]
2930
runtime = []
31+
async = ["runtime", "dep:tokio"]
3032
sqlite = ["runtime", "dep:rusqlite"]
3133
edge-abi = [
3234
"dep:edge_abi",
@@ -62,11 +64,12 @@ cranelift-module = { version = "0.129.1", optional = true }
6264
cranelift-native = { version = "0.129.1", optional = true }
6365
pd-host-function = { path = "./pd-host-function", version = "0.1.0" }
6466
rusqlite = { version = "0.32", default-features = false, features = ["bundled", "hooks", "limits"], optional = true }
67+
tokio = { version = "1", features = ["rt-multi-thread", "net", "time", "sync", "fs", "io-util", "process"], optional = true }
6568
edge_abi = { package = "pd-edge-abi", version = "0.1.1", default-features = false, optional = true }
6669
futures-channel = "0.3"
6770
paste = "1"
6871
regex = "1"
69-
serde = "1"
72+
serde = { version = "1", features = ["derive"] }
7073
serde_json = "1"
7174
rt-format = "0.3.1"
7275
self_cell = "1"
@@ -79,6 +82,7 @@ windows-sys = { version = "0.59", features = ["Win32_System_Diagnostics_Debug",
7982
libc = "0.2"
8083

8184
[dev-dependencies]
85+
pd-host-schema = { path = "./crates/pd-host-schema", version = "0.1.0" }
8286
syn = { version = "2", features = ["full"] }
8387
tokio = { version = "1", features = ["macros", "rt", "time", "sync"] }
8488

@@ -87,5 +91,26 @@ name = "host_binding_generation_tests"
8791
path = "tests/host_binding_generation_tests.rs"
8892
required-features = ["cranelift-jit"]
8993

94+
[[test]]
95+
name = "host_sdk_tests"
96+
path = "tests/host_sdk_tests.rs"
97+
required-features = ["runtime"]
98+
99+
[[test]]
100+
name = "host_resource_public_api_tests"
101+
path = "tests/host_resource_public_api_tests.rs"
102+
required-features = ["runtime"]
103+
104+
[[test]]
105+
name = "host_resource_macro_runtime_tests"
106+
path = "tests/host_resource_macro_runtime_tests.rs"
107+
required-features = ["runtime"]
108+
109+
[[test]]
110+
name = "host_context_arch_tests"
111+
path = "tests/host_context_arch_tests.rs"
112+
required-features = ["runtime"]
113+
90114
[build-dependencies]
115+
pd-host-schema = { path = "./crates/pd-host-schema", version = "0.1.0" }
91116
syn = { version = "2", features = ["full"] }

0 commit comments

Comments
 (0)