Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/test-programs/src/p3/mod.rs
3069 views
1
pub mod http;
2
pub mod sockets;
3
4
wit_bindgen::generate!({
5
inline: "
6
package wasmtime:test;
7
8
world testp3 {
9
include wasi:cli/[email protected];
10
import wasi:http/[email protected];
11
import wasi:http/[email protected];
12
import wasi:http/[email protected];
13
14
export wasi:cli/[email protected];
15
}
16
",
17
path: "../wasi-http/src/p3/wit",
18
world: "wasmtime:test/testp3",
19
default_bindings_module: "test_programs::p3",
20
pub_export_macro: true,
21
generate_all,
22
});
23
24
pub mod service {
25
wit_bindgen::generate!({
26
path: "../wasi-http/src/p3/wit",
27
world: "wasi:http/service",
28
default_bindings_module: "test_programs::p3::service",
29
pub_export_macro: true,
30
with: {
31
"wasi:http/[email protected]": crate::p3::wasi::http::handler,
32
"wasi:http/[email protected]": crate::p3::wasi::http::types,
33
"wasi:http/[email protected]": crate::p3::wasi::http::client,
34
"wasi:random/[email protected]": crate::p3::wasi::random::random,
35
"wasi:random/[email protected]": crate::p3::wasi::random::insecure,
36
"wasi:random/[email protected]": crate::p3::wasi::random::insecure_seed,
37
"wasi:cli/[email protected]": crate::p3::wasi::cli::stdout,
38
"wasi:cli/[email protected]": crate::p3::wasi::cli::stderr,
39
"wasi:cli/[email protected]": crate::p3::wasi::cli::stdin,
40
"wasi:cli/[email protected]": crate::p3::wasi::cli::types,
41
"wasi:clocks/[email protected]": crate::p3::wasi::clocks::monotonic_clock,
42
"wasi:clocks/[email protected]": crate::p3::wasi::clocks::system_clock,
43
"wasi:clocks/[email protected]": crate::p3::wasi::clocks::types,
44
},
45
});
46
}
47
48