├── .github └── workflows │ └── rust.yml ├── .gitignore ├── LICENSE ├── README.md ├── box ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── src │ ├── builder │ │ ├── builder.rs │ │ └── packer.rs │ ├── host │ │ ├── server │ │ │ ├── box_host.c │ │ │ └── box_host.rs │ │ └── web │ │ │ ├── box_host.html │ │ │ └── host_functions.js │ └── main.rs └── tests │ └── tests.rs ├── boxer.dev ├── .gitignore ├── img │ ├── boxer-bg-dark-mobile.png │ ├── boxer-bg-dark.png │ ├── boxer-bg-light-mobile.png │ ├── boxer-bg-light.png │ ├── boxer.png │ ├── github-dark.png │ └── github-light.png ├── index.html ├── main.js ├── python-example.html ├── python.html └── style.css └── examples ├── c ├── async_server.c ├── c.md ├── sync_server.c └── threaded_server.c ├── python └── python.md └── ruby └── ruby.md /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | # pending builds for different archs 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | prompts.txt 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Boxer 2 | 3 |

4 |

5 | 6 | Mia St John 7 | 8 |

9 |

10 | 11 | **This project is under rapid development** 12 | 13 | # Boxer 14 | 15 | ## Overview 16 | Boxer is an open-source project designed to reimagine cloud computing by transitioning from traditional container technology to WebAssembly (Wasm) based distributions, known as "Boxes" or "Wasm-Boxes". 17 | 18 | ## Motivation 19 | While containers have been a cornerstone of cloud computing, providing isolated environments for applications, they come with significant drawbacks. They often result in larger, less efficient deployments with slower startup times and rely heavily on the underlying operating system/kernel for security, which can introduce vulnerabilities and platform lock-in. 20 | 21 | ## Solution: Boxer 22 | Boxer offers a new solution by providing tooling for converting existing containerized workloads and definitions into near-universally deployable Wasm distributions. These "Boxes" offer environments comparable to those provided by containers but are vastly more efficient thanks to the lightweight, sandboxed execution capabilities of WebAssembly. 23 | 24 |

25 |

26 | 27 | Container and Box 28 | 29 |

30 |

31 | 32 | 33 | ### Key Advantages of WebAssembly: 34 | - **Reduced Overhead:** Wasm's compact binary instruction format ensures lightweight execution, drastically cutting down the overhead seen in traditional containers. 35 | - **Enhanced Performance:** The efficiency of Wasm leads to improved performance and smaller, more efficient deployments, perfectly suited for cloud computing. 36 | - **Superior Security:** Wasm's memory-safe, isolated execution environment provides a higher level of security, independent of the operating system. 37 | - **Run (almost) Everywhere** Wasm can run a anywhere there is a WebAssembly runtime, including browsers, servers, and embedded devices; existing runtimes are available on for a [wide variety of architectures.](https://github.com/appcypher/awesome-wasm-runtimes) 38 | 39 | ## Example 40 | 41 | ### Dockerfile ➡ (Wasm)Box 42 | 43 | For for this file: 44 | 45 | ```Dockerfile 46 | FROM scratch 47 | RUN mkdir -p /app 48 | COPY a.out /app 49 | WORKDIR /app 50 | CMD ["/app/a.out"] 51 | ``` 52 | 53 | run `box build -f Dockerfile` 54 | 55 | This will bring in libc interaces (as imports) and create the necessary FS state, thus declaritivey creating a ready-to-run Wasm binary. 56 | 57 | ### Difference in base image/layer 58 | 59 | Debian or Ubuntu or Alpine, etc. - what these things mean in a boxer context 60 | 61 | Language stacks as base image: node, ruby, python, etc. 62 | 63 | Thoughts from relay: 64 | 65 | //TODO: START HERE: work backward 66 | - make the compiled Wasm from marcotte with just "socket()" being executed 67 | 68 | - wrap (by hand) in a _start() function, compile it to wasm 69 | 70 | - test it, then do open() and gettimeofday(), then do all others 71 | 72 | - build the rest of /net calls into marcotte -- think on https://github.com/chipmk/tcpip.js/ 73 | - see: /Users/danielphillips/temp/temp/c_rust_link_example 74 | 75 | - get _start() wrapping into boxer cli 76 | 77 | - continue building out boxer cli, so that net calls can just work 78 | 79 | - FS, one call at a time 80 | 81 | // execute box 82 | const result = _start(); 83 | // which: 84 | // - executes a box's start_func, which comes from entrypoint/cmd line 85 | // - this is generated by boxer cli build, not marcotte, marcotte does everything else for system layering 86 | // - if a (/net) syscall is called, calls: r() 87 | // - which proxies a syscall to the edge server over websocket 88 | -------------------------------------------------------------------------------- /box/.gitignore: -------------------------------------------------------------------------------- 1 | target/* 2 | -------------------------------------------------------------------------------- /box/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 = "ahash" 22 | version = "0.8.7" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" 25 | dependencies = [ 26 | "cfg-if", 27 | "once_cell", 28 | "version_check", 29 | "zerocopy", 30 | ] 31 | 32 | [[package]] 33 | name = "aho-corasick" 34 | version = "1.1.2" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 37 | dependencies = [ 38 | "memchr", 39 | ] 40 | 41 | [[package]] 42 | name = "ambient-authority" 43 | version = "0.0.2" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" 46 | 47 | [[package]] 48 | name = "android_system_properties" 49 | version = "0.1.5" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 52 | dependencies = [ 53 | "libc", 54 | ] 55 | 56 | [[package]] 57 | name = "ansi_term" 58 | version = "0.12.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 61 | dependencies = [ 62 | "winapi", 63 | ] 64 | 65 | [[package]] 66 | name = "anyhow" 67 | version = "1.0.79" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" 70 | 71 | [[package]] 72 | name = "arbitrary" 73 | version = "1.3.2" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" 76 | 77 | [[package]] 78 | name = "async-trait" 79 | version = "0.1.77" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" 82 | dependencies = [ 83 | "proc-macro2", 84 | "quote", 85 | "syn 2.0.48", 86 | ] 87 | 88 | [[package]] 89 | name = "atty" 90 | version = "0.2.14" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 93 | dependencies = [ 94 | "hermit-abi 0.1.19", 95 | "libc", 96 | "winapi", 97 | ] 98 | 99 | [[package]] 100 | name = "autocfg" 101 | version = "1.1.0" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 104 | 105 | [[package]] 106 | name = "backtrace" 107 | version = "0.3.69" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" 110 | dependencies = [ 111 | "addr2line", 112 | "cc", 113 | "cfg-if", 114 | "libc", 115 | "miniz_oxide", 116 | "object", 117 | "rustc-demangle", 118 | ] 119 | 120 | [[package]] 121 | name = "base64" 122 | version = "0.21.7" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 125 | 126 | [[package]] 127 | name = "bincode" 128 | version = "1.3.3" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 131 | dependencies = [ 132 | "serde", 133 | ] 134 | 135 | [[package]] 136 | name = "bitflags" 137 | version = "1.3.2" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 140 | 141 | [[package]] 142 | name = "bitflags" 143 | version = "2.4.2" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" 146 | 147 | [[package]] 148 | name = "block-buffer" 149 | version = "0.10.4" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 152 | dependencies = [ 153 | "generic-array", 154 | ] 155 | 156 | [[package]] 157 | name = "box" 158 | version = "0.1.0" 159 | dependencies = [ 160 | "anyhow", 161 | "clap", 162 | "dockerfile-parser", 163 | "marcotte", 164 | "structopt", 165 | "walkdir", 166 | "wasm-encoder 0.38.1", 167 | "wasmparser 0.106.0", 168 | "wasmtime 17.0.0", 169 | "wasmtime-wasi", 170 | "wizer", 171 | ] 172 | 173 | [[package]] 174 | name = "bumpalo" 175 | version = "3.14.0" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" 178 | 179 | [[package]] 180 | name = "byteorder" 181 | version = "1.5.0" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 184 | 185 | [[package]] 186 | name = "bytes" 187 | version = "1.5.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 190 | 191 | [[package]] 192 | name = "cap-fs-ext" 193 | version = "2.0.1" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" 196 | dependencies = [ 197 | "cap-primitives", 198 | "cap-std", 199 | "io-lifetimes", 200 | "windows-sys 0.52.0", 201 | ] 202 | 203 | [[package]] 204 | name = "cap-net-ext" 205 | version = "2.0.1" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" 208 | dependencies = [ 209 | "cap-primitives", 210 | "cap-std", 211 | "rustix", 212 | "smallvec", 213 | ] 214 | 215 | [[package]] 216 | name = "cap-primitives" 217 | version = "2.0.1" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" 220 | dependencies = [ 221 | "ambient-authority", 222 | "fs-set-times", 223 | "io-extras", 224 | "io-lifetimes", 225 | "ipnet", 226 | "maybe-owned", 227 | "rustix", 228 | "windows-sys 0.52.0", 229 | "winx", 230 | ] 231 | 232 | [[package]] 233 | name = "cap-rand" 234 | version = "2.0.1" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" 237 | dependencies = [ 238 | "ambient-authority", 239 | "rand", 240 | ] 241 | 242 | [[package]] 243 | name = "cap-std" 244 | version = "2.0.1" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" 247 | dependencies = [ 248 | "cap-primitives", 249 | "io-extras", 250 | "io-lifetimes", 251 | "rustix", 252 | ] 253 | 254 | [[package]] 255 | name = "cap-time-ext" 256 | version = "2.0.1" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" 259 | dependencies = [ 260 | "ambient-authority", 261 | "cap-primitives", 262 | "iana-time-zone", 263 | "once_cell", 264 | "rustix", 265 | "winx", 266 | ] 267 | 268 | [[package]] 269 | name = "cc" 270 | version = "1.0.83" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 273 | dependencies = [ 274 | "jobserver", 275 | "libc", 276 | ] 277 | 278 | [[package]] 279 | name = "cfg-if" 280 | version = "1.0.0" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 283 | 284 | [[package]] 285 | name = "clap" 286 | version = "2.34.0" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 289 | dependencies = [ 290 | "ansi_term", 291 | "atty", 292 | "bitflags 1.3.2", 293 | "strsim", 294 | "textwrap", 295 | "unicode-width", 296 | "vec_map", 297 | ] 298 | 299 | [[package]] 300 | name = "core-foundation-sys" 301 | version = "0.8.6" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 304 | 305 | [[package]] 306 | name = "cpp_demangle" 307 | version = "0.3.5" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" 310 | dependencies = [ 311 | "cfg-if", 312 | ] 313 | 314 | [[package]] 315 | name = "cpufeatures" 316 | version = "0.2.12" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 319 | dependencies = [ 320 | "libc", 321 | ] 322 | 323 | [[package]] 324 | name = "cranelift-bforest" 325 | version = "0.103.0" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92" 328 | dependencies = [ 329 | "cranelift-entity 0.103.0", 330 | ] 331 | 332 | [[package]] 333 | name = "cranelift-bforest" 334 | version = "0.104.0" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "d819feeda4c420a18f1e28236ca0ce1177b22bf7c8a44ddee92dfe40de15bcf0" 337 | dependencies = [ 338 | "cranelift-entity 0.104.0", 339 | ] 340 | 341 | [[package]] 342 | name = "cranelift-codegen" 343 | version = "0.103.0" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8" 346 | dependencies = [ 347 | "bumpalo", 348 | "cranelift-bforest 0.103.0", 349 | "cranelift-codegen-meta 0.103.0", 350 | "cranelift-codegen-shared 0.103.0", 351 | "cranelift-control 0.103.0", 352 | "cranelift-entity 0.103.0", 353 | "cranelift-isle 0.103.0", 354 | "gimli", 355 | "hashbrown 0.14.3", 356 | "log", 357 | "regalloc2", 358 | "smallvec", 359 | "target-lexicon", 360 | ] 361 | 362 | [[package]] 363 | name = "cranelift-codegen" 364 | version = "0.104.0" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "e9b8d03d5bdbca7e5f72b0e0a0f69933ed1f09e24be6c075aa6fe3f802b0cc0c" 367 | dependencies = [ 368 | "bumpalo", 369 | "cranelift-bforest 0.104.0", 370 | "cranelift-codegen-meta 0.104.0", 371 | "cranelift-codegen-shared 0.104.0", 372 | "cranelift-control 0.104.0", 373 | "cranelift-entity 0.104.0", 374 | "cranelift-isle 0.104.0", 375 | "gimli", 376 | "hashbrown 0.14.3", 377 | "log", 378 | "regalloc2", 379 | "smallvec", 380 | "target-lexicon", 381 | ] 382 | 383 | [[package]] 384 | name = "cranelift-codegen-meta" 385 | version = "0.103.0" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463" 388 | dependencies = [ 389 | "cranelift-codegen-shared 0.103.0", 390 | ] 391 | 392 | [[package]] 393 | name = "cranelift-codegen-meta" 394 | version = "0.104.0" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "a3fd3664e38e51649b17dc30cfdd561273fe2f590dcd013fb75d9eabc6272dfb" 397 | dependencies = [ 398 | "cranelift-codegen-shared 0.104.0", 399 | ] 400 | 401 | [[package]] 402 | name = "cranelift-codegen-shared" 403 | version = "0.103.0" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330" 406 | 407 | [[package]] 408 | name = "cranelift-codegen-shared" 409 | version = "0.104.0" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "4b031ec5e605828975952622b5a77d49126f20ffe88d33719a0af66b23a0fc36" 412 | 413 | [[package]] 414 | name = "cranelift-control" 415 | version = "0.103.0" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053" 418 | dependencies = [ 419 | "arbitrary", 420 | ] 421 | 422 | [[package]] 423 | name = "cranelift-control" 424 | version = "0.104.0" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "fada054d017cf2ed8f7ed2336e0517fc1b19e6825be1790de9eb00c94788362b" 427 | dependencies = [ 428 | "arbitrary", 429 | ] 430 | 431 | [[package]] 432 | name = "cranelift-entity" 433 | version = "0.103.0" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7" 436 | dependencies = [ 437 | "serde", 438 | "serde_derive", 439 | ] 440 | 441 | [[package]] 442 | name = "cranelift-entity" 443 | version = "0.104.0" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "177b6f94ae8de6348eb45bf977c79ab9e3c40fc3ac8cb7ed8109560ea39bee7d" 446 | dependencies = [ 447 | "serde", 448 | "serde_derive", 449 | ] 450 | 451 | [[package]] 452 | name = "cranelift-frontend" 453 | version = "0.103.0" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df" 456 | dependencies = [ 457 | "cranelift-codegen 0.103.0", 458 | "log", 459 | "smallvec", 460 | "target-lexicon", 461 | ] 462 | 463 | [[package]] 464 | name = "cranelift-frontend" 465 | version = "0.104.0" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "ebebd23a69a23e3ddea78e98ff3a2de222e88c8e045d81ef4a72f042e0d79dbd" 468 | dependencies = [ 469 | "cranelift-codegen 0.104.0", 470 | "log", 471 | "smallvec", 472 | "target-lexicon", 473 | ] 474 | 475 | [[package]] 476 | name = "cranelift-isle" 477 | version = "0.103.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc" 480 | 481 | [[package]] 482 | name = "cranelift-isle" 483 | version = "0.104.0" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "1571bfc14df8966d12c6121b5325026591a4b4009e22fea0fe3765ab7cd33b96" 486 | 487 | [[package]] 488 | name = "cranelift-native" 489 | version = "0.103.0" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1" 492 | dependencies = [ 493 | "cranelift-codegen 0.103.0", 494 | "libc", 495 | "target-lexicon", 496 | ] 497 | 498 | [[package]] 499 | name = "cranelift-native" 500 | version = "0.104.0" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "35a69c37e0c10b46fe5527f2397ac821046efbf5f7ec112c8b84df25712f465b" 503 | dependencies = [ 504 | "cranelift-codegen 0.104.0", 505 | "libc", 506 | "target-lexicon", 507 | ] 508 | 509 | [[package]] 510 | name = "cranelift-wasm" 511 | version = "0.103.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500" 514 | dependencies = [ 515 | "cranelift-codegen 0.103.0", 516 | "cranelift-entity 0.103.0", 517 | "cranelift-frontend 0.103.0", 518 | "itertools", 519 | "log", 520 | "smallvec", 521 | "wasmparser 0.118.1", 522 | "wasmtime-types 16.0.0", 523 | ] 524 | 525 | [[package]] 526 | name = "cranelift-wasm" 527 | version = "0.104.0" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "9b3fef8bbceb8cb56d3f1778b0418d75c5cf12ec571a35fc01eb41abb0227a25" 530 | dependencies = [ 531 | "cranelift-codegen 0.104.0", 532 | "cranelift-entity 0.104.0", 533 | "cranelift-frontend 0.104.0", 534 | "itertools", 535 | "log", 536 | "smallvec", 537 | "wasmparser 0.118.1", 538 | "wasmtime-types 17.0.0", 539 | ] 540 | 541 | [[package]] 542 | name = "crc32fast" 543 | version = "1.3.2" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 546 | dependencies = [ 547 | "cfg-if", 548 | ] 549 | 550 | [[package]] 551 | name = "crossbeam-deque" 552 | version = "0.8.5" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 555 | dependencies = [ 556 | "crossbeam-epoch", 557 | "crossbeam-utils", 558 | ] 559 | 560 | [[package]] 561 | name = "crossbeam-epoch" 562 | version = "0.9.18" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 565 | dependencies = [ 566 | "crossbeam-utils", 567 | ] 568 | 569 | [[package]] 570 | name = "crossbeam-utils" 571 | version = "0.8.19" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 574 | 575 | [[package]] 576 | name = "crypto-common" 577 | version = "0.1.6" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 580 | dependencies = [ 581 | "generic-array", 582 | "typenum", 583 | ] 584 | 585 | [[package]] 586 | name = "debugid" 587 | version = "0.8.0" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" 590 | dependencies = [ 591 | "uuid", 592 | ] 593 | 594 | [[package]] 595 | name = "digest" 596 | version = "0.10.7" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 599 | dependencies = [ 600 | "block-buffer", 601 | "crypto-common", 602 | ] 603 | 604 | [[package]] 605 | name = "directories-next" 606 | version = "2.0.0" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" 609 | dependencies = [ 610 | "cfg-if", 611 | "dirs-sys-next", 612 | ] 613 | 614 | [[package]] 615 | name = "dirs" 616 | version = "4.0.0" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 619 | dependencies = [ 620 | "dirs-sys", 621 | ] 622 | 623 | [[package]] 624 | name = "dirs-sys" 625 | version = "0.3.7" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 628 | dependencies = [ 629 | "libc", 630 | "redox_users", 631 | "winapi", 632 | ] 633 | 634 | [[package]] 635 | name = "dirs-sys-next" 636 | version = "0.1.2" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 639 | dependencies = [ 640 | "libc", 641 | "redox_users", 642 | "winapi", 643 | ] 644 | 645 | [[package]] 646 | name = "doc-comment" 647 | version = "0.3.3" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" 650 | 651 | [[package]] 652 | name = "dockerfile-parser" 653 | version = "0.8.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "75799314f5fa405629a365a1f97d80f81edd17f22a0fc9c8ddb3ad191ad8dc08" 656 | dependencies = [ 657 | "enquote", 658 | "lazy_static", 659 | "pest", 660 | "pest_derive", 661 | "regex", 662 | "snafu", 663 | ] 664 | 665 | [[package]] 666 | name = "either" 667 | version = "1.9.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 670 | 671 | [[package]] 672 | name = "encoding_rs" 673 | version = "0.8.33" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" 676 | dependencies = [ 677 | "cfg-if", 678 | ] 679 | 680 | [[package]] 681 | name = "enquote" 682 | version = "1.1.0" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "06c36cb11dbde389f4096111698d8b567c0720e3452fd5ac3e6b4e47e1939932" 685 | dependencies = [ 686 | "thiserror", 687 | ] 688 | 689 | [[package]] 690 | name = "equivalent" 691 | version = "1.0.1" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 694 | 695 | [[package]] 696 | name = "errno" 697 | version = "0.3.8" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 700 | dependencies = [ 701 | "libc", 702 | "windows-sys 0.52.0", 703 | ] 704 | 705 | [[package]] 706 | name = "fallible-iterator" 707 | version = "0.3.0" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 710 | 711 | [[package]] 712 | name = "fd-lock" 713 | version = "4.0.2" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" 716 | dependencies = [ 717 | "cfg-if", 718 | "rustix", 719 | "windows-sys 0.52.0", 720 | ] 721 | 722 | [[package]] 723 | name = "form_urlencoded" 724 | version = "1.2.1" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 727 | dependencies = [ 728 | "percent-encoding", 729 | ] 730 | 731 | [[package]] 732 | name = "fs-set-times" 733 | version = "0.20.1" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" 736 | dependencies = [ 737 | "io-lifetimes", 738 | "rustix", 739 | "windows-sys 0.52.0", 740 | ] 741 | 742 | [[package]] 743 | name = "futures" 744 | version = "0.3.30" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" 747 | dependencies = [ 748 | "futures-channel", 749 | "futures-core", 750 | "futures-io", 751 | "futures-sink", 752 | "futures-task", 753 | "futures-util", 754 | ] 755 | 756 | [[package]] 757 | name = "futures-channel" 758 | version = "0.3.30" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 761 | dependencies = [ 762 | "futures-core", 763 | "futures-sink", 764 | ] 765 | 766 | [[package]] 767 | name = "futures-core" 768 | version = "0.3.30" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 771 | 772 | [[package]] 773 | name = "futures-io" 774 | version = "0.3.30" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 777 | 778 | [[package]] 779 | name = "futures-sink" 780 | version = "0.3.30" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 783 | 784 | [[package]] 785 | name = "futures-task" 786 | version = "0.3.30" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 789 | 790 | [[package]] 791 | name = "futures-util" 792 | version = "0.3.30" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 795 | dependencies = [ 796 | "futures-core", 797 | "futures-sink", 798 | "futures-task", 799 | "pin-project-lite", 800 | "pin-utils", 801 | ] 802 | 803 | [[package]] 804 | name = "fxhash" 805 | version = "0.2.1" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 808 | dependencies = [ 809 | "byteorder", 810 | ] 811 | 812 | [[package]] 813 | name = "fxprof-processed-profile" 814 | version = "0.6.0" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" 817 | dependencies = [ 818 | "bitflags 2.4.2", 819 | "debugid", 820 | "fxhash", 821 | "serde", 822 | "serde_json", 823 | ] 824 | 825 | [[package]] 826 | name = "generic-array" 827 | version = "0.14.7" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 830 | dependencies = [ 831 | "typenum", 832 | "version_check", 833 | ] 834 | 835 | [[package]] 836 | name = "getrandom" 837 | version = "0.2.12" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" 840 | dependencies = [ 841 | "cfg-if", 842 | "libc", 843 | "wasi", 844 | ] 845 | 846 | [[package]] 847 | name = "gimli" 848 | version = "0.28.1" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 851 | dependencies = [ 852 | "fallible-iterator", 853 | "indexmap 2.2.1", 854 | "stable_deref_trait", 855 | ] 856 | 857 | [[package]] 858 | name = "hashbrown" 859 | version = "0.12.3" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 862 | 863 | [[package]] 864 | name = "hashbrown" 865 | version = "0.13.2" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" 868 | dependencies = [ 869 | "ahash", 870 | ] 871 | 872 | [[package]] 873 | name = "hashbrown" 874 | version = "0.14.3" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 877 | dependencies = [ 878 | "ahash", 879 | ] 880 | 881 | [[package]] 882 | name = "heck" 883 | version = "0.3.3" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 886 | dependencies = [ 887 | "unicode-segmentation", 888 | ] 889 | 890 | [[package]] 891 | name = "heck" 892 | version = "0.4.1" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 895 | 896 | [[package]] 897 | name = "hermit-abi" 898 | version = "0.1.19" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 901 | dependencies = [ 902 | "libc", 903 | ] 904 | 905 | [[package]] 906 | name = "hermit-abi" 907 | version = "0.3.4" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" 910 | 911 | [[package]] 912 | name = "iana-time-zone" 913 | version = "0.1.59" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" 916 | dependencies = [ 917 | "android_system_properties", 918 | "core-foundation-sys", 919 | "iana-time-zone-haiku", 920 | "js-sys", 921 | "wasm-bindgen", 922 | "windows-core", 923 | ] 924 | 925 | [[package]] 926 | name = "iana-time-zone-haiku" 927 | version = "0.1.2" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 930 | dependencies = [ 931 | "cc", 932 | ] 933 | 934 | [[package]] 935 | name = "id-arena" 936 | version = "2.2.1" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" 939 | 940 | [[package]] 941 | name = "idna" 942 | version = "0.5.0" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 945 | dependencies = [ 946 | "unicode-bidi", 947 | "unicode-normalization", 948 | ] 949 | 950 | [[package]] 951 | name = "indexmap" 952 | version = "1.9.3" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 955 | dependencies = [ 956 | "autocfg", 957 | "hashbrown 0.12.3", 958 | ] 959 | 960 | [[package]] 961 | name = "indexmap" 962 | version = "2.2.1" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" 965 | dependencies = [ 966 | "equivalent", 967 | "hashbrown 0.14.3", 968 | "serde", 969 | ] 970 | 971 | [[package]] 972 | name = "io-extras" 973 | version = "0.18.1" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed" 976 | dependencies = [ 977 | "io-lifetimes", 978 | "windows-sys 0.52.0", 979 | ] 980 | 981 | [[package]] 982 | name = "io-lifetimes" 983 | version = "2.0.3" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" 986 | 987 | [[package]] 988 | name = "ipnet" 989 | version = "2.9.0" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" 992 | 993 | [[package]] 994 | name = "itertools" 995 | version = "0.10.5" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 998 | dependencies = [ 999 | "either", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "itoa" 1004 | version = "1.0.10" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 1007 | 1008 | [[package]] 1009 | name = "ittapi" 1010 | version = "0.4.0" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" 1013 | dependencies = [ 1014 | "anyhow", 1015 | "ittapi-sys", 1016 | "log", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "ittapi-sys" 1021 | version = "0.4.0" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" 1024 | dependencies = [ 1025 | "cc", 1026 | ] 1027 | 1028 | [[package]] 1029 | name = "jobserver" 1030 | version = "0.1.27" 1031 | source = "registry+https://github.com/rust-lang/crates.io-index" 1032 | checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" 1033 | dependencies = [ 1034 | "libc", 1035 | ] 1036 | 1037 | [[package]] 1038 | name = "js-sys" 1039 | version = "0.3.67" 1040 | source = "registry+https://github.com/rust-lang/crates.io-index" 1041 | checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" 1042 | dependencies = [ 1043 | "wasm-bindgen", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "lazy_static" 1048 | version = "1.4.0" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1051 | 1052 | [[package]] 1053 | name = "leb128" 1054 | version = "0.2.5" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" 1057 | 1058 | [[package]] 1059 | name = "libc" 1060 | version = "0.2.152" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" 1063 | 1064 | [[package]] 1065 | name = "libredox" 1066 | version = "0.0.1" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" 1069 | dependencies = [ 1070 | "bitflags 2.4.2", 1071 | "libc", 1072 | "redox_syscall", 1073 | ] 1074 | 1075 | [[package]] 1076 | name = "linux-raw-sys" 1077 | version = "0.4.13" 1078 | source = "registry+https://github.com/rust-lang/crates.io-index" 1079 | checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 1080 | 1081 | [[package]] 1082 | name = "log" 1083 | version = "0.4.20" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 1086 | 1087 | [[package]] 1088 | name = "mach" 1089 | version = "0.3.2" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 1092 | dependencies = [ 1093 | "libc", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "marcotte" 1098 | version = "0.0.1" 1099 | dependencies = [ 1100 | "anyhow", 1101 | "regex", 1102 | "walkdir", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "maybe-owned" 1107 | version = "0.3.4" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" 1110 | 1111 | [[package]] 1112 | name = "memchr" 1113 | version = "2.7.1" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 1116 | 1117 | [[package]] 1118 | name = "memfd" 1119 | version = "0.6.4" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" 1122 | dependencies = [ 1123 | "rustix", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "memoffset" 1128 | version = "0.9.0" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 1131 | dependencies = [ 1132 | "autocfg", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "miniz_oxide" 1137 | version = "0.7.1" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1140 | dependencies = [ 1141 | "adler", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "mio" 1146 | version = "0.8.10" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" 1149 | dependencies = [ 1150 | "libc", 1151 | "wasi", 1152 | "windows-sys 0.48.0", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "num_cpus" 1157 | version = "1.16.0" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1160 | dependencies = [ 1161 | "hermit-abi 0.3.4", 1162 | "libc", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "object" 1167 | version = "0.32.2" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 1170 | dependencies = [ 1171 | "crc32fast", 1172 | "hashbrown 0.14.3", 1173 | "indexmap 2.2.1", 1174 | "memchr", 1175 | ] 1176 | 1177 | [[package]] 1178 | name = "once_cell" 1179 | version = "1.19.0" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1182 | 1183 | [[package]] 1184 | name = "paste" 1185 | version = "1.0.14" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" 1188 | 1189 | [[package]] 1190 | name = "percent-encoding" 1191 | version = "2.3.1" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1194 | 1195 | [[package]] 1196 | name = "pest" 1197 | version = "2.7.6" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" 1200 | dependencies = [ 1201 | "memchr", 1202 | "thiserror", 1203 | "ucd-trie", 1204 | ] 1205 | 1206 | [[package]] 1207 | name = "pest_derive" 1208 | version = "2.7.6" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" 1211 | dependencies = [ 1212 | "pest", 1213 | "pest_generator", 1214 | ] 1215 | 1216 | [[package]] 1217 | name = "pest_generator" 1218 | version = "2.7.6" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" 1221 | dependencies = [ 1222 | "pest", 1223 | "pest_meta", 1224 | "proc-macro2", 1225 | "quote", 1226 | "syn 2.0.48", 1227 | ] 1228 | 1229 | [[package]] 1230 | name = "pest_meta" 1231 | version = "2.7.6" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" 1234 | dependencies = [ 1235 | "once_cell", 1236 | "pest", 1237 | "sha2", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "pin-project-lite" 1242 | version = "0.2.13" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 1245 | 1246 | [[package]] 1247 | name = "pin-utils" 1248 | version = "0.1.0" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1251 | 1252 | [[package]] 1253 | name = "pkg-config" 1254 | version = "0.3.29" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" 1257 | 1258 | [[package]] 1259 | name = "ppv-lite86" 1260 | version = "0.2.17" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1263 | 1264 | [[package]] 1265 | name = "proc-macro-error" 1266 | version = "1.0.4" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1269 | dependencies = [ 1270 | "proc-macro-error-attr", 1271 | "proc-macro2", 1272 | "quote", 1273 | "syn 1.0.109", 1274 | "version_check", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "proc-macro-error-attr" 1279 | version = "1.0.4" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1282 | dependencies = [ 1283 | "proc-macro2", 1284 | "quote", 1285 | "version_check", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "proc-macro2" 1290 | version = "1.0.78" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" 1293 | dependencies = [ 1294 | "unicode-ident", 1295 | ] 1296 | 1297 | [[package]] 1298 | name = "psm" 1299 | version = "0.1.21" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" 1302 | dependencies = [ 1303 | "cc", 1304 | ] 1305 | 1306 | [[package]] 1307 | name = "quote" 1308 | version = "1.0.35" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 1311 | dependencies = [ 1312 | "proc-macro2", 1313 | ] 1314 | 1315 | [[package]] 1316 | name = "rand" 1317 | version = "0.8.5" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1320 | dependencies = [ 1321 | "libc", 1322 | "rand_chacha", 1323 | "rand_core", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "rand_chacha" 1328 | version = "0.3.1" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1331 | dependencies = [ 1332 | "ppv-lite86", 1333 | "rand_core", 1334 | ] 1335 | 1336 | [[package]] 1337 | name = "rand_core" 1338 | version = "0.6.4" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1341 | dependencies = [ 1342 | "getrandom", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "rayon" 1347 | version = "1.8.1" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" 1350 | dependencies = [ 1351 | "either", 1352 | "rayon-core", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "rayon-core" 1357 | version = "1.12.1" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1360 | dependencies = [ 1361 | "crossbeam-deque", 1362 | "crossbeam-utils", 1363 | ] 1364 | 1365 | [[package]] 1366 | name = "redox_syscall" 1367 | version = "0.4.1" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 1370 | dependencies = [ 1371 | "bitflags 1.3.2", 1372 | ] 1373 | 1374 | [[package]] 1375 | name = "redox_users" 1376 | version = "0.4.4" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" 1379 | dependencies = [ 1380 | "getrandom", 1381 | "libredox", 1382 | "thiserror", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "regalloc2" 1387 | version = "0.9.3" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" 1390 | dependencies = [ 1391 | "hashbrown 0.13.2", 1392 | "log", 1393 | "rustc-hash", 1394 | "slice-group-by", 1395 | "smallvec", 1396 | ] 1397 | 1398 | [[package]] 1399 | name = "regex" 1400 | version = "1.10.3" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" 1403 | dependencies = [ 1404 | "aho-corasick", 1405 | "memchr", 1406 | "regex-automata", 1407 | "regex-syntax", 1408 | ] 1409 | 1410 | [[package]] 1411 | name = "regex-automata" 1412 | version = "0.4.5" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" 1415 | dependencies = [ 1416 | "aho-corasick", 1417 | "memchr", 1418 | "regex-syntax", 1419 | ] 1420 | 1421 | [[package]] 1422 | name = "regex-syntax" 1423 | version = "0.8.2" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 1426 | 1427 | [[package]] 1428 | name = "rustc-demangle" 1429 | version = "0.1.23" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1432 | 1433 | [[package]] 1434 | name = "rustc-hash" 1435 | version = "1.1.0" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1438 | 1439 | [[package]] 1440 | name = "rustix" 1441 | version = "0.38.30" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" 1444 | dependencies = [ 1445 | "bitflags 2.4.2", 1446 | "errno", 1447 | "itoa", 1448 | "libc", 1449 | "linux-raw-sys", 1450 | "once_cell", 1451 | "windows-sys 0.52.0", 1452 | ] 1453 | 1454 | [[package]] 1455 | name = "ryu" 1456 | version = "1.0.16" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" 1459 | 1460 | [[package]] 1461 | name = "same-file" 1462 | version = "1.0.6" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1465 | dependencies = [ 1466 | "winapi-util", 1467 | ] 1468 | 1469 | [[package]] 1470 | name = "semver" 1471 | version = "1.0.21" 1472 | source = "registry+https://github.com/rust-lang/crates.io-index" 1473 | checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" 1474 | 1475 | [[package]] 1476 | name = "serde" 1477 | version = "1.0.196" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" 1480 | dependencies = [ 1481 | "serde_derive", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "serde_derive" 1486 | version = "1.0.196" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" 1489 | dependencies = [ 1490 | "proc-macro2", 1491 | "quote", 1492 | "syn 2.0.48", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "serde_json" 1497 | version = "1.0.112" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "4d1bd37ce2324cf3bf85e5a25f96eb4baf0d5aa6eba43e7ae8958870c4ec48ed" 1500 | dependencies = [ 1501 | "itoa", 1502 | "ryu", 1503 | "serde", 1504 | ] 1505 | 1506 | [[package]] 1507 | name = "sha2" 1508 | version = "0.10.8" 1509 | source = "registry+https://github.com/rust-lang/crates.io-index" 1510 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1511 | dependencies = [ 1512 | "cfg-if", 1513 | "cpufeatures", 1514 | "digest", 1515 | ] 1516 | 1517 | [[package]] 1518 | name = "shellexpand" 1519 | version = "2.1.2" 1520 | source = "registry+https://github.com/rust-lang/crates.io-index" 1521 | checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" 1522 | dependencies = [ 1523 | "dirs", 1524 | ] 1525 | 1526 | [[package]] 1527 | name = "slice-group-by" 1528 | version = "0.3.1" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" 1531 | 1532 | [[package]] 1533 | name = "smallvec" 1534 | version = "1.13.1" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" 1537 | 1538 | [[package]] 1539 | name = "snafu" 1540 | version = "0.6.10" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" 1543 | dependencies = [ 1544 | "doc-comment", 1545 | "snafu-derive", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "snafu-derive" 1550 | version = "0.6.10" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" 1553 | dependencies = [ 1554 | "proc-macro2", 1555 | "quote", 1556 | "syn 1.0.109", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "socket2" 1561 | version = "0.5.5" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 1564 | dependencies = [ 1565 | "libc", 1566 | "windows-sys 0.48.0", 1567 | ] 1568 | 1569 | [[package]] 1570 | name = "sptr" 1571 | version = "0.3.2" 1572 | source = "registry+https://github.com/rust-lang/crates.io-index" 1573 | checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" 1574 | 1575 | [[package]] 1576 | name = "stable_deref_trait" 1577 | version = "1.2.0" 1578 | source = "registry+https://github.com/rust-lang/crates.io-index" 1579 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1580 | 1581 | [[package]] 1582 | name = "strsim" 1583 | version = "0.8.0" 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" 1585 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1586 | 1587 | [[package]] 1588 | name = "structopt" 1589 | version = "0.3.26" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" 1592 | dependencies = [ 1593 | "clap", 1594 | "lazy_static", 1595 | "structopt-derive", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "structopt-derive" 1600 | version = "0.4.18" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 1603 | dependencies = [ 1604 | "heck 0.3.3", 1605 | "proc-macro-error", 1606 | "proc-macro2", 1607 | "quote", 1608 | "syn 1.0.109", 1609 | ] 1610 | 1611 | [[package]] 1612 | name = "syn" 1613 | version = "1.0.109" 1614 | source = "registry+https://github.com/rust-lang/crates.io-index" 1615 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1616 | dependencies = [ 1617 | "proc-macro2", 1618 | "quote", 1619 | "unicode-ident", 1620 | ] 1621 | 1622 | [[package]] 1623 | name = "syn" 1624 | version = "2.0.48" 1625 | source = "registry+https://github.com/rust-lang/crates.io-index" 1626 | checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" 1627 | dependencies = [ 1628 | "proc-macro2", 1629 | "quote", 1630 | "unicode-ident", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "system-interface" 1635 | version = "0.26.1" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" 1638 | dependencies = [ 1639 | "bitflags 2.4.2", 1640 | "cap-fs-ext", 1641 | "cap-std", 1642 | "fd-lock", 1643 | "io-lifetimes", 1644 | "rustix", 1645 | "windows-sys 0.52.0", 1646 | "winx", 1647 | ] 1648 | 1649 | [[package]] 1650 | name = "target-lexicon" 1651 | version = "0.12.13" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" 1654 | 1655 | [[package]] 1656 | name = "textwrap" 1657 | version = "0.11.0" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1660 | dependencies = [ 1661 | "unicode-width", 1662 | ] 1663 | 1664 | [[package]] 1665 | name = "thiserror" 1666 | version = "1.0.56" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" 1669 | dependencies = [ 1670 | "thiserror-impl", 1671 | ] 1672 | 1673 | [[package]] 1674 | name = "thiserror-impl" 1675 | version = "1.0.56" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" 1678 | dependencies = [ 1679 | "proc-macro2", 1680 | "quote", 1681 | "syn 2.0.48", 1682 | ] 1683 | 1684 | [[package]] 1685 | name = "tinyvec" 1686 | version = "1.6.0" 1687 | source = "registry+https://github.com/rust-lang/crates.io-index" 1688 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1689 | dependencies = [ 1690 | "tinyvec_macros", 1691 | ] 1692 | 1693 | [[package]] 1694 | name = "tinyvec_macros" 1695 | version = "0.1.1" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1698 | 1699 | [[package]] 1700 | name = "tokio" 1701 | version = "1.35.1" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" 1704 | dependencies = [ 1705 | "backtrace", 1706 | "bytes", 1707 | "libc", 1708 | "mio", 1709 | "num_cpus", 1710 | "pin-project-lite", 1711 | "socket2", 1712 | "windows-sys 0.48.0", 1713 | ] 1714 | 1715 | [[package]] 1716 | name = "toml" 1717 | version = "0.5.11" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 1720 | dependencies = [ 1721 | "serde", 1722 | ] 1723 | 1724 | [[package]] 1725 | name = "tracing" 1726 | version = "0.1.40" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 1729 | dependencies = [ 1730 | "log", 1731 | "pin-project-lite", 1732 | "tracing-attributes", 1733 | "tracing-core", 1734 | ] 1735 | 1736 | [[package]] 1737 | name = "tracing-attributes" 1738 | version = "0.1.27" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" 1741 | dependencies = [ 1742 | "proc-macro2", 1743 | "quote", 1744 | "syn 2.0.48", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "tracing-core" 1749 | version = "0.1.32" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 1752 | dependencies = [ 1753 | "once_cell", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "typenum" 1758 | version = "1.17.0" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1761 | 1762 | [[package]] 1763 | name = "ucd-trie" 1764 | version = "0.1.6" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" 1767 | 1768 | [[package]] 1769 | name = "unicode-bidi" 1770 | version = "0.3.15" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 1773 | 1774 | [[package]] 1775 | name = "unicode-ident" 1776 | version = "1.0.12" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1779 | 1780 | [[package]] 1781 | name = "unicode-normalization" 1782 | version = "0.1.22" 1783 | source = "registry+https://github.com/rust-lang/crates.io-index" 1784 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1785 | dependencies = [ 1786 | "tinyvec", 1787 | ] 1788 | 1789 | [[package]] 1790 | name = "unicode-segmentation" 1791 | version = "1.10.1" 1792 | source = "registry+https://github.com/rust-lang/crates.io-index" 1793 | checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 1794 | 1795 | [[package]] 1796 | name = "unicode-width" 1797 | version = "0.1.11" 1798 | source = "registry+https://github.com/rust-lang/crates.io-index" 1799 | checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" 1800 | 1801 | [[package]] 1802 | name = "unicode-xid" 1803 | version = "0.2.4" 1804 | source = "registry+https://github.com/rust-lang/crates.io-index" 1805 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 1806 | 1807 | [[package]] 1808 | name = "url" 1809 | version = "2.5.0" 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" 1811 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 1812 | dependencies = [ 1813 | "form_urlencoded", 1814 | "idna", 1815 | "percent-encoding", 1816 | ] 1817 | 1818 | [[package]] 1819 | name = "uuid" 1820 | version = "1.7.0" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" 1823 | 1824 | [[package]] 1825 | name = "vec_map" 1826 | version = "0.8.2" 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" 1828 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1829 | 1830 | [[package]] 1831 | name = "version_check" 1832 | version = "0.9.4" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1835 | 1836 | [[package]] 1837 | name = "walkdir" 1838 | version = "2.5.0" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 1841 | dependencies = [ 1842 | "same-file", 1843 | "winapi-util", 1844 | ] 1845 | 1846 | [[package]] 1847 | name = "wasi" 1848 | version = "0.11.0+wasi-snapshot-preview1" 1849 | source = "registry+https://github.com/rust-lang/crates.io-index" 1850 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1851 | 1852 | [[package]] 1853 | name = "wasi-cap-std-sync" 1854 | version = "16.0.0" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b" 1857 | dependencies = [ 1858 | "anyhow", 1859 | "async-trait", 1860 | "cap-fs-ext", 1861 | "cap-rand", 1862 | "cap-std", 1863 | "cap-time-ext", 1864 | "fs-set-times", 1865 | "io-extras", 1866 | "io-lifetimes", 1867 | "once_cell", 1868 | "rustix", 1869 | "system-interface", 1870 | "tracing", 1871 | "wasi-common", 1872 | "windows-sys 0.48.0", 1873 | ] 1874 | 1875 | [[package]] 1876 | name = "wasi-common" 1877 | version = "16.0.0" 1878 | source = "registry+https://github.com/rust-lang/crates.io-index" 1879 | checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b" 1880 | dependencies = [ 1881 | "anyhow", 1882 | "bitflags 2.4.2", 1883 | "cap-rand", 1884 | "cap-std", 1885 | "io-extras", 1886 | "log", 1887 | "rustix", 1888 | "thiserror", 1889 | "tracing", 1890 | "wasmtime 16.0.0", 1891 | "wiggle", 1892 | "windows-sys 0.48.0", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "wasm-bindgen" 1897 | version = "0.2.90" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" 1900 | dependencies = [ 1901 | "cfg-if", 1902 | "wasm-bindgen-macro", 1903 | ] 1904 | 1905 | [[package]] 1906 | name = "wasm-bindgen-backend" 1907 | version = "0.2.90" 1908 | source = "registry+https://github.com/rust-lang/crates.io-index" 1909 | checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" 1910 | dependencies = [ 1911 | "bumpalo", 1912 | "log", 1913 | "once_cell", 1914 | "proc-macro2", 1915 | "quote", 1916 | "syn 2.0.48", 1917 | "wasm-bindgen-shared", 1918 | ] 1919 | 1920 | [[package]] 1921 | name = "wasm-bindgen-macro" 1922 | version = "0.2.90" 1923 | source = "registry+https://github.com/rust-lang/crates.io-index" 1924 | checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" 1925 | dependencies = [ 1926 | "quote", 1927 | "wasm-bindgen-macro-support", 1928 | ] 1929 | 1930 | [[package]] 1931 | name = "wasm-bindgen-macro-support" 1932 | version = "0.2.90" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" 1935 | dependencies = [ 1936 | "proc-macro2", 1937 | "quote", 1938 | "syn 2.0.48", 1939 | "wasm-bindgen-backend", 1940 | "wasm-bindgen-shared", 1941 | ] 1942 | 1943 | [[package]] 1944 | name = "wasm-bindgen-shared" 1945 | version = "0.2.90" 1946 | source = "registry+https://github.com/rust-lang/crates.io-index" 1947 | checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" 1948 | 1949 | [[package]] 1950 | name = "wasm-encoder" 1951 | version = "0.30.0" 1952 | source = "registry+https://github.com/rust-lang/crates.io-index" 1953 | checksum = "b2f8e9778e04cbf44f58acc301372577375a666b966c50b03ef46144f80436a8" 1954 | dependencies = [ 1955 | "leb128", 1956 | ] 1957 | 1958 | [[package]] 1959 | name = "wasm-encoder" 1960 | version = "0.38.1" 1961 | source = "registry+https://github.com/rust-lang/crates.io-index" 1962 | checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" 1963 | dependencies = [ 1964 | "leb128", 1965 | ] 1966 | 1967 | [[package]] 1968 | name = "wasm-encoder" 1969 | version = "0.40.0" 1970 | source = "registry+https://github.com/rust-lang/crates.io-index" 1971 | checksum = "d162eb64168969ae90e8668ca0593b0e47667e315aa08e717a9c9574d700d826" 1972 | dependencies = [ 1973 | "leb128", 1974 | ] 1975 | 1976 | [[package]] 1977 | name = "wasmparser" 1978 | version = "0.106.0" 1979 | source = "registry+https://github.com/rust-lang/crates.io-index" 1980 | checksum = "d014e33793cab91655fa6349b0bc974984de106b2e0f6b0dfe6f6594b260624d" 1981 | dependencies = [ 1982 | "indexmap 1.9.3", 1983 | "url", 1984 | ] 1985 | 1986 | [[package]] 1987 | name = "wasmparser" 1988 | version = "0.118.1" 1989 | source = "registry+https://github.com/rust-lang/crates.io-index" 1990 | checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" 1991 | dependencies = [ 1992 | "indexmap 2.2.1", 1993 | "semver", 1994 | ] 1995 | 1996 | [[package]] 1997 | name = "wasmparser" 1998 | version = "0.120.0" 1999 | source = "registry+https://github.com/rust-lang/crates.io-index" 2000 | checksum = "e9148127f39cbffe43efee8d5442b16ecdba21567785268daa1ec9e134389705" 2001 | dependencies = [ 2002 | "bitflags 2.4.2", 2003 | "indexmap 2.2.1", 2004 | "semver", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "wasmprinter" 2009 | version = "0.2.77" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "d8389a95eb0b3165fea0537a6988960cc23a33d9be650e63fc3d63065fe20dcb" 2012 | dependencies = [ 2013 | "anyhow", 2014 | "wasmparser 0.120.0", 2015 | ] 2016 | 2017 | [[package]] 2018 | name = "wasmtime" 2019 | version = "16.0.0" 2020 | source = "registry+https://github.com/rust-lang/crates.io-index" 2021 | checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf" 2022 | dependencies = [ 2023 | "anyhow", 2024 | "async-trait", 2025 | "bincode", 2026 | "bumpalo", 2027 | "cfg-if", 2028 | "encoding_rs", 2029 | "fxprof-processed-profile", 2030 | "indexmap 2.2.1", 2031 | "libc", 2032 | "log", 2033 | "object", 2034 | "once_cell", 2035 | "paste", 2036 | "rayon", 2037 | "serde", 2038 | "serde_derive", 2039 | "serde_json", 2040 | "target-lexicon", 2041 | "wasm-encoder 0.38.1", 2042 | "wasmparser 0.118.1", 2043 | "wasmtime-cache 16.0.0", 2044 | "wasmtime-component-macro 16.0.0", 2045 | "wasmtime-component-util 16.0.0", 2046 | "wasmtime-cranelift 16.0.0", 2047 | "wasmtime-environ 16.0.0", 2048 | "wasmtime-fiber 16.0.0", 2049 | "wasmtime-jit 16.0.0", 2050 | "wasmtime-runtime 16.0.0", 2051 | "wasmtime-winch", 2052 | "wat", 2053 | "windows-sys 0.48.0", 2054 | ] 2055 | 2056 | [[package]] 2057 | name = "wasmtime" 2058 | version = "17.0.0" 2059 | source = "registry+https://github.com/rust-lang/crates.io-index" 2060 | checksum = "910fabce77e660f0e0e41cfd5f69fc8bf020a025f059718846e918db7177f469" 2061 | dependencies = [ 2062 | "anyhow", 2063 | "async-trait", 2064 | "bincode", 2065 | "bumpalo", 2066 | "cfg-if", 2067 | "fxprof-processed-profile", 2068 | "indexmap 2.2.1", 2069 | "libc", 2070 | "log", 2071 | "object", 2072 | "once_cell", 2073 | "paste", 2074 | "rayon", 2075 | "serde", 2076 | "serde_derive", 2077 | "serde_json", 2078 | "target-lexicon", 2079 | "wasm-encoder 0.38.1", 2080 | "wasmparser 0.118.1", 2081 | "wasmtime-cache 17.0.0", 2082 | "wasmtime-component-macro 17.0.0", 2083 | "wasmtime-cranelift 17.0.0", 2084 | "wasmtime-environ 17.0.0", 2085 | "wasmtime-fiber 17.0.0", 2086 | "wasmtime-jit 17.0.0", 2087 | "wasmtime-runtime 17.0.0", 2088 | "wat", 2089 | "windows-sys 0.52.0", 2090 | ] 2091 | 2092 | [[package]] 2093 | name = "wasmtime-asm-macros" 2094 | version = "16.0.0" 2095 | source = "registry+https://github.com/rust-lang/crates.io-index" 2096 | checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9" 2097 | dependencies = [ 2098 | "cfg-if", 2099 | ] 2100 | 2101 | [[package]] 2102 | name = "wasmtime-asm-macros" 2103 | version = "17.0.0" 2104 | source = "registry+https://github.com/rust-lang/crates.io-index" 2105 | checksum = "37288142e9b4a61655a3bcbdc7316c2e4bb9e776b10ce3dd758f8186b4469572" 2106 | dependencies = [ 2107 | "cfg-if", 2108 | ] 2109 | 2110 | [[package]] 2111 | name = "wasmtime-cache" 2112 | version = "16.0.0" 2113 | source = "registry+https://github.com/rust-lang/crates.io-index" 2114 | checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594" 2115 | dependencies = [ 2116 | "anyhow", 2117 | "base64", 2118 | "bincode", 2119 | "directories-next", 2120 | "log", 2121 | "rustix", 2122 | "serde", 2123 | "serde_derive", 2124 | "sha2", 2125 | "toml", 2126 | "windows-sys 0.48.0", 2127 | "zstd", 2128 | ] 2129 | 2130 | [[package]] 2131 | name = "wasmtime-cache" 2132 | version = "17.0.0" 2133 | source = "registry+https://github.com/rust-lang/crates.io-index" 2134 | checksum = "45cbd74a636f09d2108f9405c79857f061e19323e4abeed22e837cfe7b08a22b" 2135 | dependencies = [ 2136 | "anyhow", 2137 | "base64", 2138 | "bincode", 2139 | "directories-next", 2140 | "log", 2141 | "rustix", 2142 | "serde", 2143 | "serde_derive", 2144 | "sha2", 2145 | "toml", 2146 | "windows-sys 0.52.0", 2147 | "zstd", 2148 | ] 2149 | 2150 | [[package]] 2151 | name = "wasmtime-component-macro" 2152 | version = "16.0.0" 2153 | source = "registry+https://github.com/rust-lang/crates.io-index" 2154 | checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5" 2155 | dependencies = [ 2156 | "anyhow", 2157 | "proc-macro2", 2158 | "quote", 2159 | "syn 2.0.48", 2160 | "wasmtime-component-util 16.0.0", 2161 | "wasmtime-wit-bindgen 16.0.0", 2162 | "wit-parser", 2163 | ] 2164 | 2165 | [[package]] 2166 | name = "wasmtime-component-macro" 2167 | version = "17.0.0" 2168 | source = "registry+https://github.com/rust-lang/crates.io-index" 2169 | checksum = "ad63de18eb42e586386b6091f787c82707cbd5ac5e9343216dba1976190cd03a" 2170 | dependencies = [ 2171 | "anyhow", 2172 | "proc-macro2", 2173 | "quote", 2174 | "syn 2.0.48", 2175 | "wasmtime-component-util 17.0.0", 2176 | "wasmtime-wit-bindgen 17.0.0", 2177 | "wit-parser", 2178 | ] 2179 | 2180 | [[package]] 2181 | name = "wasmtime-component-util" 2182 | version = "16.0.0" 2183 | source = "registry+https://github.com/rust-lang/crates.io-index" 2184 | checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d" 2185 | 2186 | [[package]] 2187 | name = "wasmtime-component-util" 2188 | version = "17.0.0" 2189 | source = "registry+https://github.com/rust-lang/crates.io-index" 2190 | checksum = "7e0a160c0c44369aa4bee6d311a8e4366943bab1651040cc8b0fcec2c9eb8906" 2191 | 2192 | [[package]] 2193 | name = "wasmtime-cranelift" 2194 | version = "16.0.0" 2195 | source = "registry+https://github.com/rust-lang/crates.io-index" 2196 | checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2" 2197 | dependencies = [ 2198 | "anyhow", 2199 | "cfg-if", 2200 | "cranelift-codegen 0.103.0", 2201 | "cranelift-control 0.103.0", 2202 | "cranelift-entity 0.103.0", 2203 | "cranelift-frontend 0.103.0", 2204 | "cranelift-native 0.103.0", 2205 | "cranelift-wasm 0.103.0", 2206 | "gimli", 2207 | "log", 2208 | "object", 2209 | "target-lexicon", 2210 | "thiserror", 2211 | "wasmparser 0.118.1", 2212 | "wasmtime-cranelift-shared 16.0.0", 2213 | "wasmtime-environ 16.0.0", 2214 | "wasmtime-versioned-export-macros 16.0.0", 2215 | ] 2216 | 2217 | [[package]] 2218 | name = "wasmtime-cranelift" 2219 | version = "17.0.0" 2220 | source = "registry+https://github.com/rust-lang/crates.io-index" 2221 | checksum = "3734cc01b7cd37bc62fdbcd9529ca9547440052d4b3886cfdec3b8081a5d3647" 2222 | dependencies = [ 2223 | "anyhow", 2224 | "cfg-if", 2225 | "cranelift-codegen 0.104.0", 2226 | "cranelift-control 0.104.0", 2227 | "cranelift-entity 0.104.0", 2228 | "cranelift-frontend 0.104.0", 2229 | "cranelift-native 0.104.0", 2230 | "cranelift-wasm 0.104.0", 2231 | "gimli", 2232 | "log", 2233 | "object", 2234 | "target-lexicon", 2235 | "thiserror", 2236 | "wasmparser 0.118.1", 2237 | "wasmtime-cranelift-shared 17.0.0", 2238 | "wasmtime-environ 17.0.0", 2239 | "wasmtime-versioned-export-macros 17.0.0", 2240 | ] 2241 | 2242 | [[package]] 2243 | name = "wasmtime-cranelift-shared" 2244 | version = "16.0.0" 2245 | source = "registry+https://github.com/rust-lang/crates.io-index" 2246 | checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c" 2247 | dependencies = [ 2248 | "anyhow", 2249 | "cranelift-codegen 0.103.0", 2250 | "cranelift-control 0.103.0", 2251 | "cranelift-native 0.103.0", 2252 | "gimli", 2253 | "object", 2254 | "target-lexicon", 2255 | "wasmtime-environ 16.0.0", 2256 | ] 2257 | 2258 | [[package]] 2259 | name = "wasmtime-cranelift-shared" 2260 | version = "17.0.0" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "e0eb33cd30c47844aa228d4d0030587e65c1108343f311fe9f7248b5bd9cb65c" 2263 | dependencies = [ 2264 | "anyhow", 2265 | "cranelift-codegen 0.104.0", 2266 | "cranelift-control 0.104.0", 2267 | "cranelift-native 0.104.0", 2268 | "gimli", 2269 | "object", 2270 | "target-lexicon", 2271 | "wasmtime-environ 17.0.0", 2272 | ] 2273 | 2274 | [[package]] 2275 | name = "wasmtime-environ" 2276 | version = "16.0.0" 2277 | source = "registry+https://github.com/rust-lang/crates.io-index" 2278 | checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754" 2279 | dependencies = [ 2280 | "anyhow", 2281 | "cranelift-entity 0.103.0", 2282 | "gimli", 2283 | "indexmap 2.2.1", 2284 | "log", 2285 | "object", 2286 | "serde", 2287 | "serde_derive", 2288 | "target-lexicon", 2289 | "thiserror", 2290 | "wasm-encoder 0.38.1", 2291 | "wasmparser 0.118.1", 2292 | "wasmprinter", 2293 | "wasmtime-component-util 16.0.0", 2294 | "wasmtime-types 16.0.0", 2295 | ] 2296 | 2297 | [[package]] 2298 | name = "wasmtime-environ" 2299 | version = "17.0.0" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "9a3a056b041fdea604f0972e2fae97958e7748d629a55180228348baefdfc217" 2302 | dependencies = [ 2303 | "anyhow", 2304 | "cranelift-entity 0.104.0", 2305 | "gimli", 2306 | "indexmap 2.2.1", 2307 | "log", 2308 | "object", 2309 | "serde", 2310 | "serde_derive", 2311 | "target-lexicon", 2312 | "thiserror", 2313 | "wasmparser 0.118.1", 2314 | "wasmtime-types 17.0.0", 2315 | ] 2316 | 2317 | [[package]] 2318 | name = "wasmtime-fiber" 2319 | version = "16.0.0" 2320 | source = "registry+https://github.com/rust-lang/crates.io-index" 2321 | checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443" 2322 | dependencies = [ 2323 | "anyhow", 2324 | "cc", 2325 | "cfg-if", 2326 | "rustix", 2327 | "wasmtime-asm-macros 16.0.0", 2328 | "wasmtime-versioned-export-macros 16.0.0", 2329 | "windows-sys 0.48.0", 2330 | ] 2331 | 2332 | [[package]] 2333 | name = "wasmtime-fiber" 2334 | version = "17.0.0" 2335 | source = "registry+https://github.com/rust-lang/crates.io-index" 2336 | checksum = "43987d0977c07f15c3608c2f255870c127ffd19e35eeedb1ac1dccedf9932a42" 2337 | dependencies = [ 2338 | "anyhow", 2339 | "cc", 2340 | "cfg-if", 2341 | "rustix", 2342 | "wasmtime-asm-macros 17.0.0", 2343 | "wasmtime-versioned-export-macros 17.0.0", 2344 | "windows-sys 0.52.0", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "wasmtime-jit" 2349 | version = "16.0.0" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb" 2352 | dependencies = [ 2353 | "addr2line", 2354 | "anyhow", 2355 | "bincode", 2356 | "cfg-if", 2357 | "cpp_demangle", 2358 | "gimli", 2359 | "ittapi", 2360 | "log", 2361 | "object", 2362 | "rustc-demangle", 2363 | "rustix", 2364 | "serde", 2365 | "serde_derive", 2366 | "target-lexicon", 2367 | "wasmtime-environ 16.0.0", 2368 | "wasmtime-jit-debug 16.0.0", 2369 | "wasmtime-jit-icache-coherence 16.0.0", 2370 | "wasmtime-runtime 16.0.0", 2371 | "windows-sys 0.48.0", 2372 | ] 2373 | 2374 | [[package]] 2375 | name = "wasmtime-jit" 2376 | version = "17.0.0" 2377 | source = "registry+https://github.com/rust-lang/crates.io-index" 2378 | checksum = "9b3e48395ac672b386ed588d97a9612aa13a345008f26466f0dfb2a91628aa9f" 2379 | dependencies = [ 2380 | "addr2line", 2381 | "anyhow", 2382 | "bincode", 2383 | "cfg-if", 2384 | "cpp_demangle", 2385 | "gimli", 2386 | "ittapi", 2387 | "log", 2388 | "object", 2389 | "rustc-demangle", 2390 | "rustix", 2391 | "serde", 2392 | "serde_derive", 2393 | "target-lexicon", 2394 | "wasmtime-environ 17.0.0", 2395 | "wasmtime-jit-debug 17.0.0", 2396 | "wasmtime-jit-icache-coherence 17.0.0", 2397 | "wasmtime-runtime 17.0.0", 2398 | "windows-sys 0.52.0", 2399 | ] 2400 | 2401 | [[package]] 2402 | name = "wasmtime-jit-debug" 2403 | version = "16.0.0" 2404 | source = "registry+https://github.com/rust-lang/crates.io-index" 2405 | checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f" 2406 | dependencies = [ 2407 | "object", 2408 | "once_cell", 2409 | "rustix", 2410 | "wasmtime-versioned-export-macros 16.0.0", 2411 | ] 2412 | 2413 | [[package]] 2414 | name = "wasmtime-jit-debug" 2415 | version = "17.0.0" 2416 | source = "registry+https://github.com/rust-lang/crates.io-index" 2417 | checksum = "dd21fd0f5ca68681d3d5b636eea00f182d0f9d764144469e9257fd7e3f55ae0e" 2418 | dependencies = [ 2419 | "object", 2420 | "once_cell", 2421 | "rustix", 2422 | "wasmtime-versioned-export-macros 17.0.0", 2423 | ] 2424 | 2425 | [[package]] 2426 | name = "wasmtime-jit-icache-coherence" 2427 | version = "16.0.0" 2428 | source = "registry+https://github.com/rust-lang/crates.io-index" 2429 | checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a" 2430 | dependencies = [ 2431 | "cfg-if", 2432 | "libc", 2433 | "windows-sys 0.48.0", 2434 | ] 2435 | 2436 | [[package]] 2437 | name = "wasmtime-jit-icache-coherence" 2438 | version = "17.0.0" 2439 | source = "registry+https://github.com/rust-lang/crates.io-index" 2440 | checksum = "bdc26415bb89e9ccd3bdc498fef63aabf665c4c0dd710c107691deb9694955da" 2441 | dependencies = [ 2442 | "cfg-if", 2443 | "libc", 2444 | "windows-sys 0.52.0", 2445 | ] 2446 | 2447 | [[package]] 2448 | name = "wasmtime-runtime" 2449 | version = "16.0.0" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92" 2452 | dependencies = [ 2453 | "anyhow", 2454 | "cc", 2455 | "cfg-if", 2456 | "encoding_rs", 2457 | "indexmap 2.2.1", 2458 | "libc", 2459 | "log", 2460 | "mach", 2461 | "memfd", 2462 | "memoffset", 2463 | "paste", 2464 | "psm", 2465 | "rustix", 2466 | "sptr", 2467 | "wasm-encoder 0.38.1", 2468 | "wasmtime-asm-macros 16.0.0", 2469 | "wasmtime-environ 16.0.0", 2470 | "wasmtime-fiber 16.0.0", 2471 | "wasmtime-jit-debug 16.0.0", 2472 | "wasmtime-versioned-export-macros 16.0.0", 2473 | "wasmtime-wmemcheck 16.0.0", 2474 | "windows-sys 0.48.0", 2475 | ] 2476 | 2477 | [[package]] 2478 | name = "wasmtime-runtime" 2479 | version = "17.0.0" 2480 | source = "registry+https://github.com/rust-lang/crates.io-index" 2481 | checksum = "0abddaf17912aabaf39be0802d5eba9a002e956e902d1ebd438a2fe1c88769a2" 2482 | dependencies = [ 2483 | "anyhow", 2484 | "cc", 2485 | "cfg-if", 2486 | "indexmap 2.2.1", 2487 | "libc", 2488 | "log", 2489 | "mach", 2490 | "memfd", 2491 | "memoffset", 2492 | "paste", 2493 | "psm", 2494 | "rustix", 2495 | "sptr", 2496 | "wasm-encoder 0.38.1", 2497 | "wasmtime-asm-macros 17.0.0", 2498 | "wasmtime-environ 17.0.0", 2499 | "wasmtime-fiber 17.0.0", 2500 | "wasmtime-jit-debug 17.0.0", 2501 | "wasmtime-versioned-export-macros 17.0.0", 2502 | "wasmtime-wmemcheck 17.0.0", 2503 | "windows-sys 0.52.0", 2504 | ] 2505 | 2506 | [[package]] 2507 | name = "wasmtime-types" 2508 | version = "16.0.0" 2509 | source = "registry+https://github.com/rust-lang/crates.io-index" 2510 | checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1" 2511 | dependencies = [ 2512 | "cranelift-entity 0.103.0", 2513 | "serde", 2514 | "serde_derive", 2515 | "thiserror", 2516 | "wasmparser 0.118.1", 2517 | ] 2518 | 2519 | [[package]] 2520 | name = "wasmtime-types" 2521 | version = "17.0.0" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "b35a95cdc1433729085beab42c0a5c742b431f25b17c40d7718e46df63d5ffc7" 2524 | dependencies = [ 2525 | "cranelift-entity 0.104.0", 2526 | "serde", 2527 | "serde_derive", 2528 | "thiserror", 2529 | "wasmparser 0.118.1", 2530 | ] 2531 | 2532 | [[package]] 2533 | name = "wasmtime-versioned-export-macros" 2534 | version = "16.0.0" 2535 | source = "registry+https://github.com/rust-lang/crates.io-index" 2536 | checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db" 2537 | dependencies = [ 2538 | "proc-macro2", 2539 | "quote", 2540 | "syn 2.0.48", 2541 | ] 2542 | 2543 | [[package]] 2544 | name = "wasmtime-versioned-export-macros" 2545 | version = "17.0.0" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "fad322733fe67e45743784d8b1df452bcb54f581572a4f1a646a4332deecbcc2" 2548 | dependencies = [ 2549 | "proc-macro2", 2550 | "quote", 2551 | "syn 2.0.48", 2552 | ] 2553 | 2554 | [[package]] 2555 | name = "wasmtime-wasi" 2556 | version = "16.0.0" 2557 | source = "registry+https://github.com/rust-lang/crates.io-index" 2558 | checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130" 2559 | dependencies = [ 2560 | "anyhow", 2561 | "async-trait", 2562 | "bitflags 2.4.2", 2563 | "bytes", 2564 | "cap-fs-ext", 2565 | "cap-net-ext", 2566 | "cap-rand", 2567 | "cap-std", 2568 | "cap-time-ext", 2569 | "fs-set-times", 2570 | "futures", 2571 | "io-extras", 2572 | "io-lifetimes", 2573 | "libc", 2574 | "log", 2575 | "once_cell", 2576 | "rustix", 2577 | "system-interface", 2578 | "thiserror", 2579 | "tokio", 2580 | "tracing", 2581 | "url", 2582 | "wasi-cap-std-sync", 2583 | "wasi-common", 2584 | "wasmtime 16.0.0", 2585 | "wiggle", 2586 | "windows-sys 0.48.0", 2587 | ] 2588 | 2589 | [[package]] 2590 | name = "wasmtime-winch" 2591 | version = "16.0.0" 2592 | source = "registry+https://github.com/rust-lang/crates.io-index" 2593 | checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a" 2594 | dependencies = [ 2595 | "anyhow", 2596 | "cranelift-codegen 0.103.0", 2597 | "gimli", 2598 | "object", 2599 | "target-lexicon", 2600 | "wasmparser 0.118.1", 2601 | "wasmtime-cranelift-shared 16.0.0", 2602 | "wasmtime-environ 16.0.0", 2603 | "winch-codegen", 2604 | ] 2605 | 2606 | [[package]] 2607 | name = "wasmtime-wit-bindgen" 2608 | version = "16.0.0" 2609 | source = "registry+https://github.com/rust-lang/crates.io-index" 2610 | checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b" 2611 | dependencies = [ 2612 | "anyhow", 2613 | "heck 0.4.1", 2614 | "indexmap 2.2.1", 2615 | "wit-parser", 2616 | ] 2617 | 2618 | [[package]] 2619 | name = "wasmtime-wit-bindgen" 2620 | version = "17.0.0" 2621 | source = "registry+https://github.com/rust-lang/crates.io-index" 2622 | checksum = "41e5675998fdc74495afdd90ad2bd221206a258075b23048af0535a969b07893" 2623 | dependencies = [ 2624 | "anyhow", 2625 | "heck 0.4.1", 2626 | "indexmap 2.2.1", 2627 | "wit-parser", 2628 | ] 2629 | 2630 | [[package]] 2631 | name = "wasmtime-wmemcheck" 2632 | version = "16.0.0" 2633 | source = "registry+https://github.com/rust-lang/crates.io-index" 2634 | checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2" 2635 | 2636 | [[package]] 2637 | name = "wasmtime-wmemcheck" 2638 | version = "17.0.0" 2639 | source = "registry+https://github.com/rust-lang/crates.io-index" 2640 | checksum = "b20a19e10d8cb50b45412fb21192982b7ce85c0122dc33bb71f1813e25dc6e52" 2641 | 2642 | [[package]] 2643 | name = "wast" 2644 | version = "35.0.2" 2645 | source = "registry+https://github.com/rust-lang/crates.io-index" 2646 | checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" 2647 | dependencies = [ 2648 | "leb128", 2649 | ] 2650 | 2651 | [[package]] 2652 | name = "wast" 2653 | version = "70.0.1" 2654 | source = "registry+https://github.com/rust-lang/crates.io-index" 2655 | checksum = "f5d415036fe747a32b30c76c8bd6c73f69b7705fb7ebca5f16e852eef0c95802" 2656 | dependencies = [ 2657 | "leb128", 2658 | "memchr", 2659 | "unicode-width", 2660 | "wasm-encoder 0.40.0", 2661 | ] 2662 | 2663 | [[package]] 2664 | name = "wat" 2665 | version = "1.0.84" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "8241f34599d413d2243a21015ab43aef68bfb32a0e447c54eef8d423525ca15e" 2668 | dependencies = [ 2669 | "wast 70.0.1", 2670 | ] 2671 | 2672 | [[package]] 2673 | name = "wiggle" 2674 | version = "16.0.0" 2675 | source = "registry+https://github.com/rust-lang/crates.io-index" 2676 | checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697" 2677 | dependencies = [ 2678 | "anyhow", 2679 | "async-trait", 2680 | "bitflags 2.4.2", 2681 | "thiserror", 2682 | "tracing", 2683 | "wasmtime 16.0.0", 2684 | "wiggle-macro", 2685 | ] 2686 | 2687 | [[package]] 2688 | name = "wiggle-generate" 2689 | version = "16.0.0" 2690 | source = "registry+https://github.com/rust-lang/crates.io-index" 2691 | checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd" 2692 | dependencies = [ 2693 | "anyhow", 2694 | "heck 0.4.1", 2695 | "proc-macro2", 2696 | "quote", 2697 | "shellexpand", 2698 | "syn 2.0.48", 2699 | "witx", 2700 | ] 2701 | 2702 | [[package]] 2703 | name = "wiggle-macro" 2704 | version = "16.0.0" 2705 | source = "registry+https://github.com/rust-lang/crates.io-index" 2706 | checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b" 2707 | dependencies = [ 2708 | "proc-macro2", 2709 | "quote", 2710 | "syn 2.0.48", 2711 | "wiggle-generate", 2712 | ] 2713 | 2714 | [[package]] 2715 | name = "winapi" 2716 | version = "0.3.9" 2717 | source = "registry+https://github.com/rust-lang/crates.io-index" 2718 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2719 | dependencies = [ 2720 | "winapi-i686-pc-windows-gnu", 2721 | "winapi-x86_64-pc-windows-gnu", 2722 | ] 2723 | 2724 | [[package]] 2725 | name = "winapi-i686-pc-windows-gnu" 2726 | version = "0.4.0" 2727 | source = "registry+https://github.com/rust-lang/crates.io-index" 2728 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2729 | 2730 | [[package]] 2731 | name = "winapi-util" 2732 | version = "0.1.9" 2733 | source = "registry+https://github.com/rust-lang/crates.io-index" 2734 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 2735 | dependencies = [ 2736 | "windows-sys 0.52.0", 2737 | ] 2738 | 2739 | [[package]] 2740 | name = "winapi-x86_64-pc-windows-gnu" 2741 | version = "0.4.0" 2742 | source = "registry+https://github.com/rust-lang/crates.io-index" 2743 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2744 | 2745 | [[package]] 2746 | name = "winch-codegen" 2747 | version = "0.14.0" 2748 | source = "registry+https://github.com/rust-lang/crates.io-index" 2749 | checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec" 2750 | dependencies = [ 2751 | "anyhow", 2752 | "cranelift-codegen 0.103.0", 2753 | "gimli", 2754 | "regalloc2", 2755 | "smallvec", 2756 | "target-lexicon", 2757 | "wasmparser 0.118.1", 2758 | "wasmtime-environ 16.0.0", 2759 | ] 2760 | 2761 | [[package]] 2762 | name = "windows-core" 2763 | version = "0.52.0" 2764 | source = "registry+https://github.com/rust-lang/crates.io-index" 2765 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2766 | dependencies = [ 2767 | "windows-targets 0.52.0", 2768 | ] 2769 | 2770 | [[package]] 2771 | name = "windows-sys" 2772 | version = "0.48.0" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2775 | dependencies = [ 2776 | "windows-targets 0.48.5", 2777 | ] 2778 | 2779 | [[package]] 2780 | name = "windows-sys" 2781 | version = "0.52.0" 2782 | source = "registry+https://github.com/rust-lang/crates.io-index" 2783 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2784 | dependencies = [ 2785 | "windows-targets 0.52.0", 2786 | ] 2787 | 2788 | [[package]] 2789 | name = "windows-targets" 2790 | version = "0.48.5" 2791 | source = "registry+https://github.com/rust-lang/crates.io-index" 2792 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2793 | dependencies = [ 2794 | "windows_aarch64_gnullvm 0.48.5", 2795 | "windows_aarch64_msvc 0.48.5", 2796 | "windows_i686_gnu 0.48.5", 2797 | "windows_i686_msvc 0.48.5", 2798 | "windows_x86_64_gnu 0.48.5", 2799 | "windows_x86_64_gnullvm 0.48.5", 2800 | "windows_x86_64_msvc 0.48.5", 2801 | ] 2802 | 2803 | [[package]] 2804 | name = "windows-targets" 2805 | version = "0.52.0" 2806 | source = "registry+https://github.com/rust-lang/crates.io-index" 2807 | checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" 2808 | dependencies = [ 2809 | "windows_aarch64_gnullvm 0.52.0", 2810 | "windows_aarch64_msvc 0.52.0", 2811 | "windows_i686_gnu 0.52.0", 2812 | "windows_i686_msvc 0.52.0", 2813 | "windows_x86_64_gnu 0.52.0", 2814 | "windows_x86_64_gnullvm 0.52.0", 2815 | "windows_x86_64_msvc 0.52.0", 2816 | ] 2817 | 2818 | [[package]] 2819 | name = "windows_aarch64_gnullvm" 2820 | version = "0.48.5" 2821 | source = "registry+https://github.com/rust-lang/crates.io-index" 2822 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2823 | 2824 | [[package]] 2825 | name = "windows_aarch64_gnullvm" 2826 | version = "0.52.0" 2827 | source = "registry+https://github.com/rust-lang/crates.io-index" 2828 | checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" 2829 | 2830 | [[package]] 2831 | name = "windows_aarch64_msvc" 2832 | version = "0.48.5" 2833 | source = "registry+https://github.com/rust-lang/crates.io-index" 2834 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2835 | 2836 | [[package]] 2837 | name = "windows_aarch64_msvc" 2838 | version = "0.52.0" 2839 | source = "registry+https://github.com/rust-lang/crates.io-index" 2840 | checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" 2841 | 2842 | [[package]] 2843 | name = "windows_i686_gnu" 2844 | version = "0.48.5" 2845 | source = "registry+https://github.com/rust-lang/crates.io-index" 2846 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2847 | 2848 | [[package]] 2849 | name = "windows_i686_gnu" 2850 | version = "0.52.0" 2851 | source = "registry+https://github.com/rust-lang/crates.io-index" 2852 | checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" 2853 | 2854 | [[package]] 2855 | name = "windows_i686_msvc" 2856 | version = "0.48.5" 2857 | source = "registry+https://github.com/rust-lang/crates.io-index" 2858 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2859 | 2860 | [[package]] 2861 | name = "windows_i686_msvc" 2862 | version = "0.52.0" 2863 | source = "registry+https://github.com/rust-lang/crates.io-index" 2864 | checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" 2865 | 2866 | [[package]] 2867 | name = "windows_x86_64_gnu" 2868 | version = "0.48.5" 2869 | source = "registry+https://github.com/rust-lang/crates.io-index" 2870 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2871 | 2872 | [[package]] 2873 | name = "windows_x86_64_gnu" 2874 | version = "0.52.0" 2875 | source = "registry+https://github.com/rust-lang/crates.io-index" 2876 | checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" 2877 | 2878 | [[package]] 2879 | name = "windows_x86_64_gnullvm" 2880 | version = "0.48.5" 2881 | source = "registry+https://github.com/rust-lang/crates.io-index" 2882 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2883 | 2884 | [[package]] 2885 | name = "windows_x86_64_gnullvm" 2886 | version = "0.52.0" 2887 | source = "registry+https://github.com/rust-lang/crates.io-index" 2888 | checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" 2889 | 2890 | [[package]] 2891 | name = "windows_x86_64_msvc" 2892 | version = "0.48.5" 2893 | source = "registry+https://github.com/rust-lang/crates.io-index" 2894 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2895 | 2896 | [[package]] 2897 | name = "windows_x86_64_msvc" 2898 | version = "0.52.0" 2899 | source = "registry+https://github.com/rust-lang/crates.io-index" 2900 | checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" 2901 | 2902 | [[package]] 2903 | name = "winx" 2904 | version = "0.36.3" 2905 | source = "registry+https://github.com/rust-lang/crates.io-index" 2906 | checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" 2907 | dependencies = [ 2908 | "bitflags 2.4.2", 2909 | "windows-sys 0.52.0", 2910 | ] 2911 | 2912 | [[package]] 2913 | name = "wit-parser" 2914 | version = "0.13.1" 2915 | source = "registry+https://github.com/rust-lang/crates.io-index" 2916 | checksum = "df4913a2219096373fd6512adead1fb77ecdaa59d7fc517972a7d30b12f625be" 2917 | dependencies = [ 2918 | "anyhow", 2919 | "id-arena", 2920 | "indexmap 2.2.1", 2921 | "log", 2922 | "semver", 2923 | "serde", 2924 | "serde_derive", 2925 | "serde_json", 2926 | "unicode-xid", 2927 | ] 2928 | 2929 | [[package]] 2930 | name = "witx" 2931 | version = "0.9.1" 2932 | source = "registry+https://github.com/rust-lang/crates.io-index" 2933 | checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" 2934 | dependencies = [ 2935 | "anyhow", 2936 | "log", 2937 | "thiserror", 2938 | "wast 35.0.2", 2939 | ] 2940 | 2941 | [[package]] 2942 | name = "wizer" 2943 | version = "4.0.0" 2944 | source = "registry+https://github.com/rust-lang/crates.io-index" 2945 | checksum = "31f1f0143257faa028962616998d9bcf456f2b92b41d923fb630d0c62250f1fc" 2946 | dependencies = [ 2947 | "anyhow", 2948 | "cap-std", 2949 | "log", 2950 | "rayon", 2951 | "wasi-cap-std-sync", 2952 | "wasm-encoder 0.30.0", 2953 | "wasmparser 0.106.0", 2954 | "wasmtime 16.0.0", 2955 | "wasmtime-wasi", 2956 | ] 2957 | 2958 | [[package]] 2959 | name = "zerocopy" 2960 | version = "0.7.32" 2961 | source = "registry+https://github.com/rust-lang/crates.io-index" 2962 | checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" 2963 | dependencies = [ 2964 | "zerocopy-derive", 2965 | ] 2966 | 2967 | [[package]] 2968 | name = "zerocopy-derive" 2969 | version = "0.7.32" 2970 | source = "registry+https://github.com/rust-lang/crates.io-index" 2971 | checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" 2972 | dependencies = [ 2973 | "proc-macro2", 2974 | "quote", 2975 | "syn 2.0.48", 2976 | ] 2977 | 2978 | [[package]] 2979 | name = "zstd" 2980 | version = "0.11.2+zstd.1.5.2" 2981 | source = "registry+https://github.com/rust-lang/crates.io-index" 2982 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 2983 | dependencies = [ 2984 | "zstd-safe", 2985 | ] 2986 | 2987 | [[package]] 2988 | name = "zstd-safe" 2989 | version = "5.0.2+zstd.1.5.2" 2990 | source = "registry+https://github.com/rust-lang/crates.io-index" 2991 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 2992 | dependencies = [ 2993 | "libc", 2994 | "zstd-sys", 2995 | ] 2996 | 2997 | [[package]] 2998 | name = "zstd-sys" 2999 | version = "2.0.9+zstd.1.5.5" 3000 | source = "registry+https://github.com/rust-lang/crates.io-index" 3001 | checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" 3002 | dependencies = [ 3003 | "cc", 3004 | "pkg-config", 3005 | ] 3006 | -------------------------------------------------------------------------------- /box/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "box" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | anyhow = "1.0.40" 10 | #marcotte = "0.0.1" 11 | marcotte = { path = "../../marcotte-wasm" } 12 | dockerfile-parser = "0.8.0" 13 | wasm-encoder = "0.38.1" 14 | wasmparser = "0.106.0" 15 | wizer = "4.0.0" 16 | wasmtime = "17.0.0" 17 | wasmtime-wasi = "16.0.0" # pinned at 16 bc of trans dep on wasi-common for wizer 18 | structopt = "0.3.26" 19 | clap = "2.33" 20 | walkdir = "2.3" 21 | -------------------------------------------------------------------------------- /box/README.md: -------------------------------------------------------------------------------- 1 | # Recognized Dockerfile Directives 2 | 3 | 1. **FROM** 4 | - Initializes a new build stage and sets the base layer. 5 | - See [Marcotte](https://github.com/dphilla/marcotte) for more info 6 | 7 | 2. **RUN** 8 | - Executes commands in a new layer on top of the current layer and commits the results. 9 | - Forms: 10 | - Shell form: `RUN ` 11 | - Exec form: `RUN ["executable", "param1", "param2"]` 12 | 13 | 3. **CMD** 14 | - Provides defaults for an executing box. Only one CMD instruction in a Dockerfile. 15 | - Forms: 16 | - Shell form: `CMD ` 17 | - Exec form: `CMD ["executable", "param1", "param2"]` 18 | 19 | 4. **LABEL** 20 | - Adds metadata to a layer as key-value pairs. 21 | - Syntax: `LABEL = ...` 22 | 23 | 5. **EXPOSE** 24 | - Informs Boxer that the box listens on specified network ports at runtime. 25 | - Syntax: `EXPOSE [/...]` 26 | - for default (os) builds only, future: component-based/modularized emulation 27 | 28 | 6. **ENV** 29 | - Sets environment variables. 30 | - Syntax: `ENV = ...` 31 | 32 | 7. **ADD** 33 | - Copies new files, directories, or remote file URLs and adds them to the layer's filesystem. 34 | - Syntax: `ADD ... ` 35 | 36 | 8. **COPY** 37 | - Copies new files or directories and adds them to the filesystem of the box. 38 | - Syntax: `COPY ... ` 39 | - Flags: 40 | - `--chown=:`: Set the user and group ownership of the copied files. 41 | 42 | 9. **ENTRYPOINT** 43 | - Configures a box that will run as an executable. 44 | - Forms: 45 | - Shell form: `ENTRYPOINT ` 46 | - Exec form: `ENTRYPOINT ["executable", "param1", "param2"]` 47 | 48 | 10. **VOLUME** 49 | - Creates a mount point with the specified name. 50 | - Syntax: `VOLUME [""]` 51 | 52 | 11. **USER** 53 | - Sets the username or UID for running the layer and following `RUN`, `CMD`, and `ENTRYPOINT` instructions. 54 | - Syntax: `USER [:]` 55 | 56 | 12. **WORKDIR** 57 | - Sets the working directory for `RUN`, `CMD`, `ENTRYPOINT`, `COPY`, and `ADD` instructions. 58 | - Syntax: `WORKDIR ` 59 | 60 | 13. **ARG** 61 | - Defines a variable that users can pass at build-time to the builder. 62 | - Syntax: `ARG [=]` 63 | 64 | 14. **ONBUILD** 65 | - Adds a trigger instruction to be executed when the layer is used as the base for another build. 66 | - Syntax: `ONBUILD ` 67 | 68 | 15. **STOPSIGNAL** 69 | - Sets the system call signal that will be sent to the box to exit. 70 | - Syntax: `STOPSIGNAL ` 71 | 72 | 16. **HEALTHCHECK** 73 | - Tells Boxer how to test a box to check that it is still working. 74 | - Syntax: `HEALTHCHECK [OPTIONS] CMD ` 75 | - Options: 76 | - `--interval=`: Time between running the check. 77 | - `--timeout=`: Time to wait before considering the check to have hung. 78 | - `--start-period=`: Time to wait before starting checks. 79 | - `--retries=`: Consecutive failures needed to consider a box as unhealthy. 80 | 81 | 17. **SHELL** 82 | - Allows the default shell used for the shell form of commands to be overridden. 83 | - Syntax: `SHELL ["executable", "parameters"]` 84 | -------------------------------------------------------------------------------- /box/src/builder/builder.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | use std::io::{self, Read}; 3 | use std::path::PathBuf; 4 | use std::collections::HashMap; 5 | 6 | use wasmtime::{Engine, Module, Store, Linker, Memory}; 7 | 8 | /// This must match the struct on the Wasm side in `system.rs`: 9 | /// ``` 10 | /// #[repr(C)] 11 | /// pub struct FileDef { 12 | /// pub dest_path: *const i8, 13 | /// pub data_ptr: *const u8, 14 | /// pub data_len: u32, 15 | /// } 16 | /// ``` 17 | #[repr(C)] 18 | pub struct FileDef { 19 | pub path_off: u32, 20 | pub data_off: u32, 21 | pub data_len: u32, 22 | } 23 | 24 | pub struct Builder { 25 | pub base_build: Vec, 26 | pub working_directory: PathBuf, 27 | pub copied_files: Vec<(String, Vec)>, // (dest_path, file_data) 28 | } 29 | 30 | impl Builder { 31 | pub fn new() -> Self { 32 | Self { 33 | base_build: Vec::new(), 34 | working_directory: PathBuf::from("/"), 35 | copied_files: Vec::new(), 36 | } 37 | } 38 | 39 | pub fn config_base(&mut self, base: &str) { 40 | match base { 41 | "scratch" => { 42 | println!("Scratch Build Started..."); 43 | match fs::read("output_wizered.wasm") { 44 | Ok(bytes) => { 45 | self.base_build = bytes; 46 | } 47 | Err(e) => { 48 | println!("No 'output_wizered.wasm' found, or error reading file: {:?}", e); 49 | println!("Falling back to empty scratch environment..."); 50 | self.base_build = Vec::new(); 51 | } 52 | } 53 | }, 54 | _ => { 55 | println!("Base '{}' not recognized. Doing nothing.", base); 56 | } 57 | } 58 | } 59 | 60 | pub fn bundle_fs_from_buffer(&mut self, buffer: HashMap>) { 61 | println!("Bundling files into the Wasm virtual filesystem..."); 62 | for (path, content) in buffer { 63 | println!("COPY -> path: {}", path); 64 | self.copied_files.push((path, content)); 65 | } 66 | } 67 | 68 | /// The final ephemeral run that: 69 | /// - calls `wasm_vfs_mount_in_memory` 70 | /// - Assigns stuff to Proc from like ENV, etc 71 | /// - Snapshots module 72 | /// 73 | pub fn build(&mut self, _wasm_only: bool) { 74 | if self.base_build.is_empty() { 75 | println!("No base .wasm to finalize. Possibly scratch environment is empty."); 76 | return; 77 | } 78 | if self.copied_files.is_empty() { 79 | println!("No files to copy; skipping mount_in_memory step."); 80 | return; 81 | } 82 | 83 | // 1) Create an Engine & compile the Wasm 84 | let engine = Engine::default(); 85 | let module = match Module::new(&engine, &self.base_build) { 86 | Ok(m) => m, 87 | Err(e) => { 88 | eprintln!("Error compiling base_build: {:?}", e); 89 | return; 90 | } 91 | }; 92 | 93 | // 2) Create a Linker & Store. If your module needs imports, define them here: 94 | let mut linker = Linker::new(&engine); 95 | let mut store = Store::new(&engine, ()); 96 | 97 | // 3) Instantiate 98 | let instance = match linker.instantiate(&mut store, &module) { 99 | Ok(i) => i, 100 | Err(e) => { 101 | eprintln!("Error instantiating module: {:?}", e); 102 | return; 103 | } 104 | }; 105 | 106 | // 4) Get the exported memory 107 | let memory = match instance.get_memory(&mut store, "memory") { 108 | Some(mem) => mem, 109 | None => { 110 | eprintln!("No exported memory named 'memory'."); 111 | return; 112 | } 113 | }; 114 | 115 | // 5) We'll place each file in guest memory + build an array of FileDef 116 | let size_of_fd = std::mem::size_of::(); 117 | if size_of_fd != 12 { 118 | eprintln!("Warning: FileDef is not 12 bytes? Adjust if needed."); 119 | } 120 | 121 | let count = self.copied_files.len(); 122 | let total_filedef_bytes = count * size_of_fd; 123 | 124 | // We'll pick an offset for these arrays 125 | let mut guest_cursor = 0x10000; // e.g. 64k 126 | let filedef_array_base = guest_cursor; 127 | guest_cursor += total_filedef_bytes; 128 | 129 | // Helper for copying data into memory 130 | let mut copy_to_guest = |host_data: &[u8], offset: usize| { 131 | if let Err(e) = memory.write(&mut store, offset, host_data) { 132 | eprintln!("Failed to write to guest memory: {:?}", e); 133 | } 134 | }; 135 | 136 | // Build the host side buffer that holds all FileDef structs 137 | let mut filedef_structs = vec![0u8; total_filedef_bytes]; 138 | 139 | let mut idx = 0; 140 | for (dest_path, data) in &self.copied_files { 141 | // convert path to null-terminated 142 | let mut path_bytes = dest_path.as_bytes().to_vec(); 143 | path_bytes.push(0); 144 | 145 | // copy path into guest memory 146 | let path_offset = guest_cursor; 147 | copy_to_guest(&path_bytes, path_offset); 148 | guest_cursor += path_bytes.len(); 149 | 150 | // copy data 151 | let data_offset = guest_cursor; 152 | copy_to_guest(data, data_offset); 153 | guest_cursor += data.len(); 154 | 155 | // fill in fields for FileDef 156 | // offset into filedef_structs: 157 | let base = idx * size_of_fd; 158 | idx += 1; 159 | 160 | // path_off 161 | filedef_structs[base..base+4].copy_from_slice(&(path_offset as u32).to_le_bytes()); 162 | // data_off 163 | filedef_structs[base+4..base+8].copy_from_slice(&(data_offset as u32).to_le_bytes()); 164 | // data_len 165 | filedef_structs[base+8..base+12].copy_from_slice(&(data.len() as u32).to_le_bytes()); 166 | } 167 | 168 | // copy FileDef array to guest 169 | copy_to_guest(&filedef_structs, filedef_array_base); 170 | 171 | // 6) call wasm_vfs_mount_in_memory(count, array_ptr) 172 | let mount_func = match instance.get_func(&mut store, "wasm_vfs_mount_in_memory") { 173 | Some(f) => f, 174 | None => { 175 | eprintln!("No export named wasm_vfs_mount_in_memory"); 176 | return; 177 | } 178 | }; 179 | 180 | let typed_mount = match mount_func.typed::<(u32, u32), i32>(&store) { 181 | Ok(tf) => tf, 182 | Err(e) => { 183 | eprintln!("Signature mismatch for wasm_vfs_mount_in_memory: {:?}", e); 184 | return; 185 | } 186 | }; 187 | 188 | let count_u32 = self.copied_files.len() as u32; 189 | let ptr = filedef_array_base as u32; 190 | 191 | match typed_mount.call(&mut store, (count_u32, ptr)) { 192 | Ok(retval) => { 193 | println!("wasm_vfs_mount_in_memory returned: {}", retval); 194 | } 195 | Err(e) => { 196 | eprintln!("Error calling mount_in_memory: {:?}", e); 197 | } 198 | } 199 | 200 | println!("Ephemeral run done; the in-memory FS has your copied files."); 201 | } 202 | } 203 | 204 | -------------------------------------------------------------------------------- /box/src/builder/packer.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use std::path::PathBuf; 3 | 4 | pub fn pack(wasm_bytes: &[u8], _map_dirs: Vec<(PathBuf, PathBuf)>) -> Result> { 5 | // Check if `_initialize` is present as an exported function 6 | let has_initialize = is_wasi_reactor(wasm_bytes); 7 | 8 | // If `_initialize` is present, copy it as `_start`. 9 | let output_bytes = if has_initialize { 10 | copy_export_entry(wasm_bytes, "_initialize", "_start")? 11 | } else { 12 | wasm_bytes.to_vec() 13 | }; 14 | 15 | Ok(output_bytes) 16 | } 17 | 18 | fn is_wasi_reactor(bytes: &[u8]) -> bool { 19 | let parser = wasmparser::Parser::new(0); 20 | for payload in parser.parse_all(bytes) { 21 | let payload = match payload { 22 | Ok(payload) => payload, 23 | Err(_) => continue, 24 | }; 25 | match payload { 26 | wasmparser::Payload::ExportSection(export) => { 27 | for entry in export { 28 | let entry = match entry { 29 | Ok(entry) => entry, 30 | Err(_) => continue, 31 | }; 32 | if entry.name == "_initialize" { 33 | return true; 34 | } 35 | } 36 | return false; 37 | } 38 | wasmparser::Payload::End(_) => return false, 39 | _ => continue, 40 | } 41 | } 42 | false 43 | } 44 | 45 | fn copy_export_entry(bytes: &[u8], source: &str, dest: &str) -> Result> { 46 | let mut module = wasm_encoder::Module::new(); 47 | let parser = wasmparser::Parser::new(0); 48 | 49 | for payload in parser.parse_all(bytes) { 50 | let payload = payload?; 51 | match payload { 52 | wasmparser::Payload::Version { .. } => { 53 | // wasm_encoder::Module will handle this automatically 54 | continue; 55 | } 56 | wasmparser::Payload::ExportSection(export) => { 57 | let mut section = wasm_encoder::ExportSection::new(); 58 | for entry in export { 59 | let entry = entry?; 60 | section.export(entry.name, translate::export_kind(entry.kind), entry.index); 61 | if entry.name == source { 62 | // Duplicate the source export under the new name 63 | section.export(dest, translate::export_kind(entry.kind), entry.index); 64 | } 65 | } 66 | module.section(§ion); 67 | } 68 | wasmparser::Payload::End(_) => { 69 | // End of module - handled automatically by wasm_encoder 70 | continue; 71 | } 72 | _ => { 73 | // For all other sections, just copy them through 74 | if let Some((id, range)) = payload.as_section() { 75 | let raw = wasm_encoder::RawSection { 76 | id, 77 | data: &bytes[range.start..range.end], 78 | }; 79 | module.section(&raw); 80 | } 81 | } 82 | } 83 | } 84 | 85 | Ok(module.finish()) 86 | } 87 | 88 | mod translate { 89 | pub(crate) fn export_kind(x: wasmparser::ExternalKind) -> wasm_encoder::ExportKind { 90 | match x { 91 | wasmparser::ExternalKind::Func => wasm_encoder::ExportKind::Func, 92 | wasmparser::ExternalKind::Table => wasm_encoder::ExportKind::Table, 93 | wasmparser::ExternalKind::Memory => wasm_encoder::ExportKind::Memory, 94 | wasmparser::ExternalKind::Global => wasm_encoder::ExportKind::Global, 95 | wasmparser::ExternalKind::Tag => wasm_encoder::ExportKind::Tag, 96 | } 97 | } 98 | } 99 | 100 | -------------------------------------------------------------------------------- /box/src/host/server/box_host.c: -------------------------------------------------------------------------------- 1 | /*TODO - for WAMR*/ 2 | 3 | -------------------------------------------------------------------------------- /box/src/host/server/box_host.rs: -------------------------------------------------------------------------------- 1 | //TODO - for wasmtime 2 | -------------------------------------------------------------------------------- /box/src/host/web/box_host.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcotte in a Worker with Blocking Syscalls 6 | 7 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 | 33 | 34 | 35 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /box/src/host/web/host_functions.js: -------------------------------------------------------------------------------- 1 | let wasmInstance = null; 2 | let memoryBuffer = null; 3 | 4 | let stdoutBuffer = ""; 5 | 6 | let websocket = null; 7 | let nextRequestId = 1; 8 | const pendingRequests = new Map(); 9 | 10 | // Listen for messages from main thread 11 | onmessage = async (evt) => { 12 | const { cmd, payload } = evt.data; 13 | 14 | switch (cmd) { 15 | case 'initWasm': 16 | await initWasm(payload.wasmUrl); 17 | postMessage({ cmd: 'wasmReady' }); 18 | break; 19 | 20 | case 'callMain': 21 | if (!wasmInstance) return; 22 | const ret = wasmInstance.exports._start ? wasmInstance.exports._start() : 0; 23 | postMessage({ cmd: 'callMainDone', returnValue: ret }); 24 | break; 25 | 26 | default: 27 | console.log("[Worker] Unknown cmd:", cmd); 28 | break; 29 | } 30 | }; 31 | 32 | function initWebSocket() { 33 | return new Promise((resolve, reject) => { 34 | websocket = new WebSocket('ws://127.0.0.1:9000'); 35 | websocket.binaryType = 'arraybuffer'; 36 | 37 | websocket.onopen = () => { 38 | console.log('[Worker] WebSocket connected'); 39 | resolve(); 40 | }; 41 | 42 | websocket.onerror = (err) => { 43 | console.error('[Worker] WebSocket error:', err); 44 | reject(new Error('WebSocket connection error')); 45 | }; 46 | 47 | websocket.onmessage = (evt) => { 48 | // We assume each message is: [4 bytes requestId][... arbitrary data ...] 49 | const fullData = new Uint8Array(evt.data); 50 | if (fullData.length < 4) { 51 | console.warn('Received message too short'); 52 | return; 53 | } 54 | const view = new DataView(fullData.buffer); 55 | const reqId = view.getInt32(0, true); // little-endian 56 | const payload = fullData.subarray(4); 57 | 58 | const reqInfo = pendingRequests.get(reqId); 59 | if (!reqInfo) { 60 | console.warn('Received response for unknown request id', reqId); 61 | return; 62 | } 63 | // Store the payload in reqInfo, then do an Atomics.notify 64 | reqInfo.responseData = payload; 65 | Atomics.store(reqInfo.sab, 0, 1); 66 | Atomics.notify(reqInfo.sab, 0, 1); 67 | }; 68 | 69 | websocket.onclose = () => { 70 | console.log('[Worker] WebSocket closed'); 71 | }; 72 | }); 73 | } 74 | 75 | async function initWasm(wasmurl) { 76 | // create websocket (only if /net is needed) 77 | await initwebsocket(); 78 | 79 | const response = await fetch(wasmurl); 80 | const bytes = await response.arraybuffer(); 81 | 82 | const memory = new webassembly.memory({ initial: 256, maximum: 256 }); 83 | memorybuffer = memory.buffer; 84 | 85 | function box_host_write_stdout_line(ptr, len) { 86 | const bytes = new Uint8Array(memoryBuffer, ptr, len); 87 | const line = new TextDecoder('utf-8').decode(bytes); 88 | postMessage({ cmd: 'hostWriteStdout', text: line }); 89 | } 90 | 91 | function blockyr(reqptr, reqlen, outptr) { 92 | const requ8 = new uint8array(memorybuffer, reqptr, reqlen); 93 | const reqid = nextrequestid++; 94 | 95 | // build [reqid + request data] 96 | const header = new uint8array(4); 97 | new dataview(header.buffer).setint32(0, reqid, true); 98 | const tosend = new uint8array(4 + reqlen); 99 | tosend.set(header, 0); 100 | tosend.set(requ8, 4); 101 | 102 | const sab = new int32array(new sharedarraybuffer(4)); 103 | sab[0] = 0; // 0 => not ready 104 | pendingrequests.set(reqid, { sab, responsedata: null }); 105 | 106 | websocket.send(tosend); 107 | 108 | // "block" via atomics until the server replies 109 | while (atomics.load(sab, 0) === 0) { 110 | atomics.wait(sab, 0, 0); 111 | } 112 | 113 | const { responsedata } = pendingrequests.get(reqid); 114 | pendingrequests.delete(reqid); 115 | 116 | if (!responsedata) { 117 | new dataview(memorybuffer).setint32(outptr, 0, true); 118 | return 0; 119 | } 120 | 121 | // we have responsedata; allocate space in wasm memory 122 | const resplen = responsedata.length; 123 | const malloc = wasminstance.exports.malloc; // assumed exported by your minimal libc 124 | const respptr = malloc(resplen); 125 | 126 | const respmem = new uint8array(memorybuffer, respptr, resplen); 127 | respmem.set(responsedata); 128 | 129 | new dataview(memorybuffer).setint32(outptr, resplen, true); 130 | return respptr; 131 | } 132 | 133 | const env = { 134 | memory, 135 | box_host_write_stdout_line, 136 | r: blockyr 137 | }; 138 | 139 | const { instance } = await webassembly.instantiate(bytes, { env }); 140 | wasminstance = instance; 141 | 142 | console.log('[worker] wasm loaded & instance created.'); 143 | } 144 | 145 | -------------------------------------------------------------------------------- /box/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | use std::fs::File; 3 | use std::io::{self, BufRead}; 4 | use std::path::Path; 5 | use std::collections::HashMap; 6 | use std::io::ErrorKind; 7 | use std::process::Command; 8 | use dockerfile_parser::*; 9 | use structopt::StructOpt; 10 | 11 | mod builder { 12 | pub mod builder; 13 | pub mod packer; 14 | } 15 | 16 | use builder::builder::*; 17 | 18 | #[derive(StructOpt)] 19 | #[structopt(name = "boxer", about = "A CLI for building, running, managing (Wasm) boxes.\nMore info at https://boxer.dev")] 20 | enum BoxCli { 21 | #[structopt(name = "build")] 22 | /// Builds box from Dockerfile (-f) or OCI Image (-i) 23 | Build { 24 | #[structopt(short = "f", long = "file", parse(from_os_str))] 25 | /// Dockerfile path 26 | dockerfile_path: std::path::PathBuf, 27 | }, 28 | #[structopt(name = "run")] 29 | /// Runs a built box; if no name given, defaults to last built box 30 | Run { 31 | }, 32 | #[structopt(name = "compile")] 33 | /// Compiles user C code into a Marcotte-based Wasm artifact. 34 | Compile { 35 | /// One or more .c files you want to compile with Marcotte 36 | #[structopt(parse(from_os_str))] 37 | c_files: Vec, 38 | }, 39 | } 40 | 41 | fn main() { 42 | let opt = BoxCli::from_args(); 43 | 44 | let mut builder = Builder::new(); 45 | match opt { 46 | BoxCli::Build { dockerfile_path } => { 47 | let dockerfile_content = std::fs::read_to_string(dockerfile_path); 48 | let dockerfile = Dockerfile::parse(&dockerfile_content.unwrap()); 49 | for stage in dockerfile.expect("Error").iter_stages() { 50 | for ins in stage.instructions { 51 | match ins { 52 | Instruction::From(instr) => execute_from(&mut builder, instr.clone()), 53 | Instruction::Arg(instr) => execute_arg(instr.clone()), 54 | Instruction::Label(instr) => execute_label(instr.clone()), 55 | Instruction::Run(instr) => execute_run(instr.clone()), 56 | Instruction::Entrypoint(instr) => execute_entrypoint(instr.clone()), 57 | Instruction::Copy(instr) => execute_copy(&mut builder, instr.clone()), 58 | Instruction::Cmd(instr) => execute_cmd(instr.clone()), 59 | Instruction::Env(instr) => execute_env(instr.clone()), 60 | Instruction::Misc(instr) => execute_misc(&mut builder, instr.clone()), 61 | } 62 | } 63 | 64 | builder.build(true); 65 | } 66 | } 67 | BoxCli::Run { /* ... */ } => { 68 | 69 | }, 70 | BoxCli::Compile { c_files } => { 71 | let c_files_str: Vec = c_files 72 | .iter() 73 | .map(|p| p.to_string_lossy().to_string()) 74 | .collect(); 75 | 76 | if c_files_str.is_empty() { 77 | eprintln!("No .c files provided to compile!"); 78 | std::process::exit(1); 79 | } 80 | 81 | // 2) Call Marcotte to produce `output.wasm` (by default) 82 | if let Err(e) = marcotte::build(&c_files_str) { 83 | eprintln!("Marcotte build failed: {:?}", e); 84 | std::process::exit(1); 85 | } 86 | 87 | println!("Marcotte build succeeded; produced 'output.wasm'."); 88 | 89 | } 90 | } 91 | } 92 | 93 | fn execute_from(builder: &mut Builder, instr: FromInstruction) { 94 | builder.config_base(&instr.image.content); 95 | } 96 | 97 | fn execute_run(instr: RunInstruction) { 98 | unimplemented!( 99 | r#" 100 | handles RUN 101 | "# 102 | ) 103 | } 104 | 105 | fn execute_cmd(instr: CmdInstruction) { 106 | println!("Execution complete!"); 107 | } 108 | 109 | fn execute_label(instr: LabelInstruction) { 110 | unimplemented!( 111 | r#" 112 | handles LABEL 113 | "# 114 | ) 115 | } 116 | 117 | fn execute_env(instr: EnvInstruction) { 118 | unimplemented!( 119 | r#" 120 | handles ENV 121 | "# 122 | ) 123 | } 124 | 125 | fn execute_copy(builder: &mut Builder, instr: CopyInstruction) { 126 | use std::fs; 127 | use std::io::ErrorKind; 128 | use std::path::Path; 129 | use walkdir::WalkDir; 130 | use std::collections::HashMap; 131 | 132 | // In-memory structure to store files and their destinations 133 | let mut wasm_fs_buffer: HashMap> = HashMap::new(); 134 | 135 | for src in &instr.sources { 136 | let src_path = Path::new(src.as_ref()); 137 | let dest_path = Path::new(instr.destination.as_ref()); 138 | 139 | if !src_path.exists() { 140 | eprintln!("Error: Source path {} does not exist.", src_path.display()); 141 | continue; 142 | } 143 | 144 | if src_path.is_file() { 145 | match fs::read(src_path) { 146 | Ok(file_content) => { 147 | let dest_file_path = dest_path 148 | .join(src_path.file_name().unwrap()) 149 | .to_string_lossy() 150 | .to_string(); 151 | wasm_fs_buffer.insert(dest_file_path, file_content); 152 | } 153 | Err(e) => eprintln!("Error reading file {}: {}", src_path.display(), e), 154 | } 155 | } else if src_path.is_dir() { 156 | for entry in WalkDir::new(src_path) { 157 | match entry { 158 | Ok(entry) => { 159 | let path = entry.path(); 160 | if path.is_file() { 161 | match fs::read(path) { 162 | Ok(file_content) => { 163 | let relative_path = path.strip_prefix(src_path).unwrap(); 164 | let dest_file_path = dest_path 165 | .join(relative_path) 166 | .to_string_lossy() 167 | .to_string(); 168 | wasm_fs_buffer.insert(dest_file_path, file_content); 169 | } 170 | Err(e) => eprintln!("Error reading file {}: {}", path.display(), e), 171 | } 172 | } 173 | } 174 | Err(e) => eprintln!("Error traversing directory {}: {}", src_path.display(), e), 175 | } 176 | } 177 | } else { 178 | eprintln!("Error: Unsupported path type for {}.", src_path.display()); 179 | } 180 | } 181 | 182 | builder.bundle_fs_from_buffer(wasm_fs_buffer); 183 | } 184 | 185 | fn execute_entrypoint(instr: EntrypointInstruction) { 186 | unimplemented!( 187 | r#" 188 | handles ENTRYPOINT 189 | "# 190 | ) 191 | } 192 | 193 | fn execute_arg(instr: ArgInstruction) { 194 | unimplemented!( 195 | r#" 196 | handles ARG 197 | "# 198 | ) 199 | } 200 | 201 | fn execute_misc(builder: &mut Builder, instr: MiscInstruction) { 202 | //handles: `MAINTAINER`, `EXPOSE`, `VOLUME`, `Add` 203 | //`USER`, `WORKDIR`, `ONBUILD`, `STOPSIGNAL`, `HEALTHCHECK`, `SHELL` 204 | 205 | //println!("{:#?}", instr.arguments.components[0] - match on for content); 206 | } 207 | 208 | 209 | use wasmtime::*; 210 | use std::path::PathBuf; 211 | use anyhow::Result; 212 | 213 | fn execute_wasm_with_wasmtime(wasm_file: &str, script: &str) -> Result<()> { 214 | 215 | //let args = vec![PathBuf::from(ruby_script), PathBuf::from(ruby_script)]; 216 | //let args: Vec = args.iter().map(|arg| arg.to_string_lossy().into_owned()).collect(); 217 | //let wasi_ctx = wasmtime_wasi::WasiCtxBuilder::new().args(&args)?.build(); 218 | //let engine = Engine::default(); 219 | //let mut store = Store::new(&engine, wasi_ctx); 220 | //let module = Module::from_file(&engine, wasm_file)?; 221 | //let mut linker = Linker::new(&engine); 222 | //let instance = linker.instantiate(&mut store, &module)?; 223 | //let start = instance.get_typed_func::<(), ()>(&mut store, "_start")?; 224 | //start.call(&mut store, ())?; 225 | 226 | let command = "wasmtime"; 227 | let args = [wasm_file, "--", script]; 228 | 229 | let output = Command::new(command) 230 | .args(&args) 231 | .output()?; 232 | 233 | if output.status.success() { 234 | let stdout = String::from_utf8_lossy(&output.stdout); 235 | println!("Command output:\n{}", stdout); 236 | } else { 237 | let stderr = String::from_utf8_lossy(&output.stderr); 238 | eprintln!("Command failed:\n{}", stderr); 239 | 240 | if let Some(code) = output.status.code() { 241 | if code != 0 { 242 | return Err(io::Error::new(ErrorKind::Other, format!("Command exited with status code: {}", code)).into()); 243 | } 244 | } 245 | } 246 | 247 | Ok(()) 248 | } 249 | -------------------------------------------------------------------------------- /box/tests/tests.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | mod integration_tests { 3 | use std::process::Command; 4 | use std::fs::File; 5 | use std::io::{Write, BufReader, BufRead}; 6 | use std::path::Path; 7 | 8 | // A utility function to create a temporary Dockerfile with given content and return its path 9 | fn create_temp_dockerfile(content: &str) -> String { 10 | let path = "temp_Dockerfile"; 11 | let mut file = File::create(path).expect("Failed to create temporary Dockerfile."); 12 | writeln!(file, "{}", content).expect("Failed to write to temporary Dockerfile."); 13 | path.to_string() 14 | } 15 | 16 | // Read the output of a file 17 | fn read_file_output(path: &str) -> String { 18 | let file = File::open(path).expect("Failed to open file."); 19 | let reader = BufReader::new(file); 20 | reader.lines().collect::, _>>().expect("Failed to read lines.").join("\n") 21 | } 22 | 23 | // Test parsing valid directives 24 | #[test] 25 | fn test_valid_directives() { 26 | let dockerfile_content = "FROM ubuntu\nRUN echo 'hello world'"; 27 | let dockerfile_path = create_temp_dockerfile(dockerfile_content); 28 | let output = Command::new("cargo") 29 | .arg("run") 30 | .arg("--") 31 | .arg(&dockerfile_path) 32 | .output() 33 | .expect("Failed to execute command."); 34 | 35 | let expected_output = "FROM: ()Initializes a new build stage and sets the base layer.\nRUN: Executes commands in a new layer on top of the current layer and commits the results."; 36 | assert_eq!(String::from_utf8_lossy(&output.stdout), expected_output); 37 | } 38 | 39 | // Test parsing unrecognized directives 40 | #[test] 41 | fn test_unrecognized_directives() { 42 | let dockerfile_content = "UNKNOWN ubuntu"; 43 | let dockerfile_path = create_temp_dockerfile(dockerfile_content); 44 | let output = Command::new("cargo") 45 | .arg("run") 46 | .arg("--") 47 | .arg(&dockerfile_path) 48 | .output() 49 | .expect("Failed to execute command."); 50 | 51 | assert!(output.status.success() == false); 52 | assert!(String::from_utf8_lossy(&output.stderr).contains("Directive UNKNOWN not recognized")); 53 | } 54 | 55 | // Test handling of comments and empty lines 56 | #[test] 57 | fn test_comments_and_empty_lines() { 58 | let dockerfile_content = "# This is a comment\n\nFROM ubuntu"; 59 | let dockerfile_path = create_temp_dockerfile(dockerfile_content); 60 | let output = Command::new("cargo") 61 | .arg("run") 62 | .arg("--") 63 | .arg(&dockerfile_path) 64 | .output() 65 | .expect("Failed to execute command."); 66 | 67 | assert_eq!(String::from_utf8_lossy(&output.stdout), "FROM: ()Initializes a new build stage and sets the base layer."); 68 | } 69 | 70 | // Test behavior with no file path provided 71 | #[test] 72 | fn test_no_file_path() { 73 | let output = Command::new("cargo") 74 | .arg("run") 75 | .arg("--") 76 | .output() 77 | .expect("Failed to execute command."); 78 | 79 | assert!(output.status.success() == false); 80 | assert!(String::from_utf8_lossy(&output.stderr).contains("Usage:")); 81 | } 82 | 83 | // Test behavior with a non-existent file path 84 | #[test] 85 | fn test_non_existent_file_path() { 86 | let output = Command::new("cargo") 87 | .arg("run") 88 | .arg("--") 89 | .arg("non_existent_file") 90 | .output() 91 | .expect("Failed to execute command."); 92 | 93 | assert!(output.status.success() == false); 94 | assert!(String::from_utf8_lossy(&output.stderr).contains("No such file or directory")); 95 | } 96 | 97 | // Cleanup any created temporary files 98 | #[test] 99 | fn cleanup() { 100 | std::fs::remove_file("temp_Dockerfile").expect("Failed to remove temporary Dockerfile."); 101 | } 102 | } 103 | 104 | -------------------------------------------------------------------------------- /boxer.dev/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /boxer.dev/img/boxer-bg-dark-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/boxer-bg-dark-mobile.png -------------------------------------------------------------------------------- /boxer.dev/img/boxer-bg-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/boxer-bg-dark.png -------------------------------------------------------------------------------- /boxer.dev/img/boxer-bg-light-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/boxer-bg-light-mobile.png -------------------------------------------------------------------------------- /boxer.dev/img/boxer-bg-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/boxer-bg-light.png -------------------------------------------------------------------------------- /boxer.dev/img/boxer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/boxer.png -------------------------------------------------------------------------------- /boxer.dev/img/github-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/github-dark.png -------------------------------------------------------------------------------- /boxer.dev/img/github-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dphilla/boxer/9f81f0f0fc1421e021b29044257c99c6ba09b5a1/boxer.dev/img/github-light.png -------------------------------------------------------------------------------- /boxer.dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Boxer 22 | 134 | 135 | 136 | 137 | 138 |

Boxer

139 |
140 | 141 |
142 | 143 |

144 | 145 | Mia St John 146 | 147 |

148 | 149 |

TL;DR:

150 |

DOCKERFILE -> Universal Wasm Binary

151 |

152 | Smaller, Safer, Faster, (much more) Universal 153 |

154 | 155 |

156 | 157 | Check out our Github! 158 | 159 |

160 | 161 |
or, get updates + early access to our release:
162 | 163 | 164 | 169 | 170 | 171 | 174 | 175 |
176 |
177 |
178 |
179 | 180 |

Overview

181 |

Boxer is an open-source project designed to reimagine cloud computing by transitioning from traditional container technology to WebAssembly (Wasm) based distributions, known as "Boxes" or "WasmBoxes".

182 | 183 |

Motivation

184 |

While containers have been a cornerstone of cloud computing, they come with significant drawbacks. They often result in larger, less efficient deployments with slower startup times and rely heavily on the underlying operating system/kernel for security, which can introduce vulnerabilities and platform lock-in.

185 | 186 |

Solution: Boxer

187 |

Boxer (A.K.A "Wasm-Boxer") offers a new solution by providing tooling for converting existing containerized workloads and definitions into near-universally deployable Wasm distributions. These "Boxes" offer environments comparable to those provided by containers but are vastly more efficient thanks to the lightweight, sandboxed execution capabilities of WebAssembly.

188 | 189 |

190 | 191 | Container and Box 192 | 193 |

194 | 195 |

Key Advantages of WebAssembly:

196 |
    197 |
  • Reduced Overhead: Wasm's compact binary instruction format ensures lightweight execution, drastically cutting down the overhead seen in traditional containers.
  • 198 |
  • Enhanced Performance: The efficiency of Wasm leads to improved performance and smaller, more efficient deployments, perfectly suited for cloud computing.
  • 199 |
  • Superior Security: Wasm's memory-safe, isolated execution environment provides a higher level of security, independent of the operating system.
  • 200 |
  • Run (almost) Everywhere Wasm can run anywhere there is a WebAssembly runtime, including browsers, servers, and embedded devices; existing runtimes are available for a wide variety of architectures.
  • 201 |
202 | 203 | 204 | 210 | 211 | 212 |
213 |
214 |
215 |
216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /boxer.dev/main.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', () => { 2 | const modePreference = window.matchMedia("(prefers-color-scheme: dark"); 3 | if (modePreference.matches) { 4 | document.getElementById('view-mode').checked = true; 5 | viewMode(); 6 | } 7 | }); 8 | 9 | document.getElementById('fetchFiles').onclick = async function () { 10 | const repoUrl = document.getElementById('repoUrl').value; 11 | gitHubFiles(repoUrl); 12 | }; 13 | 14 | document.getElementById('repoUrl').addEventListener('keydown', async function (e) { 15 | if (e.key === 'Enter') { 16 | const repoUrl = document.getElementById('repoUrl').value; 17 | gitHubFiles(repoUrl); 18 | } 19 | }); 20 | 21 | document.getElementById('view-mode').addEventListener("click", () => { 22 | viewMode(); 23 | }); 24 | 25 | let terminal; 26 | 27 | document.getElementById('deployButton').onclick = function () { 28 | document.getElementById('dashboard').style.display = "none"; 29 | terminal = new Terminal(); 30 | terminal.open(document.getElementById('terminal')); 31 | }; 32 | 33 | document.getElementById('returnButton').onclick = function () { 34 | document.getElementById('dashboard').style.display = "block"; 35 | terminal.dispose(); 36 | }; 37 | 38 | const gitHubFiles = async (repoUrl) => { 39 | const fileListElement = document.getElementById('fileList'); 40 | fileListElement.innerHTML = ''; 41 | 42 | const match = repoUrl.match(/github\.com\/([^\/]+)\/([^\/]+)/); 43 | console.log(match); 44 | if (!match) { 45 | alert('Invalid GitHub URL'); 46 | return; 47 | } 48 | 49 | const [_, owner, repo] = match; 50 | const apiUrl = `https://api.github.com/repos/${owner}/${repo}/contents`; 51 | 52 | try { 53 | const response = await fetch(apiUrl); 54 | if (!response.ok) { 55 | throw new Error(`Error fetching repository contents: ${response.statusText}`); 56 | } 57 | 58 | const files = await response.json(); 59 | files.forEach(file => { 60 | const listItem = document.createElement('li'); 61 | const link = document.createElement('a'); 62 | link.href = `https://github.com/${owner}/${repo}/blob/main/${file.path}`; // need to change the link to also get the branch name (if main doesnt exist it will send to a 404 not found) 63 | link.target = '_blank'; // Open link in a new tab 64 | link.textContent = file.path; 65 | listItem.appendChild(link); 66 | fileListElement.appendChild(listItem); 67 | }); 68 | } catch (error) { 69 | alert('Failed to fetch repository contents: ' + error.message); 70 | } 71 | }; 72 | 73 | const dockerfileLang = (language) => { 74 | switch (true) { 75 | case (language === 'python'): 76 | document.getElementById('dockerText').value = "# From Dockers official Python image: https://hub.docker.com/_/python\n\nFROM python:3\n\nWORKDIR /usr/src/app\n\nCOPY requirements.txt ./\nRUN pip install --no-cache-dir -r requirements.txt\n\nCOPY . .\n\nCMD [ 'python', './your-daemon-or-script.py' ]\n"; 77 | break; 78 | case (language === 'ruby'): 79 | document.getElementById('dockerText').value = "# From Dockers official Ruby image: https://hub.docker.com/_/ruby\n\nFROM ruby:3.3\n\n# Throw errors if Gemfile has been modified since Gemfile.lock\nRUN bundle config --global frozen 1\n\nWORKDIR /usr/src/app\n\nCOPY Gemfile Gemfile.lock ./\nRUN bundle install\n\nCOPY . .\n\nCMD [ './your-daemon-or-script.rb' ]\n"; 80 | break; 81 | default: 82 | document.getElementById('dockerText').value = "# From Dockers official GCC image: https://hub.docker.com/_/gcc\n\nFROM gcc:4.9\nCOPY . /usr/src/myapp\nWORKDIR /usr/src/myapp\nRUN gcc -o myapp main.c\nCMD ['./myapp']\n"; 83 | 84 | } 85 | }; 86 | 87 | const viewMode = () => { 88 | if (document.getElementById('view-mode').checked) { 89 | document.body.classList.remove('light-mode'); 90 | document.body.classList.add('dark-mode'); 91 | document.getElementById('github-icon').src = "img/github-dark.png"; 92 | } else { 93 | document.body.classList.remove('dark-mode'); 94 | document.body.classList.add('light-mode'); 95 | document.getElementById('github-icon').src = "img/github-light.png"; 96 | } 97 | }; -------------------------------------------------------------------------------- /boxer.dev/python-example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Boxer-Python 7 | 122 | 123 | 124 |

Boxer - Deploy a Python App Now

125 |
126 | 127 |
128 |
129 |
130 |
131 | 132 | 133 |
    134 |
    135 | (Dockerfile) 136 | 142 | 143 |
    144 | 145 |
    146 | 147 | Placeholder Image 148 | 149 | 150 |
    151 |
    152 | 153 | 154 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /boxer.dev/python.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Boxer-Python 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |
    16 |
    17 |

    Boxer

    18 | 19 |
    20 |

    21 | Deploy a Python App Now 22 |

    23 |
    24 |
    25 |

    Light/Dark

    26 | 30 |
    31 | 34 |
    35 |
    36 |
    37 |
    38 |
    39 | 40 | 41 | 42 |
    43 |
    44 |
    45 |
    46 |

    Github Files:

    47 |
    48 |
      49 |
    50 |
    51 |
    52 |
    53 |
    54 |
    55 |

    Dockerfile:

    56 | 58 | 59 |
    60 |
    61 |
    62 | 65 | 68 | 71 |
    72 |
    73 |
    74 |
    75 |
    76 |
    77 |
    78 | 79 |
    80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /boxer.dev/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 6 | color: var(--text-color); 7 | } 8 | 9 | .light-mode { 10 | --bg-img: url("img/boxer-bg-light.png"); 11 | --bg-img-mobile: url("img/boxer-bg-light-mobile.png"); 12 | --text-color: black; 13 | --text-box: linear-gradient(lightgrey, lightgrey) padding-box, 14 | linear-gradient(white, #9ef4ff) border-box; 15 | --button-color: #9ef4ff; 16 | --button-box-shadow: #6399a0 0 2px 4px, #6399a0 0 7px 13px -3px, #8edbe5 0 -3px 0 inset; 17 | --button-box-shadow-active: #5e9299 0 3px 7px inset; 18 | --button-box-shadow-focus: #5e9299 0 0 0 1.5px inset, #6399a0 0 2px 4px, #6399a0 0 7px 13px -3px, #5e9299 0 -3px 0 inset 19 | } 20 | 21 | .dark-mode { 22 | --bg-img: url("img/boxer-bg-dark.png"); 23 | --bg-img-mobile: url("img/boxer-bg-dark-mobile.png"); 24 | --text-color: white; 25 | --text-box: linear-gradient(#0d1017, #0d1017) padding-box, 26 | linear-gradient(#0d1017, rebeccapurple) border-box; 27 | --button-color: #FCFCFD; 28 | --button-box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset; 29 | --button-box-shadow-active: #D6D6E7 0 3px 7px inset; 30 | --button-box-shadow-focus: #D6D6E7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset 31 | } 32 | 33 | body { 34 | background-image: var(--bg-img); 35 | overflow: hidden; 36 | } 37 | 38 | .header { 39 | display: flex; 40 | justify-content: space-between; 41 | padding: 10px; 42 | margin: 20px; 43 | } 44 | 45 | .brand { 46 | display: flex; 47 | align-items: center; 48 | } 49 | 50 | .boxerLogo { 51 | height: 75px; 52 | width: 50px; 53 | } 54 | 55 | /* Containter for our Light/Dark mode switch */ 56 | .mode-switch { 57 | position: relative; 58 | display: inline-block; 59 | width: 50px; 60 | height: 24px; 61 | } 62 | 63 | /* Will hide default checkbox */ 64 | .mode-switch input { 65 | opacity: 0; 66 | width: 0; 67 | height: 0; 68 | } 69 | 70 | /* The track */ 71 | .slider { 72 | position: absolute; 73 | cursor: pointer; 74 | background-color: #ccc; 75 | border-radius: 24px; 76 | width: 100%; 77 | height: 100%; 78 | transition: background-color 0.3s; 79 | } 80 | 81 | /* Rounded slider */ 82 | .slider::before { 83 | content: ""; 84 | position: absolute; 85 | height: 20px; 86 | width: 20px; 87 | left: 4px; 88 | bottom: 2px; 89 | background-color: white; 90 | border-radius: 50%; 91 | transition: transform 0.3s; 92 | } 93 | 94 | /* Toggled state */ 95 | .mode-switch input:checked+.slider { 96 | background-color: rebeccapurple; 97 | } 98 | 99 | .mode-switch input:checked+.slider::before { 100 | transform: translateX(22px); 101 | } 102 | 103 | .container { 104 | height: 90vh; 105 | width: 100vw; 106 | display: flex; 107 | flex-direction: column; 108 | } 109 | 110 | .repo { 111 | width: 60vw; 112 | height: 20vh; 113 | margin-bottom: 20px; 114 | display: flex; 115 | align-self: center; 116 | justify-content: center; 117 | align-items: center; 118 | gap: 10px; 119 | } 120 | 121 | .repoWrapper { 122 | width: 60%; 123 | display: flex; 124 | align-items: center; 125 | background: var(--text-box); 126 | border: 1px solid transparent; 127 | border-radius: 10px; 128 | padding: 10px; 129 | border-radius: 10px; 130 | } 131 | 132 | 133 | .repoUrl { 134 | border: hidden; 135 | background-color: transparent; 136 | flex: 1; 137 | font-size: 20px; 138 | } 139 | 140 | input.repoUrl:focus { 141 | outline: none; 142 | } 143 | 144 | 145 | #fetchFiles { 146 | height: 30px; 147 | } 148 | 149 | 150 | .subContainer { 151 | width: 100vw; 152 | height: 50vh; 153 | display: flex; 154 | 155 | } 156 | 157 | .githubCode { 158 | display: flex; 159 | flex-direction: column; 160 | align-items: center; 161 | } 162 | 163 | .codebase { 164 | width: 50vw; 165 | display: flex; 166 | justify-content: center; 167 | height: 400px; 168 | padding: 15px 0px 15px 0px; 169 | } 170 | 171 | .fileList { 172 | column-width: 115px; 173 | } 174 | 175 | ul { 176 | list-style: none; 177 | } 178 | 179 | a { 180 | position: relative; 181 | text-decoration: none; 182 | } 183 | 184 | a::before { 185 | content: ''; 186 | position: absolute; 187 | width: 100%; 188 | height: 1px; 189 | background-color: var(--text-color); 190 | bottom: 0; 191 | left: 0; 192 | transform-origin: right; 193 | transform: scaleX(0); 194 | transition: transform .3s ease-in-out; 195 | } 196 | 197 | a:hover::before { 198 | transform-origin: left; 199 | transform: scaleX(1); 200 | } 201 | 202 | .docker { 203 | width: 50vw; 204 | display: flex; 205 | align-items: center; 206 | } 207 | 208 | .dockerFile { 209 | display: flex; 210 | padding: 0px 10px 0px 0px; 211 | gap: 20px; 212 | } 213 | 214 | .dockerText { 215 | width: 550px; 216 | height: 400px; 217 | background: var(--text-box); 218 | border: 1px solid transparent; 219 | border-radius: 10px; 220 | padding: 10px; 221 | font-size: 15px; 222 | } 223 | 224 | textarea.dockerText:focus { 225 | outline: none; 226 | } 227 | 228 | .textBox { 229 | display: flex; 230 | flex-direction: column; 231 | align-items: center; 232 | gap: 10px; 233 | } 234 | 235 | .dockerLang { 236 | display: flex; 237 | flex-direction: column; 238 | gap: 10px; 239 | } 240 | 241 | .codeLang { 242 | border: hidden; 243 | background-color: transparent; 244 | } 245 | 246 | 247 | .button { 248 | align-items: center; 249 | align-self: center; 250 | background-color: var(--button-color); 251 | border-radius: 4px; 252 | border-width: 0; 253 | box-shadow: var(--button-box-shadow); 254 | box-sizing: border-box; 255 | color: black; 256 | display: inline-flex; 257 | height: 48px; 258 | justify-content: center; 259 | padding-left: 16px; 260 | padding-right: 16px; 261 | transition: box-shadow .15s, transform .15s; 262 | user-select: none; 263 | -webkit-user-select: none; 264 | touch-action: manipulation; 265 | white-space: nowrap; 266 | will-change: box-shadow, transform; 267 | font-size: 18px; 268 | } 269 | 270 | .button:focus { 271 | box-shadow: var(--button-box-shadow-focus); 272 | } 273 | 274 | .button:hover { 275 | transform: translateY(-2px); 276 | cursor: pointer; 277 | } 278 | 279 | .button:active { 280 | box-shadow: var(--button-box-shadow-active); 281 | transform: translateY(2px); 282 | } 283 | 284 | 285 | @media (max-width: 600px) { 286 | * { 287 | margin: 0; 288 | padding: 0; 289 | box-sizing: border-box; 290 | font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 291 | } 292 | 293 | body { 294 | overflow: scroll; 295 | background-image: var(--bg-img-mobile); 296 | } 297 | 298 | .header { 299 | display: flex; 300 | flex-direction: column; 301 | align-items: center; 302 | } 303 | 304 | .container { 305 | display: flex; 306 | flex-direction: column; 307 | } 308 | 309 | .subContainer { 310 | display: flex; 311 | flex-direction: column; 312 | } 313 | 314 | .repoWrapper { 315 | width: 100vw; 316 | display: flex; 317 | } 318 | 319 | .docker { 320 | width: 100vw; 321 | display: flex; 322 | flex-direction: column-reverse; 323 | 324 | } 325 | 326 | .dockerText { 327 | width: 80vw; 328 | height: 300px; 329 | resize: none; 330 | } 331 | 332 | .dockerLang { 333 | display: flex; 334 | flex-direction: row; 335 | } 336 | } 337 | 338 | #terminal { 339 | width: 100%; 340 | background-image: var(--bg-img); 341 | } -------------------------------------------------------------------------------- /examples/c/async_server.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #define PORT 8080 11 | #define BUFFER_SIZE 1024 12 | #define MAX_EVENTS 10 13 | 14 | int set_nonblocking(int fd) { 15 | int flags = fcntl(fd, F_GETFL, 0); 16 | if (flags == -1) { 17 | perror("fcntl"); 18 | return -1; 19 | } 20 | if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) { 21 | perror("fcntl"); 22 | return -1; 23 | } 24 | return 0; 25 | } 26 | 27 | void handle_client(int client_socket) { 28 | char buffer[BUFFER_SIZE]; 29 | int bytes_read = recv(client_socket, buffer, BUFFER_SIZE - 1, 0); 30 | 31 | if (bytes_read <= 0) { 32 | if (bytes_read == 0 || (bytes_read == -1 && errno != EAGAIN)) { 33 | // Connection closed or error 34 | close(client_socket); 35 | } 36 | return; 37 | } 38 | 39 | buffer[bytes_read] = '\0'; 40 | printf("Received request:\n%s\n", buffer); 41 | 42 | const char *response = 43 | "HTTP/1.1 200 OK\r\n" 44 | "Content-Type: text/html\r\n" 45 | "Content-Length: 13\r\n" 46 | "\r\n" 47 | "Hello, world!"; 48 | 49 | send(client_socket, response, strlen(response), 0); 50 | } 51 | 52 | int main() { 53 | int server_socket, client_socket, epoll_fd, n; 54 | struct sockaddr_in server_addr, client_addr; 55 | socklen_t addr_len = sizeof(client_addr); 56 | struct epoll_event ev, events[MAX_EVENTS]; 57 | 58 | // Create server socket 59 | server_socket = socket(AF_INET, SOCK_STREAM, 0); 60 | if (server_socket == -1) { 61 | perror("socket"); 62 | exit(EXIT_FAILURE); 63 | } 64 | 65 | // Set server socket to non-blocking 66 | if (set_nonblocking(server_socket) == -1) { 67 | close(server_socket); 68 | exit(EXIT_FAILURE); 69 | } 70 | 71 | // Bind socket to address 72 | server_addr.sin_family = AF_INET; 73 | server_addr.sin_addr.s_addr = INADDR_ANY; 74 | server_addr.sin_port = htons(PORT); 75 | 76 | if (bind(server_socket, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { 77 | perror("bind"); 78 | close(server_socket); 79 | exit(EXIT_FAILURE); 80 | } 81 | 82 | // Listen for connections 83 | if (listen(server_socket, 10) == -1) { 84 | perror("listen"); 85 | close(server_socket); 86 | exit(EXIT_FAILURE); 87 | } 88 | 89 | // Create epoll instance 90 | epoll_fd = epoll_create1(0); 91 | if (epoll_fd == -1) { 92 | perror("epoll_create1"); 93 | close(server_socket); 94 | exit(EXIT_FAILURE); 95 | } 96 | 97 | // Add server socket to epoll 98 | ev.events = EPOLLIN; 99 | ev.data.fd = server_socket; 100 | if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, server_socket, &ev) == -1) { 101 | perror("epoll_ctl"); 102 | close(server_socket); 103 | close(epoll_fd); 104 | exit(EXIT_FAILURE); 105 | } 106 | 107 | printf("Server listening on port %d...\n", PORT); 108 | 109 | // Event loop 110 | while (1) { 111 | int n_fds = epoll_wait(epoll_fd, events, MAX_EVENTS, -1); 112 | if (n_fds == -1) { 113 | perror("epoll_wait"); 114 | break; 115 | } 116 | 117 | for (n = 0; n < n_fds; ++n) { 118 | if (events[n].data.fd == server_socket) { 119 | // Accept new connection 120 | client_socket = accept(server_socket, (struct sockaddr *)&client_addr, &addr_len); 121 | if (client_socket == -1) { 122 | perror("accept"); 123 | continue; 124 | } 125 | 126 | // Set client socket to non-blocking 127 | if (set_nonblocking(client_socket) == -1) { 128 | close(client_socket); 129 | continue; 130 | } 131 | 132 | // Add client socket to epoll 133 | ev.events = EPOLLIN | EPOLLET; 134 | ev.data.fd = client_socket; 135 | if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, client_socket, &ev) == -1) { 136 | perror("epoll_ctl"); 137 | close(client_socket); 138 | continue; 139 | } 140 | } else { 141 | // Handle client request 142 | handle_client(events[n].data.fd); 143 | } 144 | } 145 | } 146 | 147 | // Clean up 148 | close(server_socket); 149 | close(epoll_fd); 150 | return 0; 151 | } 152 | 153 | -------------------------------------------------------------------------------- /examples/c/c.md: -------------------------------------------------------------------------------- 1 | # Example Box with a C program 2 | 3 | Note: This is not emcc. Read about the differences [here](). 4 | 5 | ## Via CLI 6 | 7 | Just put `box` in front your compiler command. This then just uses the standard compiler (gcc, clang, rust, go etc.), but first intercepts some of the code that would make [syscalls](https://en.wikipedia.org/wiki/System_call) on a native system, so that your code work with WebAssembly, in a box. 8 | 9 | `box gcc ...` 10 | 11 | then COPY the resluting binary via your Dockerfile 12 | 13 | ## Networking 14 | 15 | Networking can either leverage the host's (linux) kernel, or a [remote, edge-based micro-kernel](boxer.dev/networking) (for free). 16 | 17 | By default, the box will build for edge-networking, to use local networking: 18 | 19 | `box build -f --local-networking` 20 | 21 | ## Multi-stage builds 22 | 23 | _Build exactly like you would in a mutli-stage container declaration_ 24 | 25 | E.g. 26 | 27 | ``` 28 | # Stage 1: Build the application 29 | FROM gcc:latest AS builder 30 | 31 | # Set the working directory 32 | WORKDIR /app 33 | 34 | # Copy the source code 35 | COPY . . 36 | 37 | # Build the application - **this builds the program to WebAssemblly, with the proper interception of system code in for use in a Wasm Box** 38 | RUN gcc -o myapp main.c 39 | 40 | # Stage 2: Create the final image 41 | FROM alpine:latest 42 | 43 | # Install necessary packages (if any) 44 | RUN apk --no-cache add libc6-compat 45 | 46 | # Set the working directory 47 | WORKDIR /root/ 48 | 49 | # Copy the binary from the builder stage 50 | COPY --from=builder /app/myapp . 51 | 52 | # Expose the necessary port (if applicable) 53 | EXPOSE 8080 54 | 55 | # Command to run the application 56 | CMD ["./myapp"] 57 | 58 | ``` 59 | 60 | ## Why? 61 | 62 | Many reasons. Mostly, because we don't want to (yet) attempt to have a new target added to LLVM, or other toolchains, and we certainly don't want to force you to use a non-standard fork or custom compiler. 63 | 64 | Technical Explanation: 65 | 66 | - Wasm Compilation, Syscalls, Shared libs, etc. 67 | - Do we want the same C ABI? 68 | - The debate 69 | 70 | -------------------------------------------------------------------------------- /examples/c/sync_server.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #define PORT 8080 9 | #define BUFFER_SIZE 1024 10 | 11 | void handle_client(int client_socket) { 12 | char buffer[BUFFER_SIZE]; 13 | int bytes_read = recv(client_socket, buffer, BUFFER_SIZE - 1, 0); 14 | 15 | if (bytes_read < 0) { 16 | perror("recv"); 17 | close(client_socket); 18 | return; 19 | } 20 | 21 | buffer[bytes_read] = '\0'; 22 | printf("Received request:\n%s\n", buffer); 23 | 24 | const char *response = 25 | "HTTP/1.1 200 OK\r\n" 26 | "Content-Type: text/html\r\n" 27 | "Content-Length: 13\r\n" 28 | "\r\n" 29 | "Hello, world!"; 30 | 31 | send(client_socket, response, strlen(response), 0); 32 | close(client_socket); 33 | } 34 | 35 | int main() { 36 | int server_socket, client_socket; 37 | struct sockaddr_in server_addr, client_addr; 38 | socklen_t addr_len = sizeof(client_addr); 39 | 40 | // Create socket 41 | server_socket = socket(AF_INET, SOCK_STREAM, 0); 42 | if (server_socket == -1) { 43 | perror("socket"); 44 | exit(EXIT_FAILURE); 45 | } 46 | 47 | // Bind socket to address 48 | server_addr.sin_family = AF_INET; 49 | server_addr.sin_addr.s_addr = INADDR_ANY; 50 | server_addr.sin_port = htons(PORT); 51 | 52 | if (bind(server_socket, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { 53 | perror("bind"); 54 | close(server_socket); 55 | exit(EXIT_FAILURE); 56 | } 57 | 58 | // Listen for connections 59 | if (listen(server_socket, 10) == -1) { 60 | perror("listen"); 61 | close(server_socket); 62 | exit(EXIT_FAILURE); 63 | } 64 | 65 | printf("Server listening on port %d...\n", PORT); 66 | 67 | // Accept and handle incoming connections 68 | while (1) { 69 | client_socket = accept(server_socket, (struct sockaddr *)&client_addr, &addr_len); 70 | if (client_socket == -1) { 71 | perror("accept"); 72 | continue; 73 | } 74 | 75 | handle_client(client_socket); 76 | } 77 | 78 | // Close server socket (unreachable code in this example) 79 | close(server_socket); 80 | return 0; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /examples/c/threaded_server.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #define PORT 8080 9 | #define BUFFER_SIZE 1024 10 | 11 | void *handle_client(void *arg) { 12 | int client_socket = *(int *)arg; 13 | free(arg); 14 | 15 | char buffer[BUFFER_SIZE]; 16 | int bytes_read = recv(client_socket, buffer, BUFFER_SIZE - 1, 0); 17 | 18 | if (bytes_read < 0) { 19 | perror("recv"); 20 | close(client_socket); 21 | return NULL; 22 | } 23 | 24 | buffer[bytes_read] = '\0'; 25 | printf("Received request:\n%s\n", buffer); 26 | 27 | const char *response = 28 | "HTTP/1.1 200 OK\r\n" 29 | "Content-Type: text/html\r\n" 30 | "Content-Length: 13\r\n" 31 | "\r\n" 32 | "Hello, world!"; 33 | 34 | send(client_socket, response, strlen(response), 0); 35 | close(client_socket); 36 | return NULL; 37 | } 38 | 39 | int main() { 40 | int server_socket, *client_socket; 41 | struct sockaddr_in server_addr, client_addr; 42 | socklen_t addr_len = sizeof(client_addr); 43 | pthread_t thread_id; 44 | 45 | // Create socket 46 | server_socket = socket(AF_INET, SOCK_STREAM, 0); 47 | if (server_socket == -1) { 48 | perror("socket"); 49 | exit(EXIT_FAILURE); 50 | } 51 | 52 | // Bind socket to address 53 | server_addr.sin_family = AF_INET; 54 | server_addr.sin_addr.s_addr = INADDR_ANY; 55 | server_addr.sin_port = htons(PORT); 56 | 57 | if (bind(server_socket, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { 58 | perror("bind"); 59 | close(server_socket); 60 | exit(EXIT_FAILURE); 61 | } 62 | 63 | // Listen for connections 64 | if (listen(server_socket, 10) == -1) { 65 | perror("listen"); 66 | close(server_socket); 67 | exit(EXIT_FAILURE); 68 | } 69 | 70 | printf("Server listening on port %d...\n", PORT); 71 | 72 | // Accept and handle incoming connections 73 | while (1) { 74 | client_socket = malloc(sizeof(int)); 75 | *client_socket = accept(server_socket, (struct sockaddr *)&client_addr, &addr_len); 76 | if (*client_socket == -1) { 77 | perror("accept"); 78 | free(client_socket); 79 | continue; 80 | } 81 | 82 | if (pthread_create(&thread_id, NULL, handle_client, client_socket) != 0) { 83 | perror("pthread_create"); 84 | free(client_socket); 85 | continue; 86 | } 87 | 88 | pthread_detach(thread_id); 89 | } 90 | 91 | // Close server socket (unreachable code in this example) 92 | close(server_socket); 93 | return 0; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /examples/python/python.md: -------------------------------------------------------------------------------- 1 | # Example Box with a Python program 2 | -------------------------------------------------------------------------------- /examples/ruby/ruby.md: -------------------------------------------------------------------------------- 1 | # Example Box with a Ruby program 2 | --------------------------------------------------------------------------------