Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
187 lines (160 loc) · 5.34 KB
/
Copy pathCargo.toml
File metadata and controls
187 lines (160 loc) · 5.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[workspace]
members = [
".",
"pd-host-function",
"pd-vm-nostd",
"pd-vm-wasm",
"crates/rustscript",
"crates/pd-host-schema",
]
resolver = "2"
[workspace.package]
edition = "2024"
version = "0.1.0"
[package]
name = "pd-vm"
version.workspace = true
edition.workspace = true
description = "RustScript bytecode compiler and VM"
license = "MIT"
homepage = "https://rustscript.org/"
repository = "https://github.com/rustscript-lang/rustscript"
[lib]
name = "vm"
[features]
default = ["runtime", "cli", "cranelift-jit"]
runtime = []
async = ["runtime", "dep:tokio"]
http-client = [
"async",
"dep:futures-util",
"dep:http-body-util",
"dep:hyper",
"dep:hyper-util",
"dep:rustls",
"dep:tokio-rustls",
"dep:url",
"dep:webpki-roots",
]
sqlite = ["runtime", "dep:rusqlite"]
edge-abi = [
"dep:edge_abi",
"edge_abi/console",
"edge_abi/http",
"edge_abi/http2",
"edge_abi/mqtt",
"edge_abi/tls",
"edge_abi/websocket",
"edge_abi/webrtc",
]
cli = ["dep:rustyline", "runtime"]
cranelift-jit = [
"runtime",
"dep:cranelift-codegen",
"dep:cranelift-frontend",
"dep:cranelift-jit",
"dep:cranelift-module",
"dep:cranelift-native",
]
[[bin]]
name = "pd-vm-run"
path = "src/bin/pd-vm-run.rs"
required-features = ["cli"]
[[example]]
name = "mini_bench"
path = "examples/mini_bench.rs"
required-features = ["runtime"]
[[example]]
name = "collection_rebind_bench"
path = "examples/collection_rebind_bench.rs"
required-features = ["runtime"]
[[example]]
name = "rustscript_fuzz"
path = "examples/rustscript_fuzz.rs"
required-features = ["runtime"]
[dependencies]
base64 = "0.22"
cranelift-codegen = { version = "0.129.1", optional = true }
cranelift-frontend = { version = "0.129.1", optional = true }
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" }
rusqlite = { version = "0.32", default-features = false, features = ["bundled", "hooks", "limits"], optional = true }
edge_abi = { package = "pd-edge-abi", version = "0.1.1", default-features = false, optional = true }
futures-channel = "0.3"
paste = "1"
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rt-format = "0.3.1"
self_cell = "1"
rustyline = { version = "14", optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1", default-features = false, features = ["client", "http1"], optional = true }
hyper-util = { version = "0.1", default-features = false, features = ["tokio"], optional = true }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"], optional = true }
url = { version = "2", optional = true }
futures-util = { version = "0.3", optional = true }
tokio = { version = "1", features = ["rt-multi-thread", "net", "time", "sync", "fs", "io-util", "process", "macros"], optional = true }
webpki-roots = { version = "1", optional = true }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_System_Diagnostics_Debug", "Win32_System_Memory", "Win32_System_ProcessStatus", "Win32_System_Threading"] }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
pd-host-schema = { path = "./crates/pd-host-schema", version = "0.1.0" }
syn = { version = "2", features = ["full"] }
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time", "sync"] }
[target.'cfg(target_family = "wasm")'.dev-dependencies]
tokio = { version = "1", features = ["macros", "rt", "time", "sync"] }
[[test]]
name = "host_binding_generation_tests"
path = "tests/host_binding_generation_tests.rs"
required-features = ["cranelift-jit"]
[[test]]
name = "host_sdk_tests"
path = "tests/host_sdk_tests.rs"
required-features = ["runtime"]
[[test]]
name = "host_resource_public_api_tests"
path = "tests/host_resource_public_api_tests.rs"
required-features = ["runtime"]
[[test]]
name = "host_resource_macro_runtime_tests"
path = "tests/host_resource_macro_runtime_tests.rs"
required-features = ["runtime"]
[[test]]
name = "host_context_arch_tests"
path = "tests/host_context_arch_tests.rs"
required-features = ["runtime"]
[[test]]
name = "host_named_struct_foundation_tests"
path = "tests/host_named_struct_foundation_tests.rs"
required-features = ["runtime"]
[[test]]
name = "http_host_tests"
path = "tests/vm/http_host_tests.rs"
required-features = ["runtime", "http-client"]
[[test]]
name = "http_sse_tests"
path = "tests/vm/http_sse_tests.rs"
required-features = ["runtime", "http-client"]
[[test]]
name = "http_named_struct_contract_tests"
path = "tests/http_named_struct_contract_tests.rs"
required-features = ["runtime", "http-client"]
[[test]]
name = "io_http_coexistence_tests"
path = "tests/vm/io_http_coexistence_tests.rs"
required-features = ["runtime", "http-client"]
[[test]]
name = "http_feature_gating_tests"
path = "tests/http_feature_gating_tests.rs"
required-features = ["runtime"]
[build-dependencies]
pd-host-schema = { path = "./crates/pd-host-schema", version = "0.1.0" }
syn = { version = "2", features = ["full"] }