プレイグラウンド、サンドボックス、使い捨てスクリプト置き場
0

Configure Feed

Select the types of activity you want to include in your feed.

create spin

Kohei Watanabe (Apr 8, 2025, 5:18 PM +0900) 3e730446 cf2df340

+905
+2
spin-hello-world/.gitignore
··· 1 + target/ 2 + .spin/
+856
spin-hello-world/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 = "android-tzdata" 7 + version = "0.1.1" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 10 + 11 + [[package]] 12 + name = "android_system_properties" 13 + version = "0.1.5" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 16 + dependencies = [ 17 + "libc", 18 + ] 19 + 20 + [[package]] 21 + name = "anyhow" 22 + version = "1.0.97" 23 + source = "registry+https://github.com/rust-lang/crates.io-index" 24 + checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 25 + 26 + [[package]] 27 + name = "async-trait" 28 + version = "0.1.88" 29 + source = "registry+https://github.com/rust-lang/crates.io-index" 30 + checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" 31 + dependencies = [ 32 + "proc-macro2", 33 + "quote", 34 + "syn 2.0.100", 35 + ] 36 + 37 + [[package]] 38 + name = "autocfg" 39 + version = "1.4.0" 40 + source = "registry+https://github.com/rust-lang/crates.io-index" 41 + checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 42 + 43 + [[package]] 44 + name = "bitflags" 45 + version = "2.9.0" 46 + source = "registry+https://github.com/rust-lang/crates.io-index" 47 + checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 48 + 49 + [[package]] 50 + name = "bumpalo" 51 + version = "3.17.0" 52 + source = "registry+https://github.com/rust-lang/crates.io-index" 53 + checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 54 + 55 + [[package]] 56 + name = "bytes" 57 + version = "1.10.1" 58 + source = "registry+https://github.com/rust-lang/crates.io-index" 59 + checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 60 + 61 + [[package]] 62 + name = "cc" 63 + version = "1.2.18" 64 + source = "registry+https://github.com/rust-lang/crates.io-index" 65 + checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" 66 + dependencies = [ 67 + "shlex", 68 + ] 69 + 70 + [[package]] 71 + name = "cfg-if" 72 + version = "1.0.0" 73 + source = "registry+https://github.com/rust-lang/crates.io-index" 74 + checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 75 + 76 + [[package]] 77 + name = "chrono" 78 + version = "0.4.40" 79 + source = "registry+https://github.com/rust-lang/crates.io-index" 80 + checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" 81 + dependencies = [ 82 + "android-tzdata", 83 + "iana-time-zone", 84 + "js-sys", 85 + "num-traits", 86 + "wasm-bindgen", 87 + "windows-link", 88 + ] 89 + 90 + [[package]] 91 + name = "core-foundation-sys" 92 + version = "0.8.7" 93 + source = "registry+https://github.com/rust-lang/crates.io-index" 94 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 95 + 96 + [[package]] 97 + name = "equivalent" 98 + version = "1.0.2" 99 + source = "registry+https://github.com/rust-lang/crates.io-index" 100 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 101 + 102 + [[package]] 103 + name = "fnv" 104 + version = "1.0.7" 105 + source = "registry+https://github.com/rust-lang/crates.io-index" 106 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 107 + 108 + [[package]] 109 + name = "form_urlencoded" 110 + version = "1.2.1" 111 + source = "registry+https://github.com/rust-lang/crates.io-index" 112 + checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 113 + dependencies = [ 114 + "percent-encoding", 115 + ] 116 + 117 + [[package]] 118 + name = "futures" 119 + version = "0.3.31" 120 + source = "registry+https://github.com/rust-lang/crates.io-index" 121 + checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 122 + dependencies = [ 123 + "futures-channel", 124 + "futures-core", 125 + "futures-executor", 126 + "futures-io", 127 + "futures-sink", 128 + "futures-task", 129 + "futures-util", 130 + ] 131 + 132 + [[package]] 133 + name = "futures-channel" 134 + version = "0.3.31" 135 + source = "registry+https://github.com/rust-lang/crates.io-index" 136 + checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 137 + dependencies = [ 138 + "futures-core", 139 + "futures-sink", 140 + ] 141 + 142 + [[package]] 143 + name = "futures-core" 144 + version = "0.3.31" 145 + source = "registry+https://github.com/rust-lang/crates.io-index" 146 + checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 147 + 148 + [[package]] 149 + name = "futures-executor" 150 + version = "0.3.31" 151 + source = "registry+https://github.com/rust-lang/crates.io-index" 152 + checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 153 + dependencies = [ 154 + "futures-core", 155 + "futures-task", 156 + "futures-util", 157 + ] 158 + 159 + [[package]] 160 + name = "futures-io" 161 + version = "0.3.31" 162 + source = "registry+https://github.com/rust-lang/crates.io-index" 163 + checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 164 + 165 + [[package]] 166 + name = "futures-macro" 167 + version = "0.3.31" 168 + source = "registry+https://github.com/rust-lang/crates.io-index" 169 + checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 170 + dependencies = [ 171 + "proc-macro2", 172 + "quote", 173 + "syn 2.0.100", 174 + ] 175 + 176 + [[package]] 177 + name = "futures-sink" 178 + version = "0.3.31" 179 + source = "registry+https://github.com/rust-lang/crates.io-index" 180 + checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 181 + 182 + [[package]] 183 + name = "futures-task" 184 + version = "0.3.31" 185 + source = "registry+https://github.com/rust-lang/crates.io-index" 186 + checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 187 + 188 + [[package]] 189 + name = "futures-util" 190 + version = "0.3.31" 191 + source = "registry+https://github.com/rust-lang/crates.io-index" 192 + checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 193 + dependencies = [ 194 + "futures-channel", 195 + "futures-core", 196 + "futures-io", 197 + "futures-macro", 198 + "futures-sink", 199 + "futures-task", 200 + "memchr", 201 + "pin-project-lite", 202 + "pin-utils", 203 + "slab", 204 + ] 205 + 206 + [[package]] 207 + name = "hashbrown" 208 + version = "0.15.2" 209 + source = "registry+https://github.com/rust-lang/crates.io-index" 210 + checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 211 + 212 + [[package]] 213 + name = "heck" 214 + version = "0.4.1" 215 + source = "registry+https://github.com/rust-lang/crates.io-index" 216 + checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 217 + dependencies = [ 218 + "unicode-segmentation", 219 + ] 220 + 221 + [[package]] 222 + name = "hello-world-spin" 223 + version = "0.1.0" 224 + dependencies = [ 225 + "anyhow", 226 + "spin-sdk", 227 + ] 228 + 229 + [[package]] 230 + name = "http" 231 + version = "1.3.1" 232 + source = "registry+https://github.com/rust-lang/crates.io-index" 233 + checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 234 + dependencies = [ 235 + "bytes", 236 + "fnv", 237 + "itoa", 238 + ] 239 + 240 + [[package]] 241 + name = "iana-time-zone" 242 + version = "0.1.63" 243 + source = "registry+https://github.com/rust-lang/crates.io-index" 244 + checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 245 + dependencies = [ 246 + "android_system_properties", 247 + "core-foundation-sys", 248 + "iana-time-zone-haiku", 249 + "js-sys", 250 + "log", 251 + "wasm-bindgen", 252 + "windows-core", 253 + ] 254 + 255 + [[package]] 256 + name = "iana-time-zone-haiku" 257 + version = "0.1.2" 258 + source = "registry+https://github.com/rust-lang/crates.io-index" 259 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 260 + dependencies = [ 261 + "cc", 262 + ] 263 + 264 + [[package]] 265 + name = "id-arena" 266 + version = "2.2.1" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" 269 + 270 + [[package]] 271 + name = "indexmap" 272 + version = "2.9.0" 273 + source = "registry+https://github.com/rust-lang/crates.io-index" 274 + checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 275 + dependencies = [ 276 + "equivalent", 277 + "hashbrown", 278 + "serde", 279 + ] 280 + 281 + [[package]] 282 + name = "itoa" 283 + version = "1.0.15" 284 + source = "registry+https://github.com/rust-lang/crates.io-index" 285 + checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 286 + 287 + [[package]] 288 + name = "js-sys" 289 + version = "0.3.77" 290 + source = "registry+https://github.com/rust-lang/crates.io-index" 291 + checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 292 + dependencies = [ 293 + "once_cell", 294 + "wasm-bindgen", 295 + ] 296 + 297 + [[package]] 298 + name = "leb128" 299 + version = "0.2.5" 300 + source = "registry+https://github.com/rust-lang/crates.io-index" 301 + checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" 302 + 303 + [[package]] 304 + name = "libc" 305 + version = "0.2.171" 306 + source = "registry+https://github.com/rust-lang/crates.io-index" 307 + checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 308 + 309 + [[package]] 310 + name = "log" 311 + version = "0.4.27" 312 + source = "registry+https://github.com/rust-lang/crates.io-index" 313 + checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 314 + 315 + [[package]] 316 + name = "memchr" 317 + version = "2.7.4" 318 + source = "registry+https://github.com/rust-lang/crates.io-index" 319 + checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 320 + 321 + [[package]] 322 + name = "num-traits" 323 + version = "0.2.19" 324 + source = "registry+https://github.com/rust-lang/crates.io-index" 325 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 326 + dependencies = [ 327 + "autocfg", 328 + ] 329 + 330 + [[package]] 331 + name = "once_cell" 332 + version = "1.21.3" 333 + source = "registry+https://github.com/rust-lang/crates.io-index" 334 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 335 + 336 + [[package]] 337 + name = "percent-encoding" 338 + version = "2.3.1" 339 + source = "registry+https://github.com/rust-lang/crates.io-index" 340 + checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 341 + 342 + [[package]] 343 + name = "pin-project-lite" 344 + version = "0.2.16" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 347 + 348 + [[package]] 349 + name = "pin-utils" 350 + version = "0.1.0" 351 + source = "registry+https://github.com/rust-lang/crates.io-index" 352 + checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 353 + 354 + [[package]] 355 + name = "proc-macro2" 356 + version = "1.0.94" 357 + source = "registry+https://github.com/rust-lang/crates.io-index" 358 + checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 359 + dependencies = [ 360 + "unicode-ident", 361 + ] 362 + 363 + [[package]] 364 + name = "quote" 365 + version = "1.0.40" 366 + source = "registry+https://github.com/rust-lang/crates.io-index" 367 + checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 368 + dependencies = [ 369 + "proc-macro2", 370 + ] 371 + 372 + [[package]] 373 + name = "routefinder" 374 + version = "0.5.4" 375 + source = "registry+https://github.com/rust-lang/crates.io-index" 376 + checksum = "0971d3c8943a6267d6bd0d782fdc4afa7593e7381a92a3df950ff58897e066b5" 377 + dependencies = [ 378 + "smartcow", 379 + "smartstring", 380 + ] 381 + 382 + [[package]] 383 + name = "rustversion" 384 + version = "1.0.20" 385 + source = "registry+https://github.com/rust-lang/crates.io-index" 386 + checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 387 + 388 + [[package]] 389 + name = "ryu" 390 + version = "1.0.20" 391 + source = "registry+https://github.com/rust-lang/crates.io-index" 392 + checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 393 + 394 + [[package]] 395 + name = "semver" 396 + version = "1.0.26" 397 + source = "registry+https://github.com/rust-lang/crates.io-index" 398 + checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 399 + 400 + [[package]] 401 + name = "serde" 402 + version = "1.0.219" 403 + source = "registry+https://github.com/rust-lang/crates.io-index" 404 + checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 405 + dependencies = [ 406 + "serde_derive", 407 + ] 408 + 409 + [[package]] 410 + name = "serde_derive" 411 + version = "1.0.219" 412 + source = "registry+https://github.com/rust-lang/crates.io-index" 413 + checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 414 + dependencies = [ 415 + "proc-macro2", 416 + "quote", 417 + "syn 2.0.100", 418 + ] 419 + 420 + [[package]] 421 + name = "serde_json" 422 + version = "1.0.140" 423 + source = "registry+https://github.com/rust-lang/crates.io-index" 424 + checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 425 + dependencies = [ 426 + "itoa", 427 + "memchr", 428 + "ryu", 429 + "serde", 430 + ] 431 + 432 + [[package]] 433 + name = "shlex" 434 + version = "1.3.0" 435 + source = "registry+https://github.com/rust-lang/crates.io-index" 436 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 437 + 438 + [[package]] 439 + name = "slab" 440 + version = "0.4.9" 441 + source = "registry+https://github.com/rust-lang/crates.io-index" 442 + checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 443 + dependencies = [ 444 + "autocfg", 445 + ] 446 + 447 + [[package]] 448 + name = "smallvec" 449 + version = "1.15.0" 450 + source = "registry+https://github.com/rust-lang/crates.io-index" 451 + checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 452 + 453 + [[package]] 454 + name = "smartcow" 455 + version = "0.2.1" 456 + source = "registry+https://github.com/rust-lang/crates.io-index" 457 + checksum = "656fcb1c1fca8c4655372134ce87d8afdf5ec5949ebabe8d314be0141d8b5da2" 458 + dependencies = [ 459 + "smartstring", 460 + ] 461 + 462 + [[package]] 463 + name = "smartstring" 464 + version = "1.0.1" 465 + source = "registry+https://github.com/rust-lang/crates.io-index" 466 + checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" 467 + dependencies = [ 468 + "autocfg", 469 + "static_assertions", 470 + "version_check", 471 + ] 472 + 473 + [[package]] 474 + name = "spdx" 475 + version = "0.10.8" 476 + source = "registry+https://github.com/rust-lang/crates.io-index" 477 + checksum = "58b69356da67e2fc1f542c71ea7e654a361a79c938e4424392ecf4fa065d2193" 478 + dependencies = [ 479 + "smallvec", 480 + ] 481 + 482 + [[package]] 483 + name = "spin-executor" 484 + version = "3.1.0" 485 + source = "registry+https://github.com/rust-lang/crates.io-index" 486 + checksum = "7298013c6a0dc3361331cec17c744e45d76df7696d59b87801a9a3f5edbe0f54" 487 + dependencies = [ 488 + "futures", 489 + "once_cell", 490 + "wit-bindgen", 491 + ] 492 + 493 + [[package]] 494 + name = "spin-macro" 495 + version = "3.1.0" 496 + source = "registry+https://github.com/rust-lang/crates.io-index" 497 + checksum = "f3953755ea3415f4c0ecba8c5cdab51f05a5d2480b9bb8f2f42bf5a0ffaf18e6" 498 + dependencies = [ 499 + "anyhow", 500 + "bytes", 501 + "proc-macro2", 502 + "quote", 503 + "syn 1.0.109", 504 + ] 505 + 506 + [[package]] 507 + name = "spin-sdk" 508 + version = "3.1.0" 509 + source = "registry+https://github.com/rust-lang/crates.io-index" 510 + checksum = "eac0de7538d3986cc989ce3649d50b1d8f50ec46a0c9e62b4a14b911db6fe0de" 511 + dependencies = [ 512 + "anyhow", 513 + "async-trait", 514 + "bytes", 515 + "chrono", 516 + "form_urlencoded", 517 + "futures", 518 + "http", 519 + "once_cell", 520 + "routefinder", 521 + "serde", 522 + "serde_json", 523 + "spin-executor", 524 + "spin-macro", 525 + "thiserror", 526 + "wit-bindgen", 527 + ] 528 + 529 + [[package]] 530 + name = "static_assertions" 531 + version = "1.1.0" 532 + source = "registry+https://github.com/rust-lang/crates.io-index" 533 + checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 534 + 535 + [[package]] 536 + name = "syn" 537 + version = "1.0.109" 538 + source = "registry+https://github.com/rust-lang/crates.io-index" 539 + checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 540 + dependencies = [ 541 + "proc-macro2", 542 + "quote", 543 + "unicode-ident", 544 + ] 545 + 546 + [[package]] 547 + name = "syn" 548 + version = "2.0.100" 549 + source = "registry+https://github.com/rust-lang/crates.io-index" 550 + checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 551 + dependencies = [ 552 + "proc-macro2", 553 + "quote", 554 + "unicode-ident", 555 + ] 556 + 557 + [[package]] 558 + name = "thiserror" 559 + version = "1.0.69" 560 + source = "registry+https://github.com/rust-lang/crates.io-index" 561 + checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 562 + dependencies = [ 563 + "thiserror-impl", 564 + ] 565 + 566 + [[package]] 567 + name = "thiserror-impl" 568 + version = "1.0.69" 569 + source = "registry+https://github.com/rust-lang/crates.io-index" 570 + checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 571 + dependencies = [ 572 + "proc-macro2", 573 + "quote", 574 + "syn 2.0.100", 575 + ] 576 + 577 + [[package]] 578 + name = "unicode-ident" 579 + version = "1.0.18" 580 + source = "registry+https://github.com/rust-lang/crates.io-index" 581 + checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 582 + 583 + [[package]] 584 + name = "unicode-segmentation" 585 + version = "1.12.0" 586 + source = "registry+https://github.com/rust-lang/crates.io-index" 587 + checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 588 + 589 + [[package]] 590 + name = "unicode-xid" 591 + version = "0.2.6" 592 + source = "registry+https://github.com/rust-lang/crates.io-index" 593 + checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 594 + 595 + [[package]] 596 + name = "version_check" 597 + version = "0.9.5" 598 + source = "registry+https://github.com/rust-lang/crates.io-index" 599 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 600 + 601 + [[package]] 602 + name = "wasm-bindgen" 603 + version = "0.2.100" 604 + source = "registry+https://github.com/rust-lang/crates.io-index" 605 + checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 606 + dependencies = [ 607 + "cfg-if", 608 + "once_cell", 609 + "rustversion", 610 + "wasm-bindgen-macro", 611 + ] 612 + 613 + [[package]] 614 + name = "wasm-bindgen-backend" 615 + version = "0.2.100" 616 + source = "registry+https://github.com/rust-lang/crates.io-index" 617 + checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 618 + dependencies = [ 619 + "bumpalo", 620 + "log", 621 + "proc-macro2", 622 + "quote", 623 + "syn 2.0.100", 624 + "wasm-bindgen-shared", 625 + ] 626 + 627 + [[package]] 628 + name = "wasm-bindgen-macro" 629 + version = "0.2.100" 630 + source = "registry+https://github.com/rust-lang/crates.io-index" 631 + checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 632 + dependencies = [ 633 + "quote", 634 + "wasm-bindgen-macro-support", 635 + ] 636 + 637 + [[package]] 638 + name = "wasm-bindgen-macro-support" 639 + version = "0.2.100" 640 + source = "registry+https://github.com/rust-lang/crates.io-index" 641 + checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 642 + dependencies = [ 643 + "proc-macro2", 644 + "quote", 645 + "syn 2.0.100", 646 + "wasm-bindgen-backend", 647 + "wasm-bindgen-shared", 648 + ] 649 + 650 + [[package]] 651 + name = "wasm-bindgen-shared" 652 + version = "0.2.100" 653 + source = "registry+https://github.com/rust-lang/crates.io-index" 654 + checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 655 + dependencies = [ 656 + "unicode-ident", 657 + ] 658 + 659 + [[package]] 660 + name = "wasm-encoder" 661 + version = "0.38.1" 662 + source = "registry+https://github.com/rust-lang/crates.io-index" 663 + checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" 664 + dependencies = [ 665 + "leb128", 666 + ] 667 + 668 + [[package]] 669 + name = "wasm-encoder" 670 + version = "0.41.2" 671 + source = "registry+https://github.com/rust-lang/crates.io-index" 672 + checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" 673 + dependencies = [ 674 + "leb128", 675 + ] 676 + 677 + [[package]] 678 + name = "wasm-metadata" 679 + version = "0.10.20" 680 + source = "registry+https://github.com/rust-lang/crates.io-index" 681 + checksum = "18ebaa7bd0f9e7a5e5dd29b9a998acf21c4abed74265524dd7e85934597bfb10" 682 + dependencies = [ 683 + "anyhow", 684 + "indexmap", 685 + "serde", 686 + "serde_derive", 687 + "serde_json", 688 + "spdx", 689 + "wasm-encoder 0.41.2", 690 + "wasmparser 0.121.2", 691 + ] 692 + 693 + [[package]] 694 + name = "wasmparser" 695 + version = "0.118.2" 696 + source = "registry+https://github.com/rust-lang/crates.io-index" 697 + checksum = "77f1154f1ab868e2a01d9834a805faca7bf8b50d041b4ca714d005d0dab1c50c" 698 + dependencies = [ 699 + "indexmap", 700 + "semver", 701 + ] 702 + 703 + [[package]] 704 + name = "wasmparser" 705 + version = "0.121.2" 706 + source = "registry+https://github.com/rust-lang/crates.io-index" 707 + checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" 708 + dependencies = [ 709 + "bitflags", 710 + "indexmap", 711 + "semver", 712 + ] 713 + 714 + [[package]] 715 + name = "windows-core" 716 + version = "0.61.0" 717 + source = "registry+https://github.com/rust-lang/crates.io-index" 718 + checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" 719 + dependencies = [ 720 + "windows-implement", 721 + "windows-interface", 722 + "windows-link", 723 + "windows-result", 724 + "windows-strings", 725 + ] 726 + 727 + [[package]] 728 + name = "windows-implement" 729 + version = "0.60.0" 730 + source = "registry+https://github.com/rust-lang/crates.io-index" 731 + checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 732 + dependencies = [ 733 + "proc-macro2", 734 + "quote", 735 + "syn 2.0.100", 736 + ] 737 + 738 + [[package]] 739 + name = "windows-interface" 740 + version = "0.59.1" 741 + source = "registry+https://github.com/rust-lang/crates.io-index" 742 + checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 743 + dependencies = [ 744 + "proc-macro2", 745 + "quote", 746 + "syn 2.0.100", 747 + ] 748 + 749 + [[package]] 750 + name = "windows-link" 751 + version = "0.1.1" 752 + source = "registry+https://github.com/rust-lang/crates.io-index" 753 + checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 754 + 755 + [[package]] 756 + name = "windows-result" 757 + version = "0.3.2" 758 + source = "registry+https://github.com/rust-lang/crates.io-index" 759 + checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" 760 + dependencies = [ 761 + "windows-link", 762 + ] 763 + 764 + [[package]] 765 + name = "windows-strings" 766 + version = "0.4.0" 767 + source = "registry+https://github.com/rust-lang/crates.io-index" 768 + checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" 769 + dependencies = [ 770 + "windows-link", 771 + ] 772 + 773 + [[package]] 774 + name = "wit-bindgen" 775 + version = "0.16.0" 776 + source = "registry+https://github.com/rust-lang/crates.io-index" 777 + checksum = "b76f1d099678b4f69402a421e888bbe71bf20320c2f3f3565d0e7484dbe5bc20" 778 + dependencies = [ 779 + "bitflags", 780 + "wit-bindgen-rust-macro", 781 + ] 782 + 783 + [[package]] 784 + name = "wit-bindgen-core" 785 + version = "0.16.0" 786 + source = "registry+https://github.com/rust-lang/crates.io-index" 787 + checksum = "75d55e1a488af2981fb0edac80d8d20a51ac36897a1bdef4abde33c29c1b6d0d" 788 + dependencies = [ 789 + "anyhow", 790 + "wit-component", 791 + "wit-parser", 792 + ] 793 + 794 + [[package]] 795 + name = "wit-bindgen-rust" 796 + version = "0.16.0" 797 + source = "registry+https://github.com/rust-lang/crates.io-index" 798 + checksum = "a01ff9cae7bf5736750d94d91eb8a49f5e3a04aff1d1a3218287d9b2964510f8" 799 + dependencies = [ 800 + "anyhow", 801 + "heck", 802 + "wasm-metadata", 803 + "wit-bindgen-core", 804 + "wit-component", 805 + ] 806 + 807 + [[package]] 808 + name = "wit-bindgen-rust-macro" 809 + version = "0.16.0" 810 + source = "registry+https://github.com/rust-lang/crates.io-index" 811 + checksum = "804a98e2538393d47aa7da65a7348116d6ff403b426665152b70a168c0146d49" 812 + dependencies = [ 813 + "anyhow", 814 + "proc-macro2", 815 + "quote", 816 + "syn 2.0.100", 817 + "wit-bindgen-core", 818 + "wit-bindgen-rust", 819 + "wit-component", 820 + ] 821 + 822 + [[package]] 823 + name = "wit-component" 824 + version = "0.18.2" 825 + source = "registry+https://github.com/rust-lang/crates.io-index" 826 + checksum = "5b8a35a2a9992898c9d27f1664001860595a4bc99d32dd3599d547412e17d7e2" 827 + dependencies = [ 828 + "anyhow", 829 + "bitflags", 830 + "indexmap", 831 + "log", 832 + "serde", 833 + "serde_derive", 834 + "serde_json", 835 + "wasm-encoder 0.38.1", 836 + "wasm-metadata", 837 + "wasmparser 0.118.2", 838 + "wit-parser", 839 + ] 840 + 841 + [[package]] 842 + name = "wit-parser" 843 + version = "0.13.2" 844 + source = "registry+https://github.com/rust-lang/crates.io-index" 845 + checksum = "316b36a9f0005f5aa4b03c39bc3728d045df136f8c13a73b7db4510dec725e08" 846 + dependencies = [ 847 + "anyhow", 848 + "id-arena", 849 + "indexmap", 850 + "log", 851 + "semver", 852 + "serde", 853 + "serde_derive", 854 + "serde_json", 855 + "unicode-xid", 856 + ]
+16
spin-hello-world/Cargo.toml
··· 1 + [package] 2 + name = "hello-world-spin" 3 + authors = ["Kohei Watanabe <nebel@fogtype.com>"] 4 + description = "" 5 + version = "0.1.0" 6 + rust-version = "1.78" 7 + edition = "2021" 8 + 9 + [lib] 10 + crate-type = ["cdylib"] 11 + 12 + [dependencies] 13 + anyhow = "1" 14 + spin-sdk = "3.1.0" 15 + 16 + [workspace]
+18
spin-hello-world/spin.toml
··· 1 + spin_manifest_version = 2 2 + 3 + [application] 4 + name = "hello-world-spin" 5 + version = "0.1.0" 6 + authors = ["Kohei Watanabe <nebel@fogtype.com>"] 7 + description = "" 8 + 9 + [[trigger.http]] 10 + route = "/..." 11 + component = "hello-world-spin" 12 + 13 + [component.hello-world-spin] 14 + source = "target/wasm32-wasip2/release/hello_world_spin.wasm" 15 + allowed_outbound_hosts = [] 16 + [component.hello-world-spin.build] 17 + command = "cargo build --target wasm32-wasip2 --release" 18 + watch = ["src/**/*.rs", "Cargo.toml"]
+13
spin-hello-world/src/lib.rs
··· 1 + use spin_sdk::http::{IntoResponse, Request, Response}; 2 + use spin_sdk::http_component; 3 + 4 + /// A simple Spin HTTP component. 5 + #[http_component] 6 + fn handle_hello_world_spin(req: Request) -> anyhow::Result<impl IntoResponse> { 7 + println!("Handling request to {:?}", req.header("spin-full-url")); 8 + Ok(Response::builder() 9 + .status(200) 10 + .header("content-type", "text/plain") 11 + .body("Hello World!") 12 + .build()) 13 + }