Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,072 changes: 1,056 additions & 16 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,7 @@ name = "vm"
[features]
default = ["runtime", "cli", "cranelift-jit"]
runtime = []
http-client = ["dep:reqwest", "dep:url", "dep:tokio", "dep:futures-util"]
edge-abi = [
"dep:edge_abi",
"edge_abi/console",
Expand DownExpand Up@@ -60,6 +61,10 @@ cranelift-jit = { version = "0.129.1", optional = true }
cranelift-module = { version = "0.129.1", optional = true }
cranelift-native = { version = "0.129.1", optional = true }
pd-host-function = { path = "./pd-host-function", version = "0.1.0" }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream"], optional = true }
url = { version = "2", optional = true }
futures-util = { version = "0.3", optional = true }
tokio = { version = "1", features = ["rt", "net", "time"], optional = true }
edge_abi = { package = "pd-edge-abi", version = "0.1.1", default-features = false, optional = true }
futures-channel = "0.3"
paste = "1"
Expand All@@ -85,5 +90,10 @@ name = "host_binding_generation_tests"
path = "tests/host_binding_generation_tests.rs"
required-features = ["cranelift-jit"]

[[test]]
name = "http_host_tests"
path = "tests/vm/http_host_tests.rs"
required-features = ["http-client"]

[build-dependencies]
syn = { version = "2", features = ["full"] }
17 changes: 12 additions & 5 deletions build.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -149,11 +149,18 @@ fn main() {
println!("cargo:rerun-if-changed={}", catalog_path.display());
let catalog = parse_catalog(&catalog_path);

let host_sources = [SourceSpec {
path: "src/builtins/runtime/host.rs".to_string(),
module: "host".to_string(),
category: SourceCategory::DefaultHost,
}];
let host_sources = [
SourceSpec {
path: "src/builtins/runtime/host.rs".to_string(),
module: "host".to_string(),
category: SourceCategory::DefaultHost,
},
SourceSpec {
path: "src/builtins/runtime/http.rs".to_string(),
module: "http".to_string(),
category: SourceCategory::DefaultHost,
},
];
let builtin_sources = builtin_source_specs(&namespaces);
let core_sources = [SourceSpec {
path: "src/builtins/runtime/core.rs".to_string(),
Expand Down
Loading
Loading