openzoo 0.51.4 → 0.51.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/bin/openzoo.js +21 -46
- package/lib/chatgpt-install.js +106 -0
- package/lib/chatgpt.js +108 -90
- package/lib/config.js +34 -0
- package/lib/modelcommand.js +443 -0
- package/lib/pay.js +60 -4
- package/lib/proxy.js +39 -0
- package/package.json +4 -7
- package/transmute/README.md +0 -385
- package/transmute/bin/openzoo-transmute.js +0 -7
- package/transmute/docs/OPENZOO_CLI_PATCH.md +0 -139
- package/transmute/docs/VERCEL_TO_SOLANA.md +0 -381
- package/transmute/lib/build.js +0 -381
- package/transmute/lib/cli.js +0 -293
- package/transmute/lib/compile/bytecode.js +0 -591
- package/transmute/lib/compile/hostids.js +0 -11
- package/transmute/lib/compile/index.js +0 -159
- package/transmute/lib/compile/ir.js +0 -1634
- package/transmute/lib/compile/parse.js +0 -753
- package/transmute/lib/compile/rust.js +0 -781
- package/transmute/lib/deploy.js +0 -357
- package/transmute/lib/eligibility.js +0 -211
- package/transmute/lib/gateway.js +0 -710
- package/transmute/lib/hub.js +0 -290
- package/transmute/lib/solana.js +0 -387
- package/transmute/lib/vercel.js +0 -296
- package/transmute/lib/wallet.js +0 -41
- package/transmute/lib/wire.js +0 -208
- package/transmute/prebuilt/zoo_vm.v0.so +0 -0
- package/transmute/runtime/zoo-host/Cargo.lock +0 -588
- package/transmute/runtime/zoo-host/Cargo.toml +0 -30
- package/transmute/runtime/zoo-host/examples/vmrun.rs +0 -43
- package/transmute/runtime/zoo-host/src/assets.rs +0 -214
- package/transmute/runtime/zoo-host/src/ctx.rs +0 -350
- package/transmute/runtime/zoo-host/src/fmt.rs +0 -188
- package/transmute/runtime/zoo-host/src/helpers.rs +0 -245
- package/transmute/runtime/zoo-host/src/json.rs +0 -263
- package/transmute/runtime/zoo-host/src/kv.rs +0 -206
- package/transmute/runtime/zoo-host/src/lib.rs +0 -137
- package/transmute/runtime/zoo-host/src/site.rs +0 -94
- package/transmute/runtime/zoo-host/src/val.rs +0 -1050
- package/transmute/runtime/zoo-host/src/vm.rs +0 -902
- package/transmute/runtime/zoo-host/src/wire.rs +0 -239
- package/transmute/runtime/zoo-vm/Cargo.lock +0 -596
- package/transmute/runtime/zoo-vm/Cargo.toml +0 -23
- package/transmute/runtime/zoo-vm/src/lib.rs +0 -92
- package/transmute/site/.env.production +0 -2
- package/transmute/site/api/echo.js +0 -10
- package/transmute/site/api/hello.js +0 -12
- package/transmute/site/api/hits.js +0 -13
- package/transmute/site/api/time.js +0 -5
- package/transmute/site/package.json +0 -6
- package/transmute/site/public/app.js +0 -16
- package/transmute/site/public/index.html +0 -96
|
@@ -1,588 +0,0 @@
|
|
|
1
|
-
# This file is automatically @generated by Cargo.
|
|
2
|
-
# It is not intended for manual editing.
|
|
3
|
-
version = 4
|
|
4
|
-
|
|
5
|
-
[[package]]
|
|
6
|
-
name = "block-buffer"
|
|
7
|
-
version = "0.10.4"
|
|
8
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
-
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
|
10
|
-
dependencies = [
|
|
11
|
-
"generic-array",
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
[[package]]
|
|
15
|
-
name = "borsh"
|
|
16
|
-
version = "1.8.1"
|
|
17
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
-
checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a"
|
|
19
|
-
dependencies = [
|
|
20
|
-
"borsh-derive",
|
|
21
|
-
"bytes",
|
|
22
|
-
"cfg_aliases",
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
[[package]]
|
|
26
|
-
name = "borsh-derive"
|
|
27
|
-
version = "1.8.1"
|
|
28
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
29
|
-
checksum = "12cdfe656708a01f89b451a7d36466e6fe6c414de0aa18fc54f864f6f9ca9f56"
|
|
30
|
-
dependencies = [
|
|
31
|
-
"once_cell",
|
|
32
|
-
"proc-macro-crate",
|
|
33
|
-
"proc-macro2",
|
|
34
|
-
"quote",
|
|
35
|
-
"syn 3.0.5",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
[[package]]
|
|
39
|
-
name = "bytes"
|
|
40
|
-
version = "1.12.1"
|
|
41
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
42
|
-
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
43
|
-
|
|
44
|
-
[[package]]
|
|
45
|
-
name = "cfg-if"
|
|
46
|
-
version = "1.0.4"
|
|
47
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
-
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
49
|
-
|
|
50
|
-
[[package]]
|
|
51
|
-
name = "cfg_aliases"
|
|
52
|
-
version = "0.2.2"
|
|
53
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
-
checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
|
|
55
|
-
|
|
56
|
-
[[package]]
|
|
57
|
-
name = "cpufeatures"
|
|
58
|
-
version = "0.2.17"
|
|
59
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
-
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
|
61
|
-
dependencies = [
|
|
62
|
-
"libc",
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
[[package]]
|
|
66
|
-
name = "crypto-common"
|
|
67
|
-
version = "0.1.7"
|
|
68
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
69
|
-
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
|
70
|
-
dependencies = [
|
|
71
|
-
"generic-array",
|
|
72
|
-
"typenum",
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
[[package]]
|
|
76
|
-
name = "curve25519-dalek"
|
|
77
|
-
version = "4.1.3"
|
|
78
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
-
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
|
|
80
|
-
dependencies = [
|
|
81
|
-
"cfg-if",
|
|
82
|
-
"cpufeatures",
|
|
83
|
-
"curve25519-dalek-derive",
|
|
84
|
-
"digest",
|
|
85
|
-
"fiat-crypto",
|
|
86
|
-
"rand_core",
|
|
87
|
-
"rustc_version",
|
|
88
|
-
"subtle",
|
|
89
|
-
"zeroize",
|
|
90
|
-
]
|
|
91
|
-
|
|
92
|
-
[[package]]
|
|
93
|
-
name = "curve25519-dalek-derive"
|
|
94
|
-
version = "0.1.1"
|
|
95
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
96
|
-
checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
|
|
97
|
-
dependencies = [
|
|
98
|
-
"proc-macro2",
|
|
99
|
-
"quote",
|
|
100
|
-
"syn 2.0.119",
|
|
101
|
-
]
|
|
102
|
-
|
|
103
|
-
[[package]]
|
|
104
|
-
name = "darling"
|
|
105
|
-
version = "0.23.0"
|
|
106
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
-
checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
|
|
108
|
-
dependencies = [
|
|
109
|
-
"darling_core",
|
|
110
|
-
"darling_macro",
|
|
111
|
-
]
|
|
112
|
-
|
|
113
|
-
[[package]]
|
|
114
|
-
name = "darling_core"
|
|
115
|
-
version = "0.23.0"
|
|
116
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
-
checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
|
|
118
|
-
dependencies = [
|
|
119
|
-
"ident_case",
|
|
120
|
-
"proc-macro2",
|
|
121
|
-
"quote",
|
|
122
|
-
"strsim",
|
|
123
|
-
"syn 2.0.119",
|
|
124
|
-
]
|
|
125
|
-
|
|
126
|
-
[[package]]
|
|
127
|
-
name = "darling_macro"
|
|
128
|
-
version = "0.23.0"
|
|
129
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
-
checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
|
|
131
|
-
dependencies = [
|
|
132
|
-
"darling_core",
|
|
133
|
-
"quote",
|
|
134
|
-
"syn 2.0.119",
|
|
135
|
-
]
|
|
136
|
-
|
|
137
|
-
[[package]]
|
|
138
|
-
name = "digest"
|
|
139
|
-
version = "0.10.7"
|
|
140
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
-
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
|
142
|
-
dependencies = [
|
|
143
|
-
"block-buffer",
|
|
144
|
-
"crypto-common",
|
|
145
|
-
]
|
|
146
|
-
|
|
147
|
-
[[package]]
|
|
148
|
-
name = "equivalent"
|
|
149
|
-
version = "1.0.2"
|
|
150
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
-
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
152
|
-
|
|
153
|
-
[[package]]
|
|
154
|
-
name = "fiat-crypto"
|
|
155
|
-
version = "0.2.9"
|
|
156
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
-
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
|
|
158
|
-
|
|
159
|
-
[[package]]
|
|
160
|
-
name = "five8"
|
|
161
|
-
version = "1.0.0"
|
|
162
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
163
|
-
checksum = "23f76610e969fa1784327ded240f1e28a3fd9520c9cec93b636fcf62dd37f772"
|
|
164
|
-
dependencies = [
|
|
165
|
-
"five8_core",
|
|
166
|
-
]
|
|
167
|
-
|
|
168
|
-
[[package]]
|
|
169
|
-
name = "five8_const"
|
|
170
|
-
version = "1.0.0"
|
|
171
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
172
|
-
checksum = "1a0f1728185f277989ca573a402716ae0beaaea3f76a8ff87ef9dd8fb19436c5"
|
|
173
|
-
dependencies = [
|
|
174
|
-
"five8_core",
|
|
175
|
-
]
|
|
176
|
-
|
|
177
|
-
[[package]]
|
|
178
|
-
name = "five8_core"
|
|
179
|
-
version = "1.0.0"
|
|
180
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
181
|
-
checksum = "059c31d7d36c43fe39d89e55711858b4da8be7eb6dabac23c7289b1a19489406"
|
|
182
|
-
|
|
183
|
-
[[package]]
|
|
184
|
-
name = "generic-array"
|
|
185
|
-
version = "0.14.7"
|
|
186
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
-
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
|
188
|
-
dependencies = [
|
|
189
|
-
"typenum",
|
|
190
|
-
"version_check",
|
|
191
|
-
]
|
|
192
|
-
|
|
193
|
-
[[package]]
|
|
194
|
-
name = "hashbrown"
|
|
195
|
-
version = "0.17.1"
|
|
196
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
197
|
-
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
198
|
-
|
|
199
|
-
[[package]]
|
|
200
|
-
name = "ident_case"
|
|
201
|
-
version = "1.0.1"
|
|
202
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
203
|
-
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|
204
|
-
|
|
205
|
-
[[package]]
|
|
206
|
-
name = "indexmap"
|
|
207
|
-
version = "2.14.1"
|
|
208
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
209
|
-
checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb"
|
|
210
|
-
dependencies = [
|
|
211
|
-
"equivalent",
|
|
212
|
-
"hashbrown",
|
|
213
|
-
]
|
|
214
|
-
|
|
215
|
-
[[package]]
|
|
216
|
-
name = "libc"
|
|
217
|
-
version = "0.2.189"
|
|
218
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
-
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
220
|
-
|
|
221
|
-
[[package]]
|
|
222
|
-
name = "libm"
|
|
223
|
-
version = "0.2.16"
|
|
224
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
-
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
|
226
|
-
|
|
227
|
-
[[package]]
|
|
228
|
-
name = "memchr"
|
|
229
|
-
version = "2.8.3"
|
|
230
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
-
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
232
|
-
|
|
233
|
-
[[package]]
|
|
234
|
-
name = "once_cell"
|
|
235
|
-
version = "1.21.4"
|
|
236
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
-
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
238
|
-
|
|
239
|
-
[[package]]
|
|
240
|
-
name = "pastey"
|
|
241
|
-
version = "0.2.3"
|
|
242
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
-
checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
|
|
244
|
-
|
|
245
|
-
[[package]]
|
|
246
|
-
name = "pinocchio"
|
|
247
|
-
version = "0.11.2"
|
|
248
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
249
|
-
checksum = "a6cababcb62a2e739c7078ae16eda02789a6e3edd21bbdded864e85c38a7914d"
|
|
250
|
-
dependencies = [
|
|
251
|
-
"solana-account-view",
|
|
252
|
-
"solana-address",
|
|
253
|
-
"solana-define-syscall 5.2.0",
|
|
254
|
-
"solana-instruction-view",
|
|
255
|
-
"solana-program-error",
|
|
256
|
-
]
|
|
257
|
-
|
|
258
|
-
[[package]]
|
|
259
|
-
name = "pinocchio-system"
|
|
260
|
-
version = "0.6.1"
|
|
261
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
-
checksum = "f3ae2ee67b42e2ac797dd88312da473c895660e270d8093e0ba2749b885b5778"
|
|
263
|
-
dependencies = [
|
|
264
|
-
"pinocchio",
|
|
265
|
-
"solana-address",
|
|
266
|
-
]
|
|
267
|
-
|
|
268
|
-
[[package]]
|
|
269
|
-
name = "proc-macro-crate"
|
|
270
|
-
version = "3.5.0"
|
|
271
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
272
|
-
checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
|
|
273
|
-
dependencies = [
|
|
274
|
-
"toml_edit",
|
|
275
|
-
]
|
|
276
|
-
|
|
277
|
-
[[package]]
|
|
278
|
-
name = "proc-macro2"
|
|
279
|
-
version = "1.0.107"
|
|
280
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
281
|
-
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
282
|
-
dependencies = [
|
|
283
|
-
"unicode-ident",
|
|
284
|
-
]
|
|
285
|
-
|
|
286
|
-
[[package]]
|
|
287
|
-
name = "quote"
|
|
288
|
-
version = "1.0.47"
|
|
289
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
290
|
-
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
291
|
-
dependencies = [
|
|
292
|
-
"proc-macro2",
|
|
293
|
-
]
|
|
294
|
-
|
|
295
|
-
[[package]]
|
|
296
|
-
name = "rand_core"
|
|
297
|
-
version = "0.6.4"
|
|
298
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
-
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
|
300
|
-
|
|
301
|
-
[[package]]
|
|
302
|
-
name = "rustc_version"
|
|
303
|
-
version = "0.4.1"
|
|
304
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
305
|
-
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
|
|
306
|
-
dependencies = [
|
|
307
|
-
"semver",
|
|
308
|
-
]
|
|
309
|
-
|
|
310
|
-
[[package]]
|
|
311
|
-
name = "semver"
|
|
312
|
-
version = "1.0.28"
|
|
313
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
314
|
-
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
|
315
|
-
|
|
316
|
-
[[package]]
|
|
317
|
-
name = "serde"
|
|
318
|
-
version = "1.0.229"
|
|
319
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
320
|
-
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
321
|
-
dependencies = [
|
|
322
|
-
"serde_core",
|
|
323
|
-
]
|
|
324
|
-
|
|
325
|
-
[[package]]
|
|
326
|
-
name = "serde_core"
|
|
327
|
-
version = "1.0.229"
|
|
328
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
329
|
-
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
330
|
-
dependencies = [
|
|
331
|
-
"serde_derive",
|
|
332
|
-
]
|
|
333
|
-
|
|
334
|
-
[[package]]
|
|
335
|
-
name = "serde_derive"
|
|
336
|
-
version = "1.0.229"
|
|
337
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
338
|
-
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
339
|
-
dependencies = [
|
|
340
|
-
"proc-macro2",
|
|
341
|
-
"quote",
|
|
342
|
-
"syn 3.0.5",
|
|
343
|
-
]
|
|
344
|
-
|
|
345
|
-
[[package]]
|
|
346
|
-
name = "sha2"
|
|
347
|
-
version = "0.10.9"
|
|
348
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
349
|
-
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
|
350
|
-
dependencies = [
|
|
351
|
-
"cfg-if",
|
|
352
|
-
"cpufeatures",
|
|
353
|
-
"digest",
|
|
354
|
-
]
|
|
355
|
-
|
|
356
|
-
[[package]]
|
|
357
|
-
name = "sha2-const-stable"
|
|
358
|
-
version = "0.1.0"
|
|
359
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
360
|
-
checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9"
|
|
361
|
-
|
|
362
|
-
[[package]]
|
|
363
|
-
name = "solana-account-view"
|
|
364
|
-
version = "2.0.0"
|
|
365
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
366
|
-
checksum = "fc141b940560430425ebaadb7645496c45f6a10fad9911d719bd03eab7f4d422"
|
|
367
|
-
dependencies = [
|
|
368
|
-
"solana-address",
|
|
369
|
-
"solana-program-error",
|
|
370
|
-
]
|
|
371
|
-
|
|
372
|
-
[[package]]
|
|
373
|
-
name = "solana-address"
|
|
374
|
-
version = "2.7.0"
|
|
375
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
376
|
-
checksum = "01332a01c0a3098404d55a724c8d9a92aed4a50fe40a7dd0c7a51e29274c14de"
|
|
377
|
-
dependencies = [
|
|
378
|
-
"borsh",
|
|
379
|
-
"curve25519-dalek",
|
|
380
|
-
"five8",
|
|
381
|
-
"five8_const",
|
|
382
|
-
"serde",
|
|
383
|
-
"sha2-const-stable",
|
|
384
|
-
"solana-define-syscall 5.2.0",
|
|
385
|
-
"solana-program-error",
|
|
386
|
-
"solana-sha256-hasher",
|
|
387
|
-
"wincode",
|
|
388
|
-
]
|
|
389
|
-
|
|
390
|
-
[[package]]
|
|
391
|
-
name = "solana-define-syscall"
|
|
392
|
-
version = "4.0.1"
|
|
393
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
394
|
-
checksum = "57e5b1c0bc1d4a4d10c88a4100499d954c09d3fecfae4912c1a074dff68b1738"
|
|
395
|
-
|
|
396
|
-
[[package]]
|
|
397
|
-
name = "solana-define-syscall"
|
|
398
|
-
version = "5.2.0"
|
|
399
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
400
|
-
checksum = "bf8209ece2bd9f1450e672858ffc0e5c8c786ff6916d2a862b126dd0128f380f"
|
|
401
|
-
|
|
402
|
-
[[package]]
|
|
403
|
-
name = "solana-hash"
|
|
404
|
-
version = "4.6.0"
|
|
405
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
406
|
-
checksum = "0df9b01495ed31100aca97a7f5862d5e19ab1636d60d1a9f02391408dd9dec84"
|
|
407
|
-
|
|
408
|
-
[[package]]
|
|
409
|
-
name = "solana-instruction-view"
|
|
410
|
-
version = "2.1.0"
|
|
411
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
412
|
-
checksum = "6ab7a27d0c4214b9f7389c3dd00b68c93093a67f1dcc5b7893aebe299bbcbb47"
|
|
413
|
-
dependencies = [
|
|
414
|
-
"solana-account-view",
|
|
415
|
-
"solana-address",
|
|
416
|
-
"solana-define-syscall 5.2.0",
|
|
417
|
-
"solana-program-error",
|
|
418
|
-
]
|
|
419
|
-
|
|
420
|
-
[[package]]
|
|
421
|
-
name = "solana-program-error"
|
|
422
|
-
version = "3.0.1"
|
|
423
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
424
|
-
checksum = "4f04fa578707b3612b095f0c8e19b66a1233f7c42ca8082fcb3b745afcc0add6"
|
|
425
|
-
|
|
426
|
-
[[package]]
|
|
427
|
-
name = "solana-sha256-hasher"
|
|
428
|
-
version = "3.1.0"
|
|
429
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
-
checksum = "db7dc3011ea4c0334aaaa7e7128cb390ecf546b28d412e9bf2064680f57f588f"
|
|
431
|
-
dependencies = [
|
|
432
|
-
"sha2",
|
|
433
|
-
"solana-define-syscall 4.0.1",
|
|
434
|
-
"solana-hash",
|
|
435
|
-
]
|
|
436
|
-
|
|
437
|
-
[[package]]
|
|
438
|
-
name = "strsim"
|
|
439
|
-
version = "0.11.1"
|
|
440
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
441
|
-
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
442
|
-
|
|
443
|
-
[[package]]
|
|
444
|
-
name = "subtle"
|
|
445
|
-
version = "2.6.1"
|
|
446
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
-
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
448
|
-
|
|
449
|
-
[[package]]
|
|
450
|
-
name = "syn"
|
|
451
|
-
version = "2.0.119"
|
|
452
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
453
|
-
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
454
|
-
dependencies = [
|
|
455
|
-
"proc-macro2",
|
|
456
|
-
"quote",
|
|
457
|
-
"unicode-ident",
|
|
458
|
-
]
|
|
459
|
-
|
|
460
|
-
[[package]]
|
|
461
|
-
name = "syn"
|
|
462
|
-
version = "3.0.5"
|
|
463
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
464
|
-
checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9"
|
|
465
|
-
dependencies = [
|
|
466
|
-
"proc-macro2",
|
|
467
|
-
"quote",
|
|
468
|
-
"unicode-ident",
|
|
469
|
-
]
|
|
470
|
-
|
|
471
|
-
[[package]]
|
|
472
|
-
name = "thiserror"
|
|
473
|
-
version = "2.0.20"
|
|
474
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
475
|
-
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
476
|
-
dependencies = [
|
|
477
|
-
"thiserror-impl",
|
|
478
|
-
]
|
|
479
|
-
|
|
480
|
-
[[package]]
|
|
481
|
-
name = "thiserror-impl"
|
|
482
|
-
version = "2.0.20"
|
|
483
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
484
|
-
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
485
|
-
dependencies = [
|
|
486
|
-
"proc-macro2",
|
|
487
|
-
"quote",
|
|
488
|
-
"syn 3.0.5",
|
|
489
|
-
]
|
|
490
|
-
|
|
491
|
-
[[package]]
|
|
492
|
-
name = "toml_datetime"
|
|
493
|
-
version = "1.1.1+spec-1.1.0"
|
|
494
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
495
|
-
checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
|
|
496
|
-
dependencies = [
|
|
497
|
-
"serde_core",
|
|
498
|
-
]
|
|
499
|
-
|
|
500
|
-
[[package]]
|
|
501
|
-
name = "toml_edit"
|
|
502
|
-
version = "0.25.13+spec-1.1.0"
|
|
503
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
504
|
-
checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b"
|
|
505
|
-
dependencies = [
|
|
506
|
-
"indexmap",
|
|
507
|
-
"toml_datetime",
|
|
508
|
-
"toml_parser",
|
|
509
|
-
"winnow",
|
|
510
|
-
]
|
|
511
|
-
|
|
512
|
-
[[package]]
|
|
513
|
-
name = "toml_parser"
|
|
514
|
-
version = "1.1.3+spec-1.1.0"
|
|
515
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
516
|
-
checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56"
|
|
517
|
-
dependencies = [
|
|
518
|
-
"winnow",
|
|
519
|
-
]
|
|
520
|
-
|
|
521
|
-
[[package]]
|
|
522
|
-
name = "typenum"
|
|
523
|
-
version = "1.20.1"
|
|
524
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
525
|
-
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
526
|
-
|
|
527
|
-
[[package]]
|
|
528
|
-
name = "unicode-ident"
|
|
529
|
-
version = "1.0.24"
|
|
530
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
531
|
-
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
532
|
-
|
|
533
|
-
[[package]]
|
|
534
|
-
name = "version_check"
|
|
535
|
-
version = "0.9.5"
|
|
536
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
537
|
-
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
538
|
-
|
|
539
|
-
[[package]]
|
|
540
|
-
name = "wincode"
|
|
541
|
-
version = "0.6.1"
|
|
542
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
543
|
-
checksum = "bfc6339f1ba427bf7ad7c42403b28e524832ba2ddb5eef1bb2cc3b85db6b7b75"
|
|
544
|
-
dependencies = [
|
|
545
|
-
"pastey",
|
|
546
|
-
"proc-macro2",
|
|
547
|
-
"quote",
|
|
548
|
-
"thiserror",
|
|
549
|
-
"wincode-derive",
|
|
550
|
-
]
|
|
551
|
-
|
|
552
|
-
[[package]]
|
|
553
|
-
name = "wincode-derive"
|
|
554
|
-
version = "0.5.1"
|
|
555
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
556
|
-
checksum = "11d582d9fc9d813264407a9e16bfa16846ccf15ef032f9bbcd700741bdc00255"
|
|
557
|
-
dependencies = [
|
|
558
|
-
"darling",
|
|
559
|
-
"proc-macro2",
|
|
560
|
-
"quote",
|
|
561
|
-
"syn 2.0.119",
|
|
562
|
-
]
|
|
563
|
-
|
|
564
|
-
[[package]]
|
|
565
|
-
name = "winnow"
|
|
566
|
-
version = "1.0.4"
|
|
567
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
568
|
-
checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|
|
569
|
-
dependencies = [
|
|
570
|
-
"memchr",
|
|
571
|
-
]
|
|
572
|
-
|
|
573
|
-
[[package]]
|
|
574
|
-
name = "zeroize"
|
|
575
|
-
version = "1.9.0"
|
|
576
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
577
|
-
checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
|
|
578
|
-
|
|
579
|
-
[[package]]
|
|
580
|
-
name = "zoo-host"
|
|
581
|
-
version = "0.1.0"
|
|
582
|
-
dependencies = [
|
|
583
|
-
"libm",
|
|
584
|
-
"pinocchio",
|
|
585
|
-
"pinocchio-system",
|
|
586
|
-
"solana-address",
|
|
587
|
-
"solana-sha256-hasher",
|
|
588
|
-
]
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "zoo-host"
|
|
3
|
-
version = "0.1.0"
|
|
4
|
-
edition = "2021"
|
|
5
|
-
description = "On-chain host runtime for openzoo-transmute: runs Vercel-shaped Lambda handlers as Solana instructions (pinocchio, no_std)."
|
|
6
|
-
license = "MIT"
|
|
7
|
-
|
|
8
|
-
[lib]
|
|
9
|
-
name = "zoo_host"
|
|
10
|
-
crate-type = ["rlib"]
|
|
11
|
-
|
|
12
|
-
[dependencies]
|
|
13
|
-
pinocchio = { version = "0.11.2", features = ["cpi", "account-resize"] }
|
|
14
|
-
pinocchio-system = "0.6.1"
|
|
15
|
-
solana-sha256-hasher = { version = "3", default-features = false }
|
|
16
|
-
libm = "0.2"
|
|
17
|
-
|
|
18
|
-
# Host builds (cargo test) need the sha2 + curve25519 fallbacks that the SBF
|
|
19
|
-
# target gets from syscalls.
|
|
20
|
-
[target.'cfg(not(target_os = "solana"))'.dependencies]
|
|
21
|
-
solana-address = { version = "2", features = ["curve25519", "sha2", "std"] }
|
|
22
|
-
solana-sha256-hasher = { version = "3", features = ["sha2"] }
|
|
23
|
-
|
|
24
|
-
[features]
|
|
25
|
-
default = []
|
|
26
|
-
# Transcendental Math.* (log/exp/trig) and non-integer `**`: +7 KB of libm.
|
|
27
|
-
mathx = []
|
|
28
|
-
|
|
29
|
-
[lints.rust]
|
|
30
|
-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//! Host-side VM harness: `vmrun <module.bin> <route> <method> <path> [query] [body] [headers]`
|
|
2
|
-
//! prints the bridge response as JSON. No chain: KV calls report as missing.
|
|
3
|
-
use std::io::Read;
|
|
4
|
-
use zoo_host::{vm, wire::Req, Ctx};
|
|
5
|
-
|
|
6
|
-
fn main() {
|
|
7
|
-
let args: Vec<String> = std::env::args().collect();
|
|
8
|
-
let mut code = Vec::new();
|
|
9
|
-
std::fs::File::open(&args[1]).unwrap().read_to_end(&mut code).unwrap();
|
|
10
|
-
let route: usize = args[2].parse().unwrap();
|
|
11
|
-
let method = zoo_host::wire::METHODS.iter().position(|m| *m == args[3]).unwrap_or(0) as u8;
|
|
12
|
-
let req = Req {
|
|
13
|
-
route: route as u8,
|
|
14
|
-
method,
|
|
15
|
-
path: args.get(4).cloned().unwrap_or_else(|| "/".into()),
|
|
16
|
-
query: args.get(5).cloned().unwrap_or_default(),
|
|
17
|
-
headers: args.get(7).cloned().unwrap_or_default().replace("\\n", "\n"),
|
|
18
|
-
body: args.get(6).cloned().unwrap_or_default().into_bytes(),
|
|
19
|
-
};
|
|
20
|
-
let program_id = pinocchio::Address::new_from_array([7u8; 32]);
|
|
21
|
-
let mut accounts: [pinocchio::AccountView; 0] = [];
|
|
22
|
-
let mut cx = Ctx::new(&program_id, &mut accounts, req, &[]);
|
|
23
|
-
let out = vm::invoke_module(&mut cx, &code, route);
|
|
24
|
-
let status_body = match out {
|
|
25
|
-
Ok(()) if cx.sent => (cx.res.status, String::from_utf8_lossy(&cx.res.body).into_owned(), cx.res.headers.clone()),
|
|
26
|
-
Ok(()) => (504, "no response".into(), vec![]),
|
|
27
|
-
Err(e) => {
|
|
28
|
-
let r = vm::error_resp(&e);
|
|
29
|
-
(r.status, String::from_utf8_lossy(&r.body).into_owned(), r.headers.clone())
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
let hdrs: Vec<String> = status_body.2.iter().map(|(k, v)| format!("\"{}\":\"{}\"", k, v.replace('"', "\\\""))).collect();
|
|
33
|
-
println!("{{\"status\":{},\"headers\":{{{}}},\"body\":{}}}", status_body.0, hdrs.join(","), serde_free(&status_body.1));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
fn serde_free(s: &str) -> String {
|
|
37
|
-
let mut o = String::from("\"");
|
|
38
|
-
for c in s.chars() {
|
|
39
|
-
match c { '"' => o.push_str("\\\""), '\\' => o.push_str("\\\\"), '\n' => o.push_str("\\n"), _ => o.push(c) }
|
|
40
|
-
}
|
|
41
|
-
o.push('"');
|
|
42
|
-
o
|
|
43
|
-
}
|