├── .gitignore ├── .rustfmt.toml ├── Cargo.lock ├── Cargo.toml ├── bootstrap2-binary ├── Cargo.toml └── src │ └── main.rs ├── bootstrap2-cf ├── Cargo.toml ├── package-lock.json ├── package.json ├── src │ ├── index.js │ └── lib.rs └── wrangler.toml └── bootstrap2-core ├── Cargo.toml └── src ├── agent_info.rs └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | bootstrap2-cf/src/rust 2 | /target 3 | *# Logs 4 | 5 | logs 6 | _.log 7 | npm-debug.log_ 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | .pnpm-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | 15 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json 16 | 17 | # Runtime data 18 | 19 | pids 20 | _.pid 21 | _.seed 22 | \*.pid.lock 23 | 24 | # Directory for instrumented libs generated by jscoverage/JSCover 25 | 26 | lib-cov 27 | 28 | # Coverage directory used by tools like istanbul 29 | 30 | coverage 31 | \*.lcov 32 | 33 | # nyc test coverage 34 | 35 | .nyc_output 36 | 37 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 38 | 39 | .grunt 40 | 41 | # Bower dependency directory (https://bower.io/) 42 | 43 | bower_components 44 | 45 | # node-waf configuration 46 | 47 | .lock-wscript 48 | 49 | # Compiled binary addons (https://nodejs.org/api/addons.html) 50 | 51 | build/Release 52 | 53 | # Dependency directories 54 | 55 | node_modules/ 56 | jspm_packages/ 57 | 58 | # Snowpack dependency directory (https://snowpack.dev/) 59 | 60 | web_modules/ 61 | 62 | # TypeScript cache 63 | 64 | \*.tsbuildinfo 65 | 66 | # Optional npm cache directory 67 | 68 | .npm 69 | 70 | # Optional eslint cache 71 | 72 | .eslintcache 73 | 74 | # Optional stylelint cache 75 | 76 | .stylelintcache 77 | 78 | # Microbundle cache 79 | 80 | .rpt2_cache/ 81 | .rts2_cache_cjs/ 82 | .rts2_cache_es/ 83 | .rts2_cache_umd/ 84 | 85 | # Optional REPL history 86 | 87 | .node_repl_history 88 | 89 | # Output of 'npm pack' 90 | 91 | \*.tgz 92 | 93 | # Yarn Integrity file 94 | 95 | .yarn-integrity 96 | 97 | # dotenv environment variable files 98 | 99 | .env 100 | .env.development.local 101 | .env.test.local 102 | .env.production.local 103 | .env.local 104 | 105 | # parcel-bundler cache (https://parceljs.org/) 106 | 107 | .cache 108 | .parcel-cache 109 | 110 | # Next.js build output 111 | 112 | .next 113 | out 114 | 115 | # Nuxt.js build / generate output 116 | 117 | .nuxt 118 | dist 119 | 120 | # Gatsby files 121 | 122 | .cache/ 123 | 124 | # Comment in the public line in if your project uses Gatsby and not Next.js 125 | 126 | # https://nextjs.org/blog/next-9-1#public-directory-support 127 | 128 | # public 129 | 130 | # vuepress build output 131 | 132 | .vuepress/dist 133 | 134 | # vuepress v2.x temp and cache directory 135 | 136 | .temp 137 | .cache 138 | 139 | # Docusaurus cache and generated files 140 | 141 | .docusaurus 142 | 143 | # Serverless directories 144 | 145 | .serverless/ 146 | 147 | # FuseBox cache 148 | 149 | .fusebox/ 150 | 151 | # DynamoDB Local files 152 | 153 | .dynamodb/ 154 | 155 | # TernJS port file 156 | 157 | .tern-port 158 | 159 | # Stores VSCode versions used for testing VSCode extensions 160 | 161 | .vscode-test 162 | 163 | # yarn v2 164 | 165 | .yarn/cache 166 | .yarn/unplugged 167 | .yarn/build-state.yml 168 | .yarn/install-state.gz 169 | .pnp.\* 170 | 171 | # wrangler project 172 | 173 | .dev.vars 174 | .wrangler/ 175 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 80 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.21.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "async-trait" 22 | version = "0.1.77" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" 25 | dependencies = [ 26 | "proc-macro2", 27 | "quote", 28 | "syn", 29 | ] 30 | 31 | [[package]] 32 | name = "autocfg" 33 | version = "1.1.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 36 | 37 | [[package]] 38 | name = "axum" 39 | version = "0.7.4" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" 42 | dependencies = [ 43 | "async-trait", 44 | "axum-core", 45 | "bytes", 46 | "futures-util", 47 | "http", 48 | "http-body", 49 | "http-body-util", 50 | "hyper", 51 | "hyper-util", 52 | "itoa", 53 | "matchit", 54 | "memchr", 55 | "mime", 56 | "percent-encoding", 57 | "pin-project-lite", 58 | "rustversion", 59 | "serde", 60 | "serde_json", 61 | "serde_path_to_error", 62 | "serde_urlencoded", 63 | "sync_wrapper", 64 | "tokio", 65 | "tower", 66 | "tower-layer", 67 | "tower-service", 68 | "tracing", 69 | ] 70 | 71 | [[package]] 72 | name = "axum-core" 73 | version = "0.4.3" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" 76 | dependencies = [ 77 | "async-trait", 78 | "bytes", 79 | "futures-util", 80 | "http", 81 | "http-body", 82 | "http-body-util", 83 | "mime", 84 | "pin-project-lite", 85 | "rustversion", 86 | "sync_wrapper", 87 | "tower-layer", 88 | "tower-service", 89 | "tracing", 90 | ] 91 | 92 | [[package]] 93 | name = "backtrace" 94 | version = "0.3.69" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" 97 | dependencies = [ 98 | "addr2line", 99 | "cc", 100 | "cfg-if 1.0.0", 101 | "libc", 102 | "miniz_oxide", 103 | "object", 104 | "rustc-demangle", 105 | ] 106 | 107 | [[package]] 108 | name = "base64" 109 | version = "0.21.7" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 112 | 113 | [[package]] 114 | name = "bitflags" 115 | version = "1.3.2" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 118 | 119 | [[package]] 120 | name = "block-buffer" 121 | version = "0.10.4" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 124 | dependencies = [ 125 | "generic-array", 126 | ] 127 | 128 | [[package]] 129 | name = "bootstrap2-binary" 130 | version = "0.0.1-alpha" 131 | dependencies = [ 132 | "axum", 133 | "tokio", 134 | ] 135 | 136 | [[package]] 137 | name = "bootstrap2-cf" 138 | version = "0.0.1-alpha" 139 | dependencies = [ 140 | "bootstrap2-core", 141 | "js-sys", 142 | "serde_json", 143 | "wasm-bindgen", 144 | "wasm-bindgen-futures", 145 | "wee_alloc", 146 | ] 147 | 148 | [[package]] 149 | name = "bootstrap2-core" 150 | version = "0.0.1-alpha" 151 | dependencies = [ 152 | "base64", 153 | "ed25519-dalek", 154 | "serde", 155 | "serde_json", 156 | ] 157 | 158 | [[package]] 159 | name = "bumpalo" 160 | version = "3.14.0" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" 163 | 164 | [[package]] 165 | name = "bytes" 166 | version = "1.5.0" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 169 | 170 | [[package]] 171 | name = "cc" 172 | version = "1.0.83" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 175 | dependencies = [ 176 | "libc", 177 | ] 178 | 179 | [[package]] 180 | name = "cfg-if" 181 | version = "0.1.10" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 184 | 185 | [[package]] 186 | name = "cfg-if" 187 | version = "1.0.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 190 | 191 | [[package]] 192 | name = "cpufeatures" 193 | version = "0.2.12" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 196 | dependencies = [ 197 | "libc", 198 | ] 199 | 200 | [[package]] 201 | name = "crypto-common" 202 | version = "0.1.6" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 205 | dependencies = [ 206 | "generic-array", 207 | "typenum", 208 | ] 209 | 210 | [[package]] 211 | name = "curve25519-dalek" 212 | version = "4.1.2" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" 215 | dependencies = [ 216 | "cfg-if 1.0.0", 217 | "cpufeatures", 218 | "curve25519-dalek-derive", 219 | "digest", 220 | "fiat-crypto", 221 | "platforms", 222 | "rustc_version", 223 | "subtle", 224 | ] 225 | 226 | [[package]] 227 | name = "curve25519-dalek-derive" 228 | version = "0.1.1" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 231 | dependencies = [ 232 | "proc-macro2", 233 | "quote", 234 | "syn", 235 | ] 236 | 237 | [[package]] 238 | name = "digest" 239 | version = "0.10.7" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 242 | dependencies = [ 243 | "block-buffer", 244 | "crypto-common", 245 | ] 246 | 247 | [[package]] 248 | name = "ed25519" 249 | version = "2.2.3" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" 252 | dependencies = [ 253 | "signature", 254 | ] 255 | 256 | [[package]] 257 | name = "ed25519-dalek" 258 | version = "2.1.1" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" 261 | dependencies = [ 262 | "curve25519-dalek", 263 | "ed25519", 264 | "sha2", 265 | "subtle", 266 | ] 267 | 268 | [[package]] 269 | name = "equivalent" 270 | version = "1.0.1" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 273 | 274 | [[package]] 275 | name = "fiat-crypto" 276 | version = "0.2.6" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" 279 | 280 | [[package]] 281 | name = "fnv" 282 | version = "1.0.7" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 285 | 286 | [[package]] 287 | name = "form_urlencoded" 288 | version = "1.2.1" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 291 | dependencies = [ 292 | "percent-encoding", 293 | ] 294 | 295 | [[package]] 296 | name = "futures-channel" 297 | version = "0.3.30" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 300 | dependencies = [ 301 | "futures-core", 302 | ] 303 | 304 | [[package]] 305 | name = "futures-core" 306 | version = "0.3.30" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 309 | 310 | [[package]] 311 | name = "futures-sink" 312 | version = "0.3.30" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 315 | 316 | [[package]] 317 | name = "futures-task" 318 | version = "0.3.30" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 321 | 322 | [[package]] 323 | name = "futures-util" 324 | version = "0.3.30" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 327 | dependencies = [ 328 | "futures-core", 329 | "futures-task", 330 | "pin-project-lite", 331 | "pin-utils", 332 | ] 333 | 334 | [[package]] 335 | name = "generic-array" 336 | version = "0.14.7" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 339 | dependencies = [ 340 | "typenum", 341 | "version_check", 342 | ] 343 | 344 | [[package]] 345 | name = "gimli" 346 | version = "0.28.1" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 349 | 350 | [[package]] 351 | name = "h2" 352 | version = "0.4.2" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" 355 | dependencies = [ 356 | "bytes", 357 | "fnv", 358 | "futures-core", 359 | "futures-sink", 360 | "futures-util", 361 | "http", 362 | "indexmap", 363 | "slab", 364 | "tokio", 365 | "tokio-util", 366 | "tracing", 367 | ] 368 | 369 | [[package]] 370 | name = "hashbrown" 371 | version = "0.14.3" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 374 | 375 | [[package]] 376 | name = "hermit-abi" 377 | version = "0.3.5" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" 380 | 381 | [[package]] 382 | name = "http" 383 | version = "1.0.0" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" 386 | dependencies = [ 387 | "bytes", 388 | "fnv", 389 | "itoa", 390 | ] 391 | 392 | [[package]] 393 | name = "http-body" 394 | version = "1.0.0" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" 397 | dependencies = [ 398 | "bytes", 399 | "http", 400 | ] 401 | 402 | [[package]] 403 | name = "http-body-util" 404 | version = "0.1.0" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" 407 | dependencies = [ 408 | "bytes", 409 | "futures-util", 410 | "http", 411 | "http-body", 412 | "pin-project-lite", 413 | ] 414 | 415 | [[package]] 416 | name = "httparse" 417 | version = "1.8.0" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 420 | 421 | [[package]] 422 | name = "httpdate" 423 | version = "1.0.3" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 426 | 427 | [[package]] 428 | name = "hyper" 429 | version = "1.1.0" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" 432 | dependencies = [ 433 | "bytes", 434 | "futures-channel", 435 | "futures-util", 436 | "h2", 437 | "http", 438 | "http-body", 439 | "httparse", 440 | "httpdate", 441 | "itoa", 442 | "pin-project-lite", 443 | "tokio", 444 | ] 445 | 446 | [[package]] 447 | name = "hyper-util" 448 | version = "0.1.3" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" 451 | dependencies = [ 452 | "bytes", 453 | "futures-util", 454 | "http", 455 | "http-body", 456 | "hyper", 457 | "pin-project-lite", 458 | "socket2", 459 | "tokio", 460 | ] 461 | 462 | [[package]] 463 | name = "indexmap" 464 | version = "2.2.2" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" 467 | dependencies = [ 468 | "equivalent", 469 | "hashbrown", 470 | ] 471 | 472 | [[package]] 473 | name = "itoa" 474 | version = "1.0.10" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 477 | 478 | [[package]] 479 | name = "js-sys" 480 | version = "0.3.68" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" 483 | dependencies = [ 484 | "wasm-bindgen", 485 | ] 486 | 487 | [[package]] 488 | name = "libc" 489 | version = "0.2.153" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 492 | 493 | [[package]] 494 | name = "lock_api" 495 | version = "0.4.11" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 498 | dependencies = [ 499 | "autocfg", 500 | "scopeguard", 501 | ] 502 | 503 | [[package]] 504 | name = "log" 505 | version = "0.4.20" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 508 | 509 | [[package]] 510 | name = "matchit" 511 | version = "0.7.3" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" 514 | 515 | [[package]] 516 | name = "memchr" 517 | version = "2.7.1" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 520 | 521 | [[package]] 522 | name = "memory_units" 523 | version = "0.4.0" 524 | source = "registry+https://github.com/rust-lang/crates.io-index" 525 | checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" 526 | 527 | [[package]] 528 | name = "mime" 529 | version = "0.3.17" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 532 | 533 | [[package]] 534 | name = "miniz_oxide" 535 | version = "0.7.2" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" 538 | dependencies = [ 539 | "adler", 540 | ] 541 | 542 | [[package]] 543 | name = "mio" 544 | version = "0.8.10" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" 547 | dependencies = [ 548 | "libc", 549 | "wasi", 550 | "windows-sys", 551 | ] 552 | 553 | [[package]] 554 | name = "num_cpus" 555 | version = "1.16.0" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 558 | dependencies = [ 559 | "hermit-abi", 560 | "libc", 561 | ] 562 | 563 | [[package]] 564 | name = "object" 565 | version = "0.32.2" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 568 | dependencies = [ 569 | "memchr", 570 | ] 571 | 572 | [[package]] 573 | name = "once_cell" 574 | version = "1.19.0" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 577 | 578 | [[package]] 579 | name = "parking_lot" 580 | version = "0.12.1" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 583 | dependencies = [ 584 | "lock_api", 585 | "parking_lot_core", 586 | ] 587 | 588 | [[package]] 589 | name = "parking_lot_core" 590 | version = "0.9.9" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 593 | dependencies = [ 594 | "cfg-if 1.0.0", 595 | "libc", 596 | "redox_syscall", 597 | "smallvec", 598 | "windows-targets", 599 | ] 600 | 601 | [[package]] 602 | name = "percent-encoding" 603 | version = "2.3.1" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 606 | 607 | [[package]] 608 | name = "pin-project" 609 | version = "1.1.4" 610 | source = "registry+https://github.com/rust-lang/crates.io-index" 611 | checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" 612 | dependencies = [ 613 | "pin-project-internal", 614 | ] 615 | 616 | [[package]] 617 | name = "pin-project-internal" 618 | version = "1.1.4" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" 621 | dependencies = [ 622 | "proc-macro2", 623 | "quote", 624 | "syn", 625 | ] 626 | 627 | [[package]] 628 | name = "pin-project-lite" 629 | version = "0.2.13" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 632 | 633 | [[package]] 634 | name = "pin-utils" 635 | version = "0.1.0" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 638 | 639 | [[package]] 640 | name = "platforms" 641 | version = "3.3.0" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" 644 | 645 | [[package]] 646 | name = "proc-macro2" 647 | version = "1.0.78" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" 650 | dependencies = [ 651 | "unicode-ident", 652 | ] 653 | 654 | [[package]] 655 | name = "quote" 656 | version = "1.0.35" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 659 | dependencies = [ 660 | "proc-macro2", 661 | ] 662 | 663 | [[package]] 664 | name = "redox_syscall" 665 | version = "0.4.1" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 668 | dependencies = [ 669 | "bitflags", 670 | ] 671 | 672 | [[package]] 673 | name = "rustc-demangle" 674 | version = "0.1.23" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 677 | 678 | [[package]] 679 | name = "rustc_version" 680 | version = "0.4.0" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 683 | dependencies = [ 684 | "semver", 685 | ] 686 | 687 | [[package]] 688 | name = "rustversion" 689 | version = "1.0.14" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" 692 | 693 | [[package]] 694 | name = "ryu" 695 | version = "1.0.16" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" 698 | 699 | [[package]] 700 | name = "scopeguard" 701 | version = "1.2.0" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 704 | 705 | [[package]] 706 | name = "semver" 707 | version = "1.0.21" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" 710 | 711 | [[package]] 712 | name = "serde" 713 | version = "1.0.196" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" 716 | dependencies = [ 717 | "serde_derive", 718 | ] 719 | 720 | [[package]] 721 | name = "serde_derive" 722 | version = "1.0.196" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" 725 | dependencies = [ 726 | "proc-macro2", 727 | "quote", 728 | "syn", 729 | ] 730 | 731 | [[package]] 732 | name = "serde_json" 733 | version = "1.0.113" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" 736 | dependencies = [ 737 | "itoa", 738 | "ryu", 739 | "serde", 740 | ] 741 | 742 | [[package]] 743 | name = "serde_path_to_error" 744 | version = "0.1.15" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" 747 | dependencies = [ 748 | "itoa", 749 | "serde", 750 | ] 751 | 752 | [[package]] 753 | name = "serde_urlencoded" 754 | version = "0.7.1" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 757 | dependencies = [ 758 | "form_urlencoded", 759 | "itoa", 760 | "ryu", 761 | "serde", 762 | ] 763 | 764 | [[package]] 765 | name = "sha2" 766 | version = "0.10.8" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 769 | dependencies = [ 770 | "cfg-if 1.0.0", 771 | "cpufeatures", 772 | "digest", 773 | ] 774 | 775 | [[package]] 776 | name = "signal-hook-registry" 777 | version = "1.4.1" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 780 | dependencies = [ 781 | "libc", 782 | ] 783 | 784 | [[package]] 785 | name = "signature" 786 | version = "2.2.0" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 789 | 790 | [[package]] 791 | name = "slab" 792 | version = "0.4.9" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 795 | dependencies = [ 796 | "autocfg", 797 | ] 798 | 799 | [[package]] 800 | name = "smallvec" 801 | version = "1.13.1" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" 804 | 805 | [[package]] 806 | name = "socket2" 807 | version = "0.5.5" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 810 | dependencies = [ 811 | "libc", 812 | "windows-sys", 813 | ] 814 | 815 | [[package]] 816 | name = "subtle" 817 | version = "2.5.0" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 820 | 821 | [[package]] 822 | name = "syn" 823 | version = "2.0.48" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" 826 | dependencies = [ 827 | "proc-macro2", 828 | "quote", 829 | "unicode-ident", 830 | ] 831 | 832 | [[package]] 833 | name = "sync_wrapper" 834 | version = "0.1.2" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 837 | 838 | [[package]] 839 | name = "tokio" 840 | version = "1.36.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" 843 | dependencies = [ 844 | "backtrace", 845 | "bytes", 846 | "libc", 847 | "mio", 848 | "num_cpus", 849 | "parking_lot", 850 | "pin-project-lite", 851 | "signal-hook-registry", 852 | "socket2", 853 | "tokio-macros", 854 | "windows-sys", 855 | ] 856 | 857 | [[package]] 858 | name = "tokio-macros" 859 | version = "2.2.0" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" 862 | dependencies = [ 863 | "proc-macro2", 864 | "quote", 865 | "syn", 866 | ] 867 | 868 | [[package]] 869 | name = "tokio-util" 870 | version = "0.7.10" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" 873 | dependencies = [ 874 | "bytes", 875 | "futures-core", 876 | "futures-sink", 877 | "pin-project-lite", 878 | "tokio", 879 | "tracing", 880 | ] 881 | 882 | [[package]] 883 | name = "tower" 884 | version = "0.4.13" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 887 | dependencies = [ 888 | "futures-core", 889 | "futures-util", 890 | "pin-project", 891 | "pin-project-lite", 892 | "tokio", 893 | "tower-layer", 894 | "tower-service", 895 | "tracing", 896 | ] 897 | 898 | [[package]] 899 | name = "tower-layer" 900 | version = "0.3.2" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 903 | 904 | [[package]] 905 | name = "tower-service" 906 | version = "0.3.2" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 909 | 910 | [[package]] 911 | name = "tracing" 912 | version = "0.1.40" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 915 | dependencies = [ 916 | "log", 917 | "pin-project-lite", 918 | "tracing-core", 919 | ] 920 | 921 | [[package]] 922 | name = "tracing-core" 923 | version = "0.1.32" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 926 | dependencies = [ 927 | "once_cell", 928 | ] 929 | 930 | [[package]] 931 | name = "typenum" 932 | version = "1.17.0" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 935 | 936 | [[package]] 937 | name = "unicode-ident" 938 | version = "1.0.12" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 941 | 942 | [[package]] 943 | name = "version_check" 944 | version = "0.9.4" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 947 | 948 | [[package]] 949 | name = "wasi" 950 | version = "0.11.0+wasi-snapshot-preview1" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 953 | 954 | [[package]] 955 | name = "wasm-bindgen" 956 | version = "0.2.91" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" 959 | dependencies = [ 960 | "cfg-if 1.0.0", 961 | "wasm-bindgen-macro", 962 | ] 963 | 964 | [[package]] 965 | name = "wasm-bindgen-backend" 966 | version = "0.2.91" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" 969 | dependencies = [ 970 | "bumpalo", 971 | "log", 972 | "once_cell", 973 | "proc-macro2", 974 | "quote", 975 | "syn", 976 | "wasm-bindgen-shared", 977 | ] 978 | 979 | [[package]] 980 | name = "wasm-bindgen-futures" 981 | version = "0.4.41" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" 984 | dependencies = [ 985 | "cfg-if 1.0.0", 986 | "js-sys", 987 | "wasm-bindgen", 988 | "web-sys", 989 | ] 990 | 991 | [[package]] 992 | name = "wasm-bindgen-macro" 993 | version = "0.2.91" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" 996 | dependencies = [ 997 | "quote", 998 | "wasm-bindgen-macro-support", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "wasm-bindgen-macro-support" 1003 | version = "0.2.91" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" 1006 | dependencies = [ 1007 | "proc-macro2", 1008 | "quote", 1009 | "syn", 1010 | "wasm-bindgen-backend", 1011 | "wasm-bindgen-shared", 1012 | ] 1013 | 1014 | [[package]] 1015 | name = "wasm-bindgen-shared" 1016 | version = "0.2.91" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" 1019 | 1020 | [[package]] 1021 | name = "web-sys" 1022 | version = "0.3.68" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" 1025 | dependencies = [ 1026 | "js-sys", 1027 | "wasm-bindgen", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "wee_alloc" 1032 | version = "0.4.5" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" 1035 | dependencies = [ 1036 | "cfg-if 0.1.10", 1037 | "libc", 1038 | "memory_units", 1039 | "winapi", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "winapi" 1044 | version = "0.3.9" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1047 | dependencies = [ 1048 | "winapi-i686-pc-windows-gnu", 1049 | "winapi-x86_64-pc-windows-gnu", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "winapi-i686-pc-windows-gnu" 1054 | version = "0.4.0" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1057 | 1058 | [[package]] 1059 | name = "winapi-x86_64-pc-windows-gnu" 1060 | version = "0.4.0" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1063 | 1064 | [[package]] 1065 | name = "windows-sys" 1066 | version = "0.48.0" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1069 | dependencies = [ 1070 | "windows-targets", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "windows-targets" 1075 | version = "0.48.5" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1078 | dependencies = [ 1079 | "windows_aarch64_gnullvm", 1080 | "windows_aarch64_msvc", 1081 | "windows_i686_gnu", 1082 | "windows_i686_msvc", 1083 | "windows_x86_64_gnu", 1084 | "windows_x86_64_gnullvm", 1085 | "windows_x86_64_msvc", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "windows_aarch64_gnullvm" 1090 | version = "0.48.5" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1093 | 1094 | [[package]] 1095 | name = "windows_aarch64_msvc" 1096 | version = "0.48.5" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1099 | 1100 | [[package]] 1101 | name = "windows_i686_gnu" 1102 | version = "0.48.5" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1105 | 1106 | [[package]] 1107 | name = "windows_i686_msvc" 1108 | version = "0.48.5" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1111 | 1112 | [[package]] 1113 | name = "windows_x86_64_gnu" 1114 | version = "0.48.5" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1117 | 1118 | [[package]] 1119 | name = "windows_x86_64_gnullvm" 1120 | version = "0.48.5" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1123 | 1124 | [[package]] 1125 | name = "windows_x86_64_msvc" 1126 | version = "0.48.5" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1129 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | members = [ 4 | "bootstrap2-core", 5 | "bootstrap2-binary", 6 | "bootstrap2-cf", 7 | ] 8 | 9 | [profile.dev] 10 | panic = "abort" 11 | 12 | [profile.release] 13 | panic = "abort" 14 | lto = true 15 | 16 | [workspace.dependencies] 17 | base64 = { version = "0.21.7", default-features = false, features = [ "alloc" ] } 18 | bootstrap2-core = { version = "0.0.1-alpha", path = "./bootstrap2-core", default-features = false } 19 | ed25519-dalek = { version = "2.1.1", default-features = false } 20 | serde = { version = "1.0.196", default-features = false, features = [ "alloc", "derive" ] } 21 | serde_json = { version = "1.0.113", default-features = false, features = [ "alloc" ] } 22 | -------------------------------------------------------------------------------- /bootstrap2-binary/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bootstrap2-binary" 3 | version = "0.0.1-alpha" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | axum = "0.7.4" 8 | tokio = { version = "1.36.0", features = [ "full" ] } 9 | -------------------------------------------------------------------------------- /bootstrap2-binary/src/main.rs: -------------------------------------------------------------------------------- 1 | #[tokio::main(flavor = "multi_thread")] 2 | async fn main() { 3 | let app = axum::Router::new().fallback(handle); 4 | let listener = tokio::net::TcpListener::bind("0.0.0.0:0").await.unwrap(); 5 | println!("{:?}", listener.local_addr()); 6 | axum::serve(listener, app).await.unwrap(); 7 | } 8 | 9 | async fn handle(req: axum::extract::Request) -> axum::response::Result { 10 | let method = req.method().as_str().to_string(); 11 | let path = req.uri().path().to_string(); 12 | let body = axum::body::to_bytes(req.into_body(), 4096) 13 | .await 14 | .map_err(|e| e.to_string())?; 15 | println!("{method} {path} {}", String::from_utf8_lossy(&body)); 16 | let mut out = axum::response::Response::new( 17 | axum::body::Body::from(format!(r#"{{ 18 | "method": "{method}", 19 | "path": "{path}" 20 | }} 21 | "#, 22 | )), 23 | ); 24 | out.headers_mut().insert( 25 | "content-type", 26 | axum::http::header::HeaderValue::from_static("application/json"), 27 | ); 28 | 29 | Ok(out) 30 | } 31 | -------------------------------------------------------------------------------- /bootstrap2-cf/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bootstrap2-cf" 3 | version = "0.0.1-alpha" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["cdylib"] 8 | 9 | [dependencies] 10 | bootstrap2-core = { workspace = true } 11 | js-sys = { version = "0.3.68", default-features = false } 12 | serde_json = { workspace = true } 13 | wasm-bindgen = { version = "0.2.91", default-features = false } 14 | wasm-bindgen-futures = { version = "0.4.41", default-features = false } 15 | wee_alloc = { version = "0.4.5", default-features = false } 16 | -------------------------------------------------------------------------------- /bootstrap2-cf/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap2-cf", 3 | "version": "0.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "bootstrap2-cf", 9 | "version": "0.0.0", 10 | "devDependencies": { 11 | "wrangler": "^3.0.0" 12 | } 13 | }, 14 | "node_modules/@cloudflare/kv-asset-handler": { 15 | "version": "0.2.0", 16 | "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.2.0.tgz", 17 | "integrity": "sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A==", 18 | "dev": true, 19 | "dependencies": { 20 | "mime": "^3.0.0" 21 | } 22 | }, 23 | "node_modules/@cloudflare/workerd-darwin-64": { 24 | "version": "1.20240129.0", 25 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240129.0.tgz", 26 | "integrity": "sha512-DfVVB5IsQLVcWPJwV019vY3nEtU88c2Qu2ST5SQxqcGivZ52imagLRK0RHCIP8PK4piSiq90qUC6ybppUsw8eg==", 27 | "cpu": [ 28 | "x64" 29 | ], 30 | "dev": true, 31 | "optional": true, 32 | "os": [ 33 | "darwin" 34 | ], 35 | "engines": { 36 | "node": ">=16" 37 | } 38 | }, 39 | "node_modules/@cloudflare/workerd-darwin-arm64": { 40 | "version": "1.20240129.0", 41 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240129.0.tgz", 42 | "integrity": "sha512-t0q8ABkmumG1zRM/MZ/vIv/Ysx0vTAXnQAPy/JW5aeQi/tqrypXkO9/NhPc0jbF/g/hIPrWEqpDgEp3CB7Da7Q==", 43 | "cpu": [ 44 | "arm64" 45 | ], 46 | "dev": true, 47 | "optional": true, 48 | "os": [ 49 | "darwin" 50 | ], 51 | "engines": { 52 | "node": ">=16" 53 | } 54 | }, 55 | "node_modules/@cloudflare/workerd-linux-64": { 56 | "version": "1.20240129.0", 57 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240129.0.tgz", 58 | "integrity": "sha512-sFV1uobHgDI+6CKBS/ZshQvOvajgwl6BtiYaH4PSFSpvXTmRx+A9bcug+6BnD+V4WgwxTiEO2iR97E1XuwDAVw==", 59 | "cpu": [ 60 | "x64" 61 | ], 62 | "dev": true, 63 | "optional": true, 64 | "os": [ 65 | "linux" 66 | ], 67 | "engines": { 68 | "node": ">=16" 69 | } 70 | }, 71 | "node_modules/@cloudflare/workerd-linux-arm64": { 72 | "version": "1.20240129.0", 73 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240129.0.tgz", 74 | "integrity": "sha512-O7q7htHaFRp8PgTqNJx1/fYc3+LnvAo6kWWB9a14C5OWak6AAZk42PNpKPx+DXTmGvI+8S1+futBGUeJ8NPDXg==", 75 | "cpu": [ 76 | "arm64" 77 | ], 78 | "dev": true, 79 | "optional": true, 80 | "os": [ 81 | "linux" 82 | ], 83 | "engines": { 84 | "node": ">=16" 85 | } 86 | }, 87 | "node_modules/@cloudflare/workerd-windows-64": { 88 | "version": "1.20240129.0", 89 | "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240129.0.tgz", 90 | "integrity": "sha512-YqGno0XSqqqkDmNoGEX6M8kJlI2lEfWntbTPVtHaZlaXVR9sWfoD7TEno0NKC95cXFz+ioyFLbgbOdnfWwmVAA==", 91 | "cpu": [ 92 | "x64" 93 | ], 94 | "dev": true, 95 | "optional": true, 96 | "os": [ 97 | "win32" 98 | ], 99 | "engines": { 100 | "node": ">=16" 101 | } 102 | }, 103 | "node_modules/@cspotcode/source-map-support": { 104 | "version": "0.8.1", 105 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", 106 | "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", 107 | "dev": true, 108 | "dependencies": { 109 | "@jridgewell/trace-mapping": "0.3.9" 110 | }, 111 | "engines": { 112 | "node": ">=12" 113 | } 114 | }, 115 | "node_modules/@esbuild-plugins/node-globals-polyfill": { 116 | "version": "0.2.3", 117 | "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", 118 | "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", 119 | "dev": true, 120 | "peerDependencies": { 121 | "esbuild": "*" 122 | } 123 | }, 124 | "node_modules/@esbuild-plugins/node-modules-polyfill": { 125 | "version": "0.2.2", 126 | "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", 127 | "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", 128 | "dev": true, 129 | "dependencies": { 130 | "escape-string-regexp": "^4.0.0", 131 | "rollup-plugin-node-polyfills": "^0.2.1" 132 | }, 133 | "peerDependencies": { 134 | "esbuild": "*" 135 | } 136 | }, 137 | "node_modules/@esbuild/android-arm": { 138 | "version": "0.17.19", 139 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", 140 | "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", 141 | "cpu": [ 142 | "arm" 143 | ], 144 | "dev": true, 145 | "optional": true, 146 | "os": [ 147 | "android" 148 | ], 149 | "engines": { 150 | "node": ">=12" 151 | } 152 | }, 153 | "node_modules/@esbuild/android-arm64": { 154 | "version": "0.17.19", 155 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", 156 | "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", 157 | "cpu": [ 158 | "arm64" 159 | ], 160 | "dev": true, 161 | "optional": true, 162 | "os": [ 163 | "android" 164 | ], 165 | "engines": { 166 | "node": ">=12" 167 | } 168 | }, 169 | "node_modules/@esbuild/android-x64": { 170 | "version": "0.17.19", 171 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", 172 | "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", 173 | "cpu": [ 174 | "x64" 175 | ], 176 | "dev": true, 177 | "optional": true, 178 | "os": [ 179 | "android" 180 | ], 181 | "engines": { 182 | "node": ">=12" 183 | } 184 | }, 185 | "node_modules/@esbuild/darwin-arm64": { 186 | "version": "0.17.19", 187 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", 188 | "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", 189 | "cpu": [ 190 | "arm64" 191 | ], 192 | "dev": true, 193 | "optional": true, 194 | "os": [ 195 | "darwin" 196 | ], 197 | "engines": { 198 | "node": ">=12" 199 | } 200 | }, 201 | "node_modules/@esbuild/darwin-x64": { 202 | "version": "0.17.19", 203 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", 204 | "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", 205 | "cpu": [ 206 | "x64" 207 | ], 208 | "dev": true, 209 | "optional": true, 210 | "os": [ 211 | "darwin" 212 | ], 213 | "engines": { 214 | "node": ">=12" 215 | } 216 | }, 217 | "node_modules/@esbuild/freebsd-arm64": { 218 | "version": "0.17.19", 219 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", 220 | "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", 221 | "cpu": [ 222 | "arm64" 223 | ], 224 | "dev": true, 225 | "optional": true, 226 | "os": [ 227 | "freebsd" 228 | ], 229 | "engines": { 230 | "node": ">=12" 231 | } 232 | }, 233 | "node_modules/@esbuild/freebsd-x64": { 234 | "version": "0.17.19", 235 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", 236 | "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", 237 | "cpu": [ 238 | "x64" 239 | ], 240 | "dev": true, 241 | "optional": true, 242 | "os": [ 243 | "freebsd" 244 | ], 245 | "engines": { 246 | "node": ">=12" 247 | } 248 | }, 249 | "node_modules/@esbuild/linux-arm": { 250 | "version": "0.17.19", 251 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", 252 | "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", 253 | "cpu": [ 254 | "arm" 255 | ], 256 | "dev": true, 257 | "optional": true, 258 | "os": [ 259 | "linux" 260 | ], 261 | "engines": { 262 | "node": ">=12" 263 | } 264 | }, 265 | "node_modules/@esbuild/linux-arm64": { 266 | "version": "0.17.19", 267 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", 268 | "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", 269 | "cpu": [ 270 | "arm64" 271 | ], 272 | "dev": true, 273 | "optional": true, 274 | "os": [ 275 | "linux" 276 | ], 277 | "engines": { 278 | "node": ">=12" 279 | } 280 | }, 281 | "node_modules/@esbuild/linux-ia32": { 282 | "version": "0.17.19", 283 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", 284 | "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", 285 | "cpu": [ 286 | "ia32" 287 | ], 288 | "dev": true, 289 | "optional": true, 290 | "os": [ 291 | "linux" 292 | ], 293 | "engines": { 294 | "node": ">=12" 295 | } 296 | }, 297 | "node_modules/@esbuild/linux-loong64": { 298 | "version": "0.17.19", 299 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", 300 | "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", 301 | "cpu": [ 302 | "loong64" 303 | ], 304 | "dev": true, 305 | "optional": true, 306 | "os": [ 307 | "linux" 308 | ], 309 | "engines": { 310 | "node": ">=12" 311 | } 312 | }, 313 | "node_modules/@esbuild/linux-mips64el": { 314 | "version": "0.17.19", 315 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", 316 | "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", 317 | "cpu": [ 318 | "mips64el" 319 | ], 320 | "dev": true, 321 | "optional": true, 322 | "os": [ 323 | "linux" 324 | ], 325 | "engines": { 326 | "node": ">=12" 327 | } 328 | }, 329 | "node_modules/@esbuild/linux-ppc64": { 330 | "version": "0.17.19", 331 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", 332 | "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", 333 | "cpu": [ 334 | "ppc64" 335 | ], 336 | "dev": true, 337 | "optional": true, 338 | "os": [ 339 | "linux" 340 | ], 341 | "engines": { 342 | "node": ">=12" 343 | } 344 | }, 345 | "node_modules/@esbuild/linux-riscv64": { 346 | "version": "0.17.19", 347 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", 348 | "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", 349 | "cpu": [ 350 | "riscv64" 351 | ], 352 | "dev": true, 353 | "optional": true, 354 | "os": [ 355 | "linux" 356 | ], 357 | "engines": { 358 | "node": ">=12" 359 | } 360 | }, 361 | "node_modules/@esbuild/linux-s390x": { 362 | "version": "0.17.19", 363 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", 364 | "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", 365 | "cpu": [ 366 | "s390x" 367 | ], 368 | "dev": true, 369 | "optional": true, 370 | "os": [ 371 | "linux" 372 | ], 373 | "engines": { 374 | "node": ">=12" 375 | } 376 | }, 377 | "node_modules/@esbuild/linux-x64": { 378 | "version": "0.17.19", 379 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", 380 | "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", 381 | "cpu": [ 382 | "x64" 383 | ], 384 | "dev": true, 385 | "optional": true, 386 | "os": [ 387 | "linux" 388 | ], 389 | "engines": { 390 | "node": ">=12" 391 | } 392 | }, 393 | "node_modules/@esbuild/netbsd-x64": { 394 | "version": "0.17.19", 395 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", 396 | "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", 397 | "cpu": [ 398 | "x64" 399 | ], 400 | "dev": true, 401 | "optional": true, 402 | "os": [ 403 | "netbsd" 404 | ], 405 | "engines": { 406 | "node": ">=12" 407 | } 408 | }, 409 | "node_modules/@esbuild/openbsd-x64": { 410 | "version": "0.17.19", 411 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", 412 | "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", 413 | "cpu": [ 414 | "x64" 415 | ], 416 | "dev": true, 417 | "optional": true, 418 | "os": [ 419 | "openbsd" 420 | ], 421 | "engines": { 422 | "node": ">=12" 423 | } 424 | }, 425 | "node_modules/@esbuild/sunos-x64": { 426 | "version": "0.17.19", 427 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", 428 | "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", 429 | "cpu": [ 430 | "x64" 431 | ], 432 | "dev": true, 433 | "optional": true, 434 | "os": [ 435 | "sunos" 436 | ], 437 | "engines": { 438 | "node": ">=12" 439 | } 440 | }, 441 | "node_modules/@esbuild/win32-arm64": { 442 | "version": "0.17.19", 443 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", 444 | "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", 445 | "cpu": [ 446 | "arm64" 447 | ], 448 | "dev": true, 449 | "optional": true, 450 | "os": [ 451 | "win32" 452 | ], 453 | "engines": { 454 | "node": ">=12" 455 | } 456 | }, 457 | "node_modules/@esbuild/win32-ia32": { 458 | "version": "0.17.19", 459 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", 460 | "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", 461 | "cpu": [ 462 | "ia32" 463 | ], 464 | "dev": true, 465 | "optional": true, 466 | "os": [ 467 | "win32" 468 | ], 469 | "engines": { 470 | "node": ">=12" 471 | } 472 | }, 473 | "node_modules/@esbuild/win32-x64": { 474 | "version": "0.17.19", 475 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", 476 | "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", 477 | "cpu": [ 478 | "x64" 479 | ], 480 | "dev": true, 481 | "optional": true, 482 | "os": [ 483 | "win32" 484 | ], 485 | "engines": { 486 | "node": ">=12" 487 | } 488 | }, 489 | "node_modules/@fastify/busboy": { 490 | "version": "2.1.0", 491 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", 492 | "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", 493 | "dev": true, 494 | "engines": { 495 | "node": ">=14" 496 | } 497 | }, 498 | "node_modules/@jridgewell/resolve-uri": { 499 | "version": "3.1.1", 500 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 501 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 502 | "dev": true, 503 | "engines": { 504 | "node": ">=6.0.0" 505 | } 506 | }, 507 | "node_modules/@jridgewell/sourcemap-codec": { 508 | "version": "1.4.15", 509 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 510 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 511 | "dev": true 512 | }, 513 | "node_modules/@jridgewell/trace-mapping": { 514 | "version": "0.3.9", 515 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", 516 | "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", 517 | "dev": true, 518 | "dependencies": { 519 | "@jridgewell/resolve-uri": "^3.0.3", 520 | "@jridgewell/sourcemap-codec": "^1.4.10" 521 | } 522 | }, 523 | "node_modules/@types/node": { 524 | "version": "20.11.16", 525 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", 526 | "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", 527 | "dev": true, 528 | "dependencies": { 529 | "undici-types": "~5.26.4" 530 | } 531 | }, 532 | "node_modules/@types/node-forge": { 533 | "version": "1.3.11", 534 | "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", 535 | "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", 536 | "dev": true, 537 | "dependencies": { 538 | "@types/node": "*" 539 | } 540 | }, 541 | "node_modules/acorn": { 542 | "version": "8.11.3", 543 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", 544 | "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", 545 | "dev": true, 546 | "bin": { 547 | "acorn": "bin/acorn" 548 | }, 549 | "engines": { 550 | "node": ">=0.4.0" 551 | } 552 | }, 553 | "node_modules/acorn-walk": { 554 | "version": "8.3.2", 555 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", 556 | "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", 557 | "dev": true, 558 | "engines": { 559 | "node": ">=0.4.0" 560 | } 561 | }, 562 | "node_modules/anymatch": { 563 | "version": "3.1.3", 564 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 565 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 566 | "dev": true, 567 | "dependencies": { 568 | "normalize-path": "^3.0.0", 569 | "picomatch": "^2.0.4" 570 | }, 571 | "engines": { 572 | "node": ">= 8" 573 | } 574 | }, 575 | "node_modules/as-table": { 576 | "version": "1.0.55", 577 | "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", 578 | "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", 579 | "dev": true, 580 | "dependencies": { 581 | "printable-characters": "^1.0.42" 582 | } 583 | }, 584 | "node_modules/binary-extensions": { 585 | "version": "2.2.0", 586 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 587 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 588 | "dev": true, 589 | "engines": { 590 | "node": ">=8" 591 | } 592 | }, 593 | "node_modules/blake3-wasm": { 594 | "version": "2.1.5", 595 | "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", 596 | "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", 597 | "dev": true 598 | }, 599 | "node_modules/braces": { 600 | "version": "3.0.2", 601 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 602 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 603 | "dev": true, 604 | "dependencies": { 605 | "fill-range": "^7.0.1" 606 | }, 607 | "engines": { 608 | "node": ">=8" 609 | } 610 | }, 611 | "node_modules/capnp-ts": { 612 | "version": "0.7.0", 613 | "resolved": "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz", 614 | "integrity": "sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==", 615 | "dev": true, 616 | "dependencies": { 617 | "debug": "^4.3.1", 618 | "tslib": "^2.2.0" 619 | } 620 | }, 621 | "node_modules/chokidar": { 622 | "version": "3.6.0", 623 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", 624 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 625 | "dev": true, 626 | "dependencies": { 627 | "anymatch": "~3.1.2", 628 | "braces": "~3.0.2", 629 | "glob-parent": "~5.1.2", 630 | "is-binary-path": "~2.1.0", 631 | "is-glob": "~4.0.1", 632 | "normalize-path": "~3.0.0", 633 | "readdirp": "~3.6.0" 634 | }, 635 | "engines": { 636 | "node": ">= 8.10.0" 637 | }, 638 | "funding": { 639 | "url": "https://paulmillr.com/funding/" 640 | }, 641 | "optionalDependencies": { 642 | "fsevents": "~2.3.2" 643 | } 644 | }, 645 | "node_modules/cookie": { 646 | "version": "0.5.0", 647 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 648 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 649 | "dev": true, 650 | "engines": { 651 | "node": ">= 0.6" 652 | } 653 | }, 654 | "node_modules/data-uri-to-buffer": { 655 | "version": "2.0.2", 656 | "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", 657 | "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", 658 | "dev": true 659 | }, 660 | "node_modules/debug": { 661 | "version": "4.3.4", 662 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 663 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 664 | "dev": true, 665 | "dependencies": { 666 | "ms": "2.1.2" 667 | }, 668 | "engines": { 669 | "node": ">=6.0" 670 | }, 671 | "peerDependenciesMeta": { 672 | "supports-color": { 673 | "optional": true 674 | } 675 | } 676 | }, 677 | "node_modules/esbuild": { 678 | "version": "0.17.19", 679 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", 680 | "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", 681 | "dev": true, 682 | "hasInstallScript": true, 683 | "bin": { 684 | "esbuild": "bin/esbuild" 685 | }, 686 | "engines": { 687 | "node": ">=12" 688 | }, 689 | "optionalDependencies": { 690 | "@esbuild/android-arm": "0.17.19", 691 | "@esbuild/android-arm64": "0.17.19", 692 | "@esbuild/android-x64": "0.17.19", 693 | "@esbuild/darwin-arm64": "0.17.19", 694 | "@esbuild/darwin-x64": "0.17.19", 695 | "@esbuild/freebsd-arm64": "0.17.19", 696 | "@esbuild/freebsd-x64": "0.17.19", 697 | "@esbuild/linux-arm": "0.17.19", 698 | "@esbuild/linux-arm64": "0.17.19", 699 | "@esbuild/linux-ia32": "0.17.19", 700 | "@esbuild/linux-loong64": "0.17.19", 701 | "@esbuild/linux-mips64el": "0.17.19", 702 | "@esbuild/linux-ppc64": "0.17.19", 703 | "@esbuild/linux-riscv64": "0.17.19", 704 | "@esbuild/linux-s390x": "0.17.19", 705 | "@esbuild/linux-x64": "0.17.19", 706 | "@esbuild/netbsd-x64": "0.17.19", 707 | "@esbuild/openbsd-x64": "0.17.19", 708 | "@esbuild/sunos-x64": "0.17.19", 709 | "@esbuild/win32-arm64": "0.17.19", 710 | "@esbuild/win32-ia32": "0.17.19", 711 | "@esbuild/win32-x64": "0.17.19" 712 | } 713 | }, 714 | "node_modules/escape-string-regexp": { 715 | "version": "4.0.0", 716 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 717 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 718 | "dev": true, 719 | "engines": { 720 | "node": ">=10" 721 | }, 722 | "funding": { 723 | "url": "https://github.com/sponsors/sindresorhus" 724 | } 725 | }, 726 | "node_modules/estree-walker": { 727 | "version": "0.6.1", 728 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 729 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 730 | "dev": true 731 | }, 732 | "node_modules/exit-hook": { 733 | "version": "2.2.1", 734 | "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", 735 | "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", 736 | "dev": true, 737 | "engines": { 738 | "node": ">=6" 739 | }, 740 | "funding": { 741 | "url": "https://github.com/sponsors/sindresorhus" 742 | } 743 | }, 744 | "node_modules/fill-range": { 745 | "version": "7.0.1", 746 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 747 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 748 | "dev": true, 749 | "dependencies": { 750 | "to-regex-range": "^5.0.1" 751 | }, 752 | "engines": { 753 | "node": ">=8" 754 | } 755 | }, 756 | "node_modules/fsevents": { 757 | "version": "2.3.3", 758 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 759 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 760 | "dev": true, 761 | "hasInstallScript": true, 762 | "optional": true, 763 | "os": [ 764 | "darwin" 765 | ], 766 | "engines": { 767 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 768 | } 769 | }, 770 | "node_modules/function-bind": { 771 | "version": "1.1.2", 772 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 773 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 774 | "dev": true, 775 | "funding": { 776 | "url": "https://github.com/sponsors/ljharb" 777 | } 778 | }, 779 | "node_modules/get-source": { 780 | "version": "2.0.12", 781 | "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", 782 | "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", 783 | "dev": true, 784 | "dependencies": { 785 | "data-uri-to-buffer": "^2.0.0", 786 | "source-map": "^0.6.1" 787 | } 788 | }, 789 | "node_modules/glob-parent": { 790 | "version": "5.1.2", 791 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 792 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 793 | "dev": true, 794 | "dependencies": { 795 | "is-glob": "^4.0.1" 796 | }, 797 | "engines": { 798 | "node": ">= 6" 799 | } 800 | }, 801 | "node_modules/glob-to-regexp": { 802 | "version": "0.4.1", 803 | "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", 804 | "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", 805 | "dev": true 806 | }, 807 | "node_modules/hasown": { 808 | "version": "2.0.0", 809 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 810 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 811 | "dev": true, 812 | "dependencies": { 813 | "function-bind": "^1.1.2" 814 | }, 815 | "engines": { 816 | "node": ">= 0.4" 817 | } 818 | }, 819 | "node_modules/is-binary-path": { 820 | "version": "2.1.0", 821 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 822 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 823 | "dev": true, 824 | "dependencies": { 825 | "binary-extensions": "^2.0.0" 826 | }, 827 | "engines": { 828 | "node": ">=8" 829 | } 830 | }, 831 | "node_modules/is-core-module": { 832 | "version": "2.13.1", 833 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", 834 | "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", 835 | "dev": true, 836 | "dependencies": { 837 | "hasown": "^2.0.0" 838 | }, 839 | "funding": { 840 | "url": "https://github.com/sponsors/ljharb" 841 | } 842 | }, 843 | "node_modules/is-extglob": { 844 | "version": "2.1.1", 845 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 846 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 847 | "dev": true, 848 | "engines": { 849 | "node": ">=0.10.0" 850 | } 851 | }, 852 | "node_modules/is-glob": { 853 | "version": "4.0.3", 854 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 855 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 856 | "dev": true, 857 | "dependencies": { 858 | "is-extglob": "^2.1.1" 859 | }, 860 | "engines": { 861 | "node": ">=0.10.0" 862 | } 863 | }, 864 | "node_modules/is-number": { 865 | "version": "7.0.0", 866 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 867 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 868 | "dev": true, 869 | "engines": { 870 | "node": ">=0.12.0" 871 | } 872 | }, 873 | "node_modules/magic-string": { 874 | "version": "0.25.9", 875 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", 876 | "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", 877 | "dev": true, 878 | "dependencies": { 879 | "sourcemap-codec": "^1.4.8" 880 | } 881 | }, 882 | "node_modules/mime": { 883 | "version": "3.0.0", 884 | "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", 885 | "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", 886 | "dev": true, 887 | "bin": { 888 | "mime": "cli.js" 889 | }, 890 | "engines": { 891 | "node": ">=10.0.0" 892 | } 893 | }, 894 | "node_modules/miniflare": { 895 | "version": "3.20240129.1", 896 | "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20240129.1.tgz", 897 | "integrity": "sha512-GfqclPxbTnam4S8GKHRkFyr+s+szELK/ORtQ3ZFUiGBO4HNJsaeA6RhBMKBH7iHqn5ng035cyPsLZvH35lwtsA==", 898 | "dev": true, 899 | "dependencies": { 900 | "@cspotcode/source-map-support": "0.8.1", 901 | "acorn": "^8.8.0", 902 | "acorn-walk": "^8.2.0", 903 | "capnp-ts": "^0.7.0", 904 | "exit-hook": "^2.2.1", 905 | "glob-to-regexp": "^0.4.1", 906 | "stoppable": "^1.1.0", 907 | "undici": "^5.28.2", 908 | "workerd": "1.20240129.0", 909 | "ws": "^8.11.0", 910 | "youch": "^3.2.2", 911 | "zod": "^3.20.6" 912 | }, 913 | "bin": { 914 | "miniflare": "bootstrap.js" 915 | }, 916 | "engines": { 917 | "node": ">=16.13" 918 | } 919 | }, 920 | "node_modules/ms": { 921 | "version": "2.1.2", 922 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 923 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 924 | "dev": true 925 | }, 926 | "node_modules/mustache": { 927 | "version": "4.2.0", 928 | "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", 929 | "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", 930 | "dev": true, 931 | "bin": { 932 | "mustache": "bin/mustache" 933 | } 934 | }, 935 | "node_modules/nanoid": { 936 | "version": "3.3.7", 937 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", 938 | "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", 939 | "dev": true, 940 | "funding": [ 941 | { 942 | "type": "github", 943 | "url": "https://github.com/sponsors/ai" 944 | } 945 | ], 946 | "bin": { 947 | "nanoid": "bin/nanoid.cjs" 948 | }, 949 | "engines": { 950 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 951 | } 952 | }, 953 | "node_modules/node-forge": { 954 | "version": "1.3.1", 955 | "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", 956 | "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", 957 | "dev": true, 958 | "engines": { 959 | "node": ">= 6.13.0" 960 | } 961 | }, 962 | "node_modules/normalize-path": { 963 | "version": "3.0.0", 964 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 965 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 966 | "dev": true, 967 | "engines": { 968 | "node": ">=0.10.0" 969 | } 970 | }, 971 | "node_modules/path-parse": { 972 | "version": "1.0.7", 973 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 974 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 975 | "dev": true 976 | }, 977 | "node_modules/path-to-regexp": { 978 | "version": "6.2.1", 979 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", 980 | "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", 981 | "dev": true 982 | }, 983 | "node_modules/picomatch": { 984 | "version": "2.3.1", 985 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 986 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 987 | "dev": true, 988 | "engines": { 989 | "node": ">=8.6" 990 | }, 991 | "funding": { 992 | "url": "https://github.com/sponsors/jonschlinkert" 993 | } 994 | }, 995 | "node_modules/printable-characters": { 996 | "version": "1.0.42", 997 | "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", 998 | "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", 999 | "dev": true 1000 | }, 1001 | "node_modules/readdirp": { 1002 | "version": "3.6.0", 1003 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1004 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1005 | "dev": true, 1006 | "dependencies": { 1007 | "picomatch": "^2.2.1" 1008 | }, 1009 | "engines": { 1010 | "node": ">=8.10.0" 1011 | } 1012 | }, 1013 | "node_modules/resolve": { 1014 | "version": "1.22.8", 1015 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", 1016 | "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", 1017 | "dev": true, 1018 | "dependencies": { 1019 | "is-core-module": "^2.13.0", 1020 | "path-parse": "^1.0.7", 1021 | "supports-preserve-symlinks-flag": "^1.0.0" 1022 | }, 1023 | "bin": { 1024 | "resolve": "bin/resolve" 1025 | }, 1026 | "funding": { 1027 | "url": "https://github.com/sponsors/ljharb" 1028 | } 1029 | }, 1030 | "node_modules/resolve.exports": { 1031 | "version": "2.0.2", 1032 | "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", 1033 | "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", 1034 | "dev": true, 1035 | "engines": { 1036 | "node": ">=10" 1037 | } 1038 | }, 1039 | "node_modules/rollup-plugin-inject": { 1040 | "version": "3.0.2", 1041 | "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", 1042 | "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", 1043 | "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", 1044 | "dev": true, 1045 | "dependencies": { 1046 | "estree-walker": "^0.6.1", 1047 | "magic-string": "^0.25.3", 1048 | "rollup-pluginutils": "^2.8.1" 1049 | } 1050 | }, 1051 | "node_modules/rollup-plugin-node-polyfills": { 1052 | "version": "0.2.1", 1053 | "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", 1054 | "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", 1055 | "dev": true, 1056 | "dependencies": { 1057 | "rollup-plugin-inject": "^3.0.0" 1058 | } 1059 | }, 1060 | "node_modules/rollup-pluginutils": { 1061 | "version": "2.8.2", 1062 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 1063 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 1064 | "dev": true, 1065 | "dependencies": { 1066 | "estree-walker": "^0.6.1" 1067 | } 1068 | }, 1069 | "node_modules/selfsigned": { 1070 | "version": "2.4.1", 1071 | "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", 1072 | "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", 1073 | "dev": true, 1074 | "dependencies": { 1075 | "@types/node-forge": "^1.3.0", 1076 | "node-forge": "^1" 1077 | }, 1078 | "engines": { 1079 | "node": ">=10" 1080 | } 1081 | }, 1082 | "node_modules/source-map": { 1083 | "version": "0.6.1", 1084 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1085 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1086 | "dev": true, 1087 | "engines": { 1088 | "node": ">=0.10.0" 1089 | } 1090 | }, 1091 | "node_modules/sourcemap-codec": { 1092 | "version": "1.4.8", 1093 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 1094 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 1095 | "deprecated": "Please use @jridgewell/sourcemap-codec instead", 1096 | "dev": true 1097 | }, 1098 | "node_modules/stacktracey": { 1099 | "version": "2.1.8", 1100 | "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", 1101 | "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", 1102 | "dev": true, 1103 | "dependencies": { 1104 | "as-table": "^1.0.36", 1105 | "get-source": "^2.0.12" 1106 | } 1107 | }, 1108 | "node_modules/stoppable": { 1109 | "version": "1.1.0", 1110 | "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", 1111 | "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", 1112 | "dev": true, 1113 | "engines": { 1114 | "node": ">=4", 1115 | "npm": ">=6" 1116 | } 1117 | }, 1118 | "node_modules/supports-preserve-symlinks-flag": { 1119 | "version": "1.0.0", 1120 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1121 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1122 | "dev": true, 1123 | "engines": { 1124 | "node": ">= 0.4" 1125 | }, 1126 | "funding": { 1127 | "url": "https://github.com/sponsors/ljharb" 1128 | } 1129 | }, 1130 | "node_modules/to-regex-range": { 1131 | "version": "5.0.1", 1132 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1133 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1134 | "dev": true, 1135 | "dependencies": { 1136 | "is-number": "^7.0.0" 1137 | }, 1138 | "engines": { 1139 | "node": ">=8.0" 1140 | } 1141 | }, 1142 | "node_modules/tslib": { 1143 | "version": "2.6.2", 1144 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", 1145 | "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", 1146 | "dev": true 1147 | }, 1148 | "node_modules/undici": { 1149 | "version": "5.28.3", 1150 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", 1151 | "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", 1152 | "dev": true, 1153 | "dependencies": { 1154 | "@fastify/busboy": "^2.0.0" 1155 | }, 1156 | "engines": { 1157 | "node": ">=14.0" 1158 | } 1159 | }, 1160 | "node_modules/undici-types": { 1161 | "version": "5.26.5", 1162 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 1163 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", 1164 | "dev": true 1165 | }, 1166 | "node_modules/workerd": { 1167 | "version": "1.20240129.0", 1168 | "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20240129.0.tgz", 1169 | "integrity": "sha512-t4pnsmjjk/u+GdVDgH2M1AFmJaBUABshYK/vT/HNrAXsHSwN6VR8Yqw0JQ845OokO34VLkuUtYQYyxHHKpdtsw==", 1170 | "dev": true, 1171 | "hasInstallScript": true, 1172 | "bin": { 1173 | "workerd": "bin/workerd" 1174 | }, 1175 | "engines": { 1176 | "node": ">=16" 1177 | }, 1178 | "optionalDependencies": { 1179 | "@cloudflare/workerd-darwin-64": "1.20240129.0", 1180 | "@cloudflare/workerd-darwin-arm64": "1.20240129.0", 1181 | "@cloudflare/workerd-linux-64": "1.20240129.0", 1182 | "@cloudflare/workerd-linux-arm64": "1.20240129.0", 1183 | "@cloudflare/workerd-windows-64": "1.20240129.0" 1184 | } 1185 | }, 1186 | "node_modules/wrangler": { 1187 | "version": "3.27.0", 1188 | "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.27.0.tgz", 1189 | "integrity": "sha512-VV2QXH+4OfNwWRR2cgMw5Xh6WQXec8h1cPjgKMWuUTR1q0Ha8TiEhU1rBOraRYTZbUuM4tqqO4GYeOE0AX7oVQ==", 1190 | "dev": true, 1191 | "dependencies": { 1192 | "@cloudflare/kv-asset-handler": "^0.2.0", 1193 | "@esbuild-plugins/node-globals-polyfill": "^0.2.3", 1194 | "@esbuild-plugins/node-modules-polyfill": "^0.2.2", 1195 | "blake3-wasm": "^2.1.5", 1196 | "chokidar": "^3.5.3", 1197 | "esbuild": "0.17.19", 1198 | "miniflare": "3.20240129.1", 1199 | "nanoid": "^3.3.3", 1200 | "path-to-regexp": "^6.2.0", 1201 | "resolve": "^1.22.8", 1202 | "resolve.exports": "^2.0.2", 1203 | "selfsigned": "^2.0.1", 1204 | "source-map": "0.6.1", 1205 | "xxhash-wasm": "^1.0.1" 1206 | }, 1207 | "bin": { 1208 | "wrangler": "bin/wrangler.js", 1209 | "wrangler2": "bin/wrangler.js" 1210 | }, 1211 | "engines": { 1212 | "node": ">=16.17.0" 1213 | }, 1214 | "optionalDependencies": { 1215 | "fsevents": "~2.3.2" 1216 | } 1217 | }, 1218 | "node_modules/ws": { 1219 | "version": "8.16.0", 1220 | "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", 1221 | "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", 1222 | "dev": true, 1223 | "engines": { 1224 | "node": ">=10.0.0" 1225 | }, 1226 | "peerDependencies": { 1227 | "bufferutil": "^4.0.1", 1228 | "utf-8-validate": ">=5.0.2" 1229 | }, 1230 | "peerDependenciesMeta": { 1231 | "bufferutil": { 1232 | "optional": true 1233 | }, 1234 | "utf-8-validate": { 1235 | "optional": true 1236 | } 1237 | } 1238 | }, 1239 | "node_modules/xxhash-wasm": { 1240 | "version": "1.0.2", 1241 | "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", 1242 | "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", 1243 | "dev": true 1244 | }, 1245 | "node_modules/youch": { 1246 | "version": "3.3.3", 1247 | "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", 1248 | "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", 1249 | "dev": true, 1250 | "dependencies": { 1251 | "cookie": "^0.5.0", 1252 | "mustache": "^4.2.0", 1253 | "stacktracey": "^2.1.8" 1254 | } 1255 | }, 1256 | "node_modules/zod": { 1257 | "version": "3.22.4", 1258 | "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", 1259 | "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", 1260 | "dev": true, 1261 | "funding": { 1262 | "url": "https://github.com/sponsors/colinhacks" 1263 | } 1264 | } 1265 | } 1266 | } 1267 | -------------------------------------------------------------------------------- /bootstrap2-cf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap2-cf", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "deploy": "wrangler deploy", 7 | "dev": "wrangler dev -e dev" 8 | }, 9 | "devDependencies": { 10 | "wrangler": "^3.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /bootstrap2-cf/src/index.js: -------------------------------------------------------------------------------- 1 | import wasm from './rust/bootstrap2_cf_bg.wasm' 2 | import * as bg from './rust/bootstrap2_cf_bg.js' 3 | 4 | let KV = null 5 | const wasmInst = await WebAssembly.instantiate(wasm, { 6 | './bootstrap2_cf_bg.js': bg, 7 | './cloudflare.js': { 8 | kv_put: async (k, v) => { 9 | KV.put(k, v) 10 | }, 11 | kv_get: async (k) => { 12 | KV.get(k) 13 | } 14 | } 15 | }) 16 | bg.__wbg_set_wasm(wasmInst.exports) 17 | 18 | export default { 19 | async fetch(request, env, ctx) { 20 | try { 21 | let path = '/' 22 | try { 23 | path = (new URL(request.url)).pathname 24 | } catch (_e) { /* pass */ } 25 | 26 | let body = '' 27 | if (request.method === 'POST' || request.method == 'PUT') { 28 | if (!request.headers || request.headers.get('content-type') !== 'application/json') { 29 | throw new Error('content-type must be application/json') 30 | } 31 | try { 32 | body = await request.text() 33 | } catch (_e) { /* pass */ } 34 | } 35 | 36 | KV = env.BOOTSTRAP 37 | const respBody = await bg.bootstrap2( 38 | KV, 39 | request.method, 40 | path, 41 | body 42 | ) 43 | KV = null 44 | 45 | return new Response(respBody, { 46 | status: 200, 47 | headers: { 48 | 'content-type': 'application/json' 49 | } 50 | }) 51 | } catch (err) { 52 | return new Response(JSON.stringify({ 53 | error: err.toString(), 54 | }, null, 2) + '\n', { 55 | status: 500, 56 | headers: { 57 | 'content-type': 'application/json' 58 | } 59 | }) 60 | } finally { 61 | KV = null 62 | } 63 | }, 64 | }; 65 | -------------------------------------------------------------------------------- /bootstrap2-cf/src/lib.rs: -------------------------------------------------------------------------------- 1 | // This is a lie at the moment as wasm-bindgen and js-sys 2 | // bring in the std library. But if they ever get no_std 3 | // working, we'll be able to benefit. 4 | #![no_std] 5 | 6 | use wasm_bindgen::prelude::*; 7 | use bootstrap2_core::*; 8 | 9 | extern crate alloc; 10 | 11 | #[global_allocator] 12 | static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; 13 | 14 | #[wasm_bindgen] 15 | extern "C" { 16 | #[wasm_bindgen(js_namespace = console)] 17 | fn log(s: JsValue); 18 | } 19 | 20 | #[wasm_bindgen(inline_js = "export async function kv_put(KV, k, v) { return await KV.put(k, v) }")] 21 | extern "C" { 22 | #[wasm_bindgen(catch)] 23 | async fn kv_put(kv: &JsValue, k: &JsValue, v: &JsValue) -> Result<(), JsValue>; 24 | } 25 | 26 | #[wasm_bindgen(inline_js = "export async function kv_get(KV, k) { return await KV.get(k) }")] 27 | extern "C" { 28 | #[wasm_bindgen(catch)] 29 | async fn kv_get(kv: &JsValue, k: &JsValue) -> Result; 30 | } 31 | 32 | fn js_val_to_string(v: JsValue) -> alloc::string::String { 33 | v.as_string().unwrap_or(alloc::string::ToString::to_string("null")) 34 | } 35 | 36 | fn js_val_to_err(v: JsValue) -> BootstrapError { 37 | BootstrapError::from_str(js_val_to_string(v)) 38 | } 39 | 40 | struct CfSys(JsValue); 41 | 42 | impl Sys for CfSys { 43 | fn date_now(&mut self) -> f64 { 44 | js_sys::Date::now() 45 | } 46 | 47 | /// Put a value into the KV store. 48 | fn kv_put(&mut self, key: &str, val: &str) -> BoxFut<'_, Result<(), BootstrapError>> { 49 | let key = JsValue::from(key); 50 | let val = JsValue::from(val); 51 | alloc::boxed::Box::pin(async move { 52 | crate::kv_put(&self.0, &key, &val) 53 | .await 54 | .map_err(js_val_to_err) 55 | }) 56 | } 57 | 58 | /// Get a value from the KV store. 59 | fn kv_get(&mut self, key: &str) -> BoxFut<'_, Result> { 60 | let key = JsValue::from(key); 61 | alloc::boxed::Box::pin(async move { 62 | crate::kv_get(&self.0, &key) 63 | .await 64 | .map(js_val_to_string) 65 | .map_err(js_val_to_err) 66 | }) 67 | } 68 | } 69 | 70 | #[wasm_bindgen] 71 | pub async fn bootstrap2( 72 | kv: JsValue, 73 | method: &str, 74 | path: &str, 75 | body: &str, 76 | ) -> Result { 77 | bootstrap2_core::bootstrap2( 78 | CfSys(kv), 79 | method, 80 | path, 81 | body, 82 | ) 83 | .await 84 | .map(JsValue::from) 85 | .map_err(|e| JsValue::from(alloc::string::ToString::to_string(&e))) 86 | } 87 | -------------------------------------------------------------------------------- /bootstrap2-cf/wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "bootstrap2-cf" 2 | main = "src/index.js" 3 | compatibility_date = "2024-01-29" 4 | workers_dev = false 5 | 6 | [build] 7 | #command = "wasm-pack build --out-dir src/rust --release --target no-modules" 8 | command = "wasm-pack build --out-dir src/rust --release" 9 | 10 | [[rules]] 11 | globs = ["**/*.js"] 12 | type = "ESModule" 13 | fallthrough = false 14 | 15 | [[rules]] 16 | globs = ["**/*.wasm"] 17 | type = "CompiledWasm" 18 | fallthrough = false 19 | 20 | [env.dev] 21 | name = "neonphog" 22 | route = "worker.neonphog.com/*" 23 | account_id = "2628b4b23d00d785c1d177aaeb9d8ccb" 24 | kv_namespaces = [ 25 | { binding = "BOOTSTRAP", id = "99df026852624e44b31e7ef004f4e141" } 26 | ] 27 | -------------------------------------------------------------------------------- /bootstrap2-core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bootstrap2-core" 3 | version = "0.0.1-alpha" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | base64 = { workspace = true } 8 | ed25519-dalek = { workspace = true } 9 | serde = { workspace = true } 10 | serde_json = { workspace = true } 11 | 12 | [features] 13 | default = [] 14 | std = [] 15 | -------------------------------------------------------------------------------- /bootstrap2-core/src/agent_info.rs: -------------------------------------------------------------------------------- 1 | use crate::*; 2 | use lib::string::String; 3 | use lib::vec::Vec; 4 | 5 | mod serde_base64 { 6 | use super::*; 7 | 8 | pub fn serialize( 9 | v: &[u8; 32], 10 | s: S, 11 | ) -> Result { 12 | s.serialize_str(&b64_encode(v)) 13 | } 14 | 15 | pub fn deserialize<'de, D: serde::Deserializer<'de>>( 16 | d: D, 17 | ) -> Result<[u8; 32], D::Error> { 18 | let dec: String = serde::Deserialize::deserialize(d)?; 19 | let dec: Vec = 20 | b64_decode(&dec).map_err(|e| serde::de::Error::custom(e))?; 21 | if dec.len() != 32 { 22 | return Err(serde::de::Error::custom("invalid length")); 23 | } 24 | let mut out = [0; 32]; 25 | out[..].copy_from_slice(&dec[..]); 26 | Ok(out) 27 | } 28 | } 29 | 30 | /// Assertion that a particular agent is online (or offline). 31 | #[derive(Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] 32 | pub struct AgentInfo { 33 | /// The context under which this agent is acting. 34 | /// In Holochain, this is the DNA Hash. 35 | #[serde(with = "serde_base64")] 36 | #[serde(rename = "s")] 37 | pub space: [u8; 32], 38 | 39 | /// The agent identifier. This is an ed25519 public key. 40 | #[serde(with = "serde_base64")] 41 | #[serde(rename = "a")] 42 | pub agent: [u8; 32], 43 | 44 | /// If Some, this is the url at which this agent can be reached. 45 | /// If None, this is an assertion that the agent has gone offline. 46 | #[serde(rename = "u")] 47 | pub url: Option, 48 | 49 | /// The microseconds since the unix epoch at which time this assertion 50 | /// was signed. 51 | #[serde(rename = "t")] 52 | pub signed_at_micros: i64, 53 | 54 | /// The microseconds since the unix epoch at which time this assertion 55 | /// will no longer be valid. 56 | #[serde(rename = "e")] 57 | pub expires_at_micros: i64, 58 | 59 | /// Any additional extra metadata to be included with this assertion. 60 | #[serde(rename = "x")] 61 | pub extra: serde_json::Value, 62 | } 63 | 64 | impl lib::fmt::Debug for AgentInfo { 65 | fn fmt(&self, f: &mut lib::fmt::Formatter<'_>) -> lib::fmt::Result { 66 | let space = b64_encode(&self.space); 67 | let agent = b64_encode(&self.agent); 68 | f.debug_struct("AgentInfo") 69 | .field("space", &space) 70 | .field("agent", &agent) 71 | .field("url", &self.url) 72 | .field("signed_at_micros", &self.signed_at_micros) 73 | .field("expires_at_micros", &self.expires_at_micros) 74 | .field("extra", &self.extra) 75 | .finish() 76 | } 77 | } 78 | 79 | impl AgentInfo { 80 | /// Output the canonical encoding for use in signing. 81 | pub fn encode(&self) -> Result { 82 | serde_json::to_string(&self).map_err(BootstrapError::from_str) 83 | } 84 | } 85 | 86 | /// Signed assertion that a particular agent is online (or offline). 87 | #[derive(Clone, PartialEq, Eq)] 88 | pub struct AgentInfoSigned { 89 | /// The decoded assertion data. 90 | pub agent_info: AgentInfo, 91 | 92 | /// The encoded assertion data. 93 | pub encoded: String, 94 | 95 | /// The signature over the encoded bytes of assertion data. 96 | pub signature: [u8; 64], 97 | } 98 | 99 | impl lib::fmt::Debug for AgentInfoSigned { 100 | fn fmt(&self, f: &mut lib::fmt::Formatter<'_>) -> lib::fmt::Result { 101 | let sig = b64_encode(&self.signature); 102 | f.debug_struct("AgentInfoSigned") 103 | .field("agent_info", &self.agent_info) 104 | .field("encoded", &self.encoded) 105 | .field("signature", &sig) 106 | .finish() 107 | } 108 | } 109 | 110 | impl lib::ops::Deref for AgentInfoSigned { 111 | type Target = AgentInfo; 112 | 113 | fn deref(&self) -> &Self::Target { 114 | &self.agent_info 115 | } 116 | } 117 | 118 | impl serde::Serialize for AgentInfoSigned { 119 | fn serialize(&self, serializer: S) -> Result 120 | where 121 | S: serde::Serializer, 122 | { 123 | #[derive(serde::Serialize)] 124 | struct Enc<'lt> { 125 | e: &'lt String, 126 | s: String, 127 | } 128 | Enc { 129 | e: &self.encoded, 130 | s: b64_encode(&self.signature[..]), 131 | } 132 | .serialize(serializer) 133 | } 134 | } 135 | 136 | impl<'de> serde::Deserialize<'de> for AgentInfoSigned { 137 | fn deserialize(deserializer: D) -> Result 138 | where 139 | D: serde::Deserializer<'de>, 140 | { 141 | #[derive(serde::Deserialize)] 142 | struct Dec { 143 | e: String, 144 | s: String, 145 | } 146 | let dec = Dec::deserialize(deserializer)?; 147 | let Dec { e: encoded, s } = dec; 148 | let agent_info: AgentInfo = serde_json::from_str(&encoded) 149 | .map_err(|e| serde::de::Error::custom(e))?; 150 | let s: Vec = 151 | b64_decode(&s).map_err(|e| serde::de::Error::custom(e))?; 152 | if s.len() != 64 { 153 | return Err(serde::de::Error::custom("invalid length")); 154 | } 155 | let mut signature = [0; 64]; 156 | signature[..].copy_from_slice(&s[..]); 157 | let this = AgentInfoSigned { 158 | agent_info, 159 | encoded, 160 | signature, 161 | }; 162 | this.verify().map_err(|e| serde::de::Error::custom(e))?; 163 | Ok(this) 164 | } 165 | } 166 | 167 | impl AgentInfoSigned { 168 | /// Construct a new AgentInfoSigned from components. 169 | pub fn new( 170 | encoded: String, 171 | signature: [u8; 64], 172 | ) -> Result { 173 | let agent_info: AgentInfo = 174 | serde_json::from_str(&encoded).map_err(BootstrapError::from_str)?; 175 | 176 | let this = Self { 177 | agent_info, 178 | encoded, 179 | signature, 180 | }; 181 | 182 | this.verify()?; 183 | 184 | Ok(this) 185 | } 186 | 187 | /// Verify the cryptographic signature against the encoded content. 188 | pub fn verify(&self) -> Result<(), BootstrapError> { 189 | let vkey = ed25519_dalek::VerifyingKey::from_bytes(&self.agent) 190 | .map_err(BootstrapError::from_str)?; 191 | let sig = ed25519_dalek::Signature::from_bytes(&self.signature); 192 | ed25519_dalek::Verifier::verify(&vkey, self.encoded.as_bytes(), &sig) 193 | .map_err(BootstrapError::from_str) 194 | } 195 | } 196 | 197 | #[cfg(test)] 198 | mod agent_info_tests { 199 | use super::*; 200 | 201 | #[test] 202 | fn agent_info_encode_decode() { 203 | let skey = ed25519_dalek::SigningKey::from_bytes(&[0xdb; 32]); 204 | let agent = *skey.verifying_key().as_bytes(); 205 | let orig = AgentInfo { 206 | space: [1; 32], 207 | agent: agent, 208 | url: Some(lib::string::ToString::to_string("test://test")), 209 | signed_at_micros: 42, 210 | expires_at_micros: 99, 211 | extra: serde_json::json!({"test": "apple"}), 212 | }; 213 | let orig = orig.encode().unwrap(); 214 | let sig = ed25519_dalek::Signer::sign(&skey, orig.as_bytes()); 215 | let orig = AgentInfoSigned::new(orig, sig.to_bytes()).unwrap(); 216 | let enc = serde_json::to_string(&orig).unwrap(); 217 | let dec: AgentInfoSigned = serde_json::from_str(&enc).unwrap(); 218 | assert_eq!(orig, dec); 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /bootstrap2-core/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![deny(missing_docs)] 2 | #![deny(unsafe_code)] 3 | #![allow(unused_imports)] 4 | #![cfg_attr(not(feature = "std"), no_std)] 5 | //! Bootstrap2 core types. 6 | 7 | #[cfg(not(feature = "std"))] 8 | extern crate alloc; 9 | 10 | /// Re-exported library to deal with no_std diffs. 11 | pub mod lib { 12 | use crate::*; 13 | 14 | #[cfg(feature = "std")] 15 | pub use ::std::error::Error; 16 | 17 | /// Stand-in Error Trait, given we are not including "std". 18 | #[cfg(not(feature = "std"))] 19 | pub trait Error: ::core::fmt::Debug + ::core::fmt::Display { 20 | /// The underlying cause of this error, if any. 21 | fn source(&self) -> Option<&(dyn Error + 'static)> { 22 | None 23 | } 24 | } 25 | 26 | #[cfg(feature = "std")] 27 | pub use ::std::*; 28 | 29 | #[cfg(not(feature = "std"))] 30 | pub use ::core::*; 31 | #[cfg(not(feature = "std"))] 32 | pub use ::alloc::{string, vec}; 33 | } 34 | 35 | /// Bootstrap error type. 36 | #[derive(Debug, Clone, PartialEq, Eq)] 37 | pub enum BootstrapError { 38 | /// Generic string-based error type. 39 | Error(lib::string::String), 40 | } 41 | 42 | impl lib::Error for BootstrapError {} 43 | 44 | impl lib::fmt::Display for BootstrapError { 45 | fn fmt(&self, f: &mut lib::fmt::Formatter<'_>) -> core::fmt::Result { 46 | match self { 47 | Self::Error(err) => err.fmt(f), 48 | } 49 | } 50 | } 51 | 52 | impl BootstrapError { 53 | /// Construct a bootstrap error from something string-like. 54 | pub fn from_str(s: S) -> Self { 55 | use lib::string::ToString; 56 | Self::Error(s.to_string()) 57 | } 58 | } 59 | 60 | fn b64_encode(b: &[u8]) -> lib::string::String { 61 | use base64::prelude::*; 62 | BASE64_URL_SAFE_NO_PAD.encode(b) 63 | } 64 | 65 | fn b64_decode(s: &str) -> Result, BootstrapError> { 66 | use base64::prelude::*; 67 | BASE64_URL_SAFE_NO_PAD 68 | .decode(s) 69 | .map_err(BootstrapError::from_str) 70 | } 71 | 72 | mod agent_info; 73 | pub use agent_info::*; 74 | 75 | /// A boxed future type. 76 | pub type BoxFut<'lt, T> = lib::pin::Pin + 'lt 78 | >>; 79 | 80 | /// Abstraction for the system in which we are running. 81 | pub trait Sys { 82 | /// Get a time as an f64 representing milliseconds since the unix epoch. 83 | fn date_now(&mut self) -> f64; 84 | 85 | /// Put a value into the KV store. 86 | fn kv_put(&mut self, key: &str, val: &str) -> BoxFut<'_, Result<(), BootstrapError>>; 87 | 88 | /// Get a value from the KV store. 89 | fn kv_get(&mut self, key: &str) -> BoxFut<'_, Result>; 90 | } 91 | 92 | /// Process a Holochain bootstrap2 request. 93 | pub async fn bootstrap2( 94 | mut sys: S, 95 | method: &str, 96 | path: &str, 97 | body: &str, 98 | ) -> Result { 99 | let mut out = serde_json::to_string_pretty(&serde_json::json!({ 100 | "now": sys.date_now(), 101 | "method": method, 102 | "path": path, 103 | "body": body, 104 | })) 105 | .map_err(BootstrapError::from_str)?; 106 | out.push('\n'); 107 | Ok(out) 108 | } 109 | --------------------------------------------------------------------------------