diff options
author | metamuffin <metamuffin@disroot.org> | 2025-10-02 19:14:17 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-10-02 19:14:17 +0200 |
commit | 23871d5aadcaa4d01b7c46cb951854572940414d (patch) | |
tree | 9a3f0490675642a5b76bdda8f44f2e75b469046c | |
parent | fbc308f96dca2854bc462e6fee412b5dc35b6c3c (diff) | |
download | metamuffin-website-23871d5aadcaa4d01b7c46cb951854572940414d.tar metamuffin-website-23871d5aadcaa4d01b7c46cb951854572940414d.tar.bz2 metamuffin-website-23871d5aadcaa4d01b7c46cb951854572940414d.tar.zst |
Rewrite
37 files changed, 1108 insertions, 4398 deletions
@@ -1,2 +1,2 @@ -/target -/blog +*.html +!/template.html diff --git a/COPYING b/COPYING deleted file mode 100644 index 5c60cc5..0000000 --- a/COPYING +++ /dev/null @@ -1,677 +0,0 @@ -All source files and content of the webpage found on metamuffin.org and in it's -sources are licenced under the third version of the GNU Affero Public Licence only. -Sources can be found on https://codeberg.org/metamuffin/website - -metamuffin.org - metamuffin's website -Copyright (C) 2021, 2022 metamuffin - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License only. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -<https://www.gnu.org/licenses/>.
\ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index dbcbc9d..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2409 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anstyle-parse" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" -dependencies = [ - "anstyle", - "windows-sys 0.59.0", -] - -[[package]] -name = "anyhow" -version = "1.0.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.3.1", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-std" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "async-trait" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "atomic" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide 0.8.0", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "binascii" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel 2.3.1", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" - -[[package]] -name = "cc" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "colorchoice" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "devise" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6eacefd3f541c66fc61433d65e54e0e46e0a029a819a7dbbc7a7b489e8a85f8" -dependencies = [ - "devise_codegen", - "devise_core", -] - -[[package]] -name = "devise_codegen" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8cf4b8dd484ede80fd5c547592c46c3745a617c8af278e2b72bea86b2dfed6" -dependencies = [ - "devise_core", - "quote", -] - -[[package]] -name = "devise_core" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a" -dependencies = [ - "bitflags 2.6.0", - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn", -] - -[[package]] -name = "either" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_filter" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "5.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -dependencies = [ - "event-listener 5.3.1", - "pin-project-lite", -] - -[[package]] -name = "fastrand" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" - -[[package]] -name = "figment" -version = "0.10.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" -dependencies = [ - "atomic 0.6.0", - "pear", - "serde", - "toml", - "uncased", - "version_check", -] - -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide 0.7.4", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-lite" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generator" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "include_dir" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" -dependencies = [ - "glob", - "include_dir_macros", -] - -[[package]] -name = "include_dir_macros" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", - "serde", -] - -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "iso8601" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153" -dependencies = [ - "chrono", - "nom", - "num-traits", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "latex2mathml" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678cf5bdb3ba63a264e6e0c9eee36538ca1d2da0afa4dd801c1f96309e710765" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.164" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" - -[[package]] -name = "line-wrap" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -dependencies = [ - "value-bag", -] - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "markdown" -version = "1.0.0-alpha.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6491e6c702bf7e3b24e769d800746d5f2c06a6c6a2db7992612e0f429029e81" -dependencies = [ - "unicode-id", -] - -[[package]] -name = "markup" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a887ad620fe1022257343ac77fcdd3720e92888e1b2e66e1b7a4707f453898" -dependencies = [ - "markup-proc-macro", -] - -[[package]] -name = "markup-proc-macro" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab6ee21fd1855134cacf2f41afdf45f1bc456c7d7f6165d763b4647062dd2be" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "metamuffin-website" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-std", - "chrono", - "env_logger", - "futures", - "include_dir", - "iso8601", - "latex2mathml", - "log", - "markdown", - "markup", - "rocket", - "syntect", - "tokio", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "multer" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http 1.1.0", - "httparse", - "memchr", - "mime", - "spin", - "tokio", - "tokio-util", - "version_check", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "onig" -version = "6.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" -dependencies = [ - "bitflags 1.3.2", - "libc", - "once_cell", - "onig_sys", -] - -[[package]] -name = "onig_sys" -version = "69.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "pear" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "plist" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" -dependencies = [ - "base64", - "indexmap", - "line-wrap", - "quick-xml", - "serde", - "time", -] - -[[package]] -name = "polling" -version = "3.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi 0.4.0", - "pin-project-lite", - "rustix", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "version_check", - "yansi", -] - -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "ref-cast" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rocket" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a516907296a31df7dc04310e7043b61d71954d703b603cc6867a026d7e72d73f" -dependencies = [ - "async-stream", - "async-trait", - "atomic 0.5.3", - "binascii", - "bytes", - "either", - "figment", - "futures", - "indexmap", - "log", - "memchr", - "multer", - "num_cpus", - "parking_lot", - "pin-project-lite", - "rand", - "ref-cast", - "rocket_codegen", - "rocket_http", - "serde", - "serde_json", - "state", - "tempfile", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "ubyte", - "version_check", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575d32d7ec1a9770108c879fc7c47815a80073f96ca07ff9525a94fcede1dd46" -dependencies = [ - "devise", - "glob", - "indexmap", - "proc-macro2", - "quote", - "rocket_http", - "syn", - "unicode-xid", - "version_check", -] - -[[package]] -name = "rocket_http" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e274915a20ee3065f611c044bd63c40757396b6dbc057d6046aec27f14f882b9" -dependencies = [ - "cookie", - "either", - "futures", - "http 0.2.12", - "hyper", - "indexmap", - "log", - "memchr", - "pear", - "percent-encoding", - "pin-project-lite", - "ref-cast", - "serde", - "smallvec", - "stable-pattern", - "state", - "time", - "tokio", - "uncased", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustix" -version = "0.38.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" -dependencies = [ - "serde", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "stable-pattern" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045" -dependencies = [ - "memchr", -] - -[[package]] -name = "state" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8" -dependencies = [ - "loom", -] - -[[package]] -name = "syn" -version = "2.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syntect" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" -dependencies = [ - "bincode", - "bitflags 1.3.2", - "flate2", - "fnv", - "once_cell", - "onig", - "plist", - "regex-syntax 0.8.5", - "serde", - "serde_derive", - "serde_json", - "thiserror", - "walkdir", - "yaml-rust", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tokio" -version = "1.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "ubyte" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f720def6ce1ee2fc44d40ac9ed6d3a59c361c80a75a7aa8e75bb9baed31cf2ea" -dependencies = [ - "serde", -] - -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "serde", - "version_check", -] - -[[package]] -name = "unicode-id" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" - -[[package]] -name = "unicode-ident" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "value-bag" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" -dependencies = [ - "memchr", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -dependencies = [ - "is-terminal", -] diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index a5e86c1..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "metamuffin-website" -version = "0.1.0" -edition = "2021" - -[dependencies] -rocket = { version = "0.5.1", features = ["json"] } -tokio = { version = "1.41.1", features = ["full"] } -log = "0.4.22" -env_logger = "0.11.5" -async-std = "1.13.0" -include_dir = { version = "0.7.4", features = ["glob"] } -iso8601 = { version = "0.6.1", features = ["chrono"] } -futures = "0.3.31" -anyhow = "1.0.93" -markup = "0.15.0" -markdown = "1.0.0-alpha.21" -chrono = "0.4.38" -syntect = "5.2.0" -latex2mathml = "0.2.3" diff --git a/README.md b/README.md deleted file mode 100644 index ff22102..0000000 --- a/README.md +++ /dev/null @@ -1,8 +0,0 @@ - -# metamuffin.org - -This repository contains sources for [metamuffin.org](https://metamuffin.org/) - -## Licencing - -This project is licenced under the third version of the GNU Affero Public Licence only, see [`COPYING`](./COPYING). diff --git a/about.md b/about.md new file mode 100644 index 0000000..721b39c --- /dev/null +++ b/about.md @@ -0,0 +1,8 @@ +# About me + +Hi. I am a normal person from planet earth. I do not know what to write here. I +enjoy starting projects and never finishing them. I am also supporting the free +software movement by writing exclusively free software in my spare time. + +Regarding programming I mostly use Rust. Sometimes also Lua, GDscript, Python, +TypeScript, Haskell or whatever works best. diff --git a/assets/key.asc b/assets/key.asc deleted file mode 100644 index 7a9744c..0000000 --- a/assets/key.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mDMEYv5yMRYJKwYBBAHaRw8BAQdAfrtqCI7LEQoszlZ/nVoH6/H8X/yIl+eUJY7Q -Bj4ZktK0MW1ldGFtdWZmaW4gKG1haWxpbmcga2V5KSA8bWV0YW11ZmZpbkBkaXNy -b290Lm9yZz6IkAQTFggAOBYhBC11CxJF4bFDjtQetmgQPYIwKNvABQJi/nIxAhsD -BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEGgQPYIwKNvAPO8BAPJZj4NkaZEH -+deO9SWmCWXPhYS/k35VwPuM+2oNqDvKAQDo18mPa0/V35C01OOVOi0frZTpCxfj -L757th4oDXoJDoh1BBAWCAAdFiEECTeqGIprRXPrquBlpC2mF0b6mbUFAmL+dLIA -CgkQpC2mF0b6mbVytwEA1Fwk2XoFxhTJH2zkgHVPfqOdb4NYJRt/Y32NYHrHqN4A -/3QbQvtpgGLyKIgzrfy03RTrQgn9zBBzmwttTbXnSRYKuDgEYv5yMRIKKwYBBAGX -VQEFAQEHQJQYxyJkdQ4xQkXNUKgMRYUE7a7SA9Bh6tfHGRk5YKwjAwEIB4h4BBgW -CAAgFiEELXULEkXhsUOO1B62aBA9gjAo28AFAmL+cjECGwwACgkQaBA9gjAo28Cn -vQEAws7nVCxY7OkjsEWgXDZKUx34peZscfwDC6nA/Akw3L4A/0P4NG+kRgML2UOr -EfkX+Bu+UToBcr7qgSg835vIbxIG -=K7l9 ------END PGP PUBLIC KEY BLOCK----- diff --git a/assets/security.txt b/assets/security.txt deleted file mode 100644 index 6243ff9..0000000 --- a/assets/security.txt +++ /dev/null @@ -1,4 +0,0 @@ -Contact: mailto:metamuffin@disroot.org -Contact: @metamuffin:metamuffin.org -Updated: 2023-07-17 -Signed: metamuffin (mailing key) diff --git a/assets/security.txt.asc b/assets/security.txt.asc deleted file mode 100644 index 0bd2975..0000000 --- a/assets/security.txt.asc +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -Contact: mailto:metamuffin@disroot.org -Contact: @metamuffin:metamuffin.org -Updated: 2023-07-17 -Signed: metamuffin (mailing key) ------BEGIN PGP SIGNATURE----- - -iI0EARYIADUWIQQtdQsSReGxQ47UHrZoED2CMCjbwAUCZLW3jxccbWV0YW11ZmZp -bkBkaXNyb290Lm9yZwAKCRBoED2CMCjbwIEfAP4mg5CwuuUV3hZRgxbaGUJvcdLp -63brHOwcLd+GrDk1HwD7BzPamEAVDXpxybtqNECH6eTRcL1fgp6OVL4gk0O6GQg= -=iBfC ------END PGP SIGNATURE----- @@ -0,0 +1,9 @@ +# weblog + +_Articles in reverse chronological order._ + +<?exmd ls -1 blog \ + | sort -r \ + | grep -a '.md' \ + | sed -e 's/\(.*\)\.md/- [\1](blog\/\1.html)/' +?> diff --git a/blog/2022-08-29-blog-start.md b/blog/2022-08-29-blog-start.md new file mode 100644 index 0000000..2f17e6c --- /dev/null +++ b/blog/2022-08-29-blog-start.md @@ -0,0 +1,9 @@ +# Starting my blog + +This will be the place where I will post short articles about my thoughts and projects in the future, whenever I feel like it. + +A list of topics of which I already have an idea in mind are: + +- The tools I used to create this blog +- My dream operating system (maybe even logs about me trying (aka failing) to implement it) +- In search of a perfect text editor diff --git a/blog/2022-08-29-blog-test.md b/blog/2022-08-29-blog-test.md new file mode 100644 index 0000000..1c4a28a --- /dev/null +++ b/blog/2022-08-29-blog-test.md @@ -0,0 +1,41 @@ +# Blog test + +Hello world! + +## heading + +_italic_ **bold** `code` [Link](https://metamuffin.org/) + +### sub heading + +Look at this code here. + +```rs +#[derive(Default)] +struct Impossible<T> { + something: HashMap<usize, T>, + // ^- look here, a keyword! --the grammar regex + itself: Impossible, +} + +pub async fn useless(s: Box<dyn Write>) -> impl Future<usize> { + todo!() // this panics +} +fn main() { + 1 + "blub" + for (x, y) in [(1,2),(3,4)] { + println!("{x} and {y}"); + Impossible::default(); + } +} +``` + +As you can see, its pointless i.e. no points + +- list +- list +- list + +1. first this +2. then that +3. done diff --git a/blog/2022-08-30-blog-tools.md b/blog/2022-08-30-blog-tools.md new file mode 100644 index 0000000..81d1ff9 --- /dev/null +++ b/blog/2022-08-30-blog-tools.md @@ -0,0 +1,104 @@ +# Tools I use to create this blog + +As you might expect, this blog uses some overengineered tools, after all, it +wouldn't be so much fun otherwise. This article is probably not too interesting +on its own. It's just "documentation". + +// TODO upload source code and link it here. + +## "Build system" + +```tree +. +├── ... (readme 'n stuff) +├── code +│ ├── Cargo.toml +│ └── src +│ └── ... (rust source) +└── content + ├── articles + │ ├── 2022-08-29-blog-start.md + │ ├── 2022-08-29-blog-test.md + │ └── 2022-08-30-blog-tools.md + ├── makefile + ├── out + │ ├── ... (generated files) + └── style.css +``` + +The entry point to this "build system" is `content/makefile`, it has rules for +generating HTM from the markdown sources, the index and the atom feed. The +"compiler" here is a small rust program. (`code`). + +```makefile +# oversimplifed, doesnt work +TOOL := blog-tool + +out/index: $(ALL_ARTICLES) $(TOOL) + $(TOOL) render-index > $@ +out/feed.atom: $(ALL_ARTICLES) $(TOOL) + $(TOOL) generate-atom > $@ +out/%: articles/%.md $(TOOL) + $(TOOL) render-article $< > $@ +``` + +A small trick here is, to make everything depend on the compiler (`$(TOOL)`) +too, so that when it changes, re-generation of all articles if triggered. + +## Rust tools + +I use the [laby](https://crates.io/crates/laby) crate for templating the HTM. + +// TODO what is important here?! + +### File server + +I wanted to serve all files without the file name extension (`.html`), but my +previous http server ([http-server](https://github.com/http-party/http-server)) +exclusively inferred the MIME type from the extension, which makes it impossible +to do that. The obvious solution was to reinvent the wheel. + +This had the great side-effect of making my website blazing fast 🚀🚀! :) + +#### http-server (node.js) + +``` +Running 10s test @ http://127.0.0.1:8080/test-file + 2 threads and 100 connections +Requests/sec: 2314.00 +Transfer/sec: 725.38KB +``` + +#### fileserver (rust, no caching) + +``` +Running 10s test @ http://127.0.0.1:8080/test-file + 2 threads and 100 connections +Requests/sec: 24464.69 +Transfer/sec: 3.10MB +``` + +// TODO also upload source code and link it + +### Syntax highlighing + +For that, I chose the crate [synoptic](https://crates.io/crates/synoptic). It +provides a some functions for defining tokens with a regex, then returning +start- and end-points of those for further processing. For example, this is how +i defined comments and types: + +```rs +let rust_grammar = &[ + (&["(?m)(//.*)$"], "comment"), + (&["[A-Z][a-z]*", "bool", "usize", /* simplified */ ], "type"), + /* more rules */ +] +``` + +The library finds all the tokens and lets me serialize them to HTM. + +## End + +I still need to learn, how to write this blog well and what is the most +interesting to read. Please give me some advice or commentary via matrix, mail +or fedi. (see [contact](https://metamuffin.org/contact)) diff --git a/blog/2022-09-19-gctf-readysetaction.md b/blog/2022-09-19-gctf-readysetaction.md new file mode 100644 index 0000000..0d5b719 --- /dev/null +++ b/blog/2022-09-19-gctf-readysetaction.md @@ -0,0 +1,84 @@ +# Google Beginner CTF: ReadySetAction + +**SPOILER WARNING: Go play the CTF at +[capturetheflag.withgoogle.com](https://capturetheflag.withgoogle.com/) first** + +The challenge was a short python script with the following code: + +```py +from Crypto.Util.number import * + +flag = b"REDACTED" + +p = getPrime(1024) +q = getPrime(1024) +n = p*q + +m = bytes_to_long(flag) + + +c = pow(m,3,n) + +print(c) +print(n) +#154780 ... 6709 +#210348 ... 4477 +#(i removed both 617 digit long numbers here) +``` + +It was immediatly obvious to me that this has to do with RSA cryptography +because it multiplies large primes and then does some powmod magic. Because I +didn't remember exactly how RSA worked, I quickly read the Wikipedia article +again - specifically section +[4.1 Attacks against plain RSA](https://en.wikipedia.org/wiki/RSA_%29cryptosystem%29#Attacks_against_plain_RSA) + +The first item already seems like the solution: + +> When encrypting with low encryption exponents (e.g., e = 3) and small values +> of the m (i.e., m < n1/e), the result of me is strictly less than the modulus +> n. In this case, ciphertexts can be decrypted easily by taking the eth root of +> the ciphertext over the integers. + +Which would mean that $\sqrt[3]{c}$ is a solution _if_ $m$ is small enough. +However + +$c = m^3 \mod n \\$ + +so the exponentiation could yield a much higher result that we dont get because +it is wrapped at $n$. So we can try out how often it wrapped: + +$m = \sqrt[3]{c + x*n} \quad x \in \N\\$ + +where $x$ can be brute-forced if $m$ is sufficiently small. Back in python it +looks like this: + +```py +c = ... +n = ... + +# simple but bad binary search for n-th root +def nth_root(c,e): + high = 1 + while high**e < c: + high *= 2 + low = 0 + mid = 0 + last_mid = 0 + while mid**e != c: + mid = (low + high) // 2 + if last_mid == mid: + return 0 # i use 0 to indicate a failure + if mid**e > c: + high = mid + else: + low = mid + last_mid = mid + return mid + +for x in range(100000): + m = nth_root(c + n*x, e) + # the probability of finding a perfect cube number is low, so any result is what we want + if m != 0: print(long_to_bytes(m)) +``` + +Thats it! With $x=1831$ we get our flag: `CTF{34sy_RS4_1s_e4sy_us3}` diff --git a/blog/2022-09-25-ductf-file-magic.md b/blog/2022-09-25-ductf-file-magic.md new file mode 100644 index 0000000..f7db40f --- /dev/null +++ b/blog/2022-09-25-ductf-file-magic.md @@ -0,0 +1,260 @@ +# DownUnderCTF 2022: File Magic + +A short writeup about my favorite challenge from DUCTF. It took me approximatly +12h to solve. I found it was the most creative and challenging one that i +solved. + +## Task + +The challenge consists of a python script and an ip-port pair which appears to +be running that script. Also the path of the flag is given: `./flag.txt` + +```py +#!/usr/bin/env python3 + +from Crypto.Cipher import AES +from PIL import Image +from tempfile import NamedTemporaryFile +from io import BytesIO +import subprocess, os + +KEY = b'downunderctf2022' + +iv = bytes.fromhex(input('iv (hex): ')) +assert len(iv) == 16 and b'DUCTF' in iv, 'Invalid IV' + +data = bytes.fromhex(input('file (hex): ')) +assert len(data) % 16 == 0, 'Misaligned file length' +assert len(data) < 1337, 'Oversized file length' + +data_buf = BytesIO(data) +img = Image.open(data_buf, formats=['jpeg']) +assert img.width == 13 and img.height == 37, 'Invalid image size' +assert img.getpixel((7, 7)) == (7, 7, 7), 'Invalid image contents' + +aes = AES.new(KEY, iv=iv, mode=AES.MODE_CBC) +dec = aes.decrypt(data) +assert dec.startswith(b'\x7fELF'), 'Not an ELF' + +f = NamedTemporaryFile(delete=False) +f.write(dec) +f.close() + +os.chmod(f.name, 0o777) +pipes = subprocess.Popen([f.name], stdout=subprocess.PIPE) +stdout, _ = pipes.communicate() +print(stdout.decode()) + +os.remove(f.name) +``` + +So, for anything to make it past these checks and be executed it must: + +1. be a valid 13x37 JPEG image with the pixel at 7,7 set to `#070707` +2. be a valid ELF binary that reads `./flag.txt` after decrypting with AES CBC, + fixed key (`downunderctf2022`) and the provided IV +3. The IV must contain `DUCTF` + +During the competition I discovered the information in the next three headings +in parallel but internally in-order. + +## 1. AES CBC "flaw" + +We need to generate a file that is a sort-of polyglot with JPEG and ELF, +converted with AES CBC (Cipher block chaining). + +AES itself operates on 16-byte (for 128-bit AES) blocks, so bigger files are +split and then encrypted separately. To ensure that identical blocks don't +result in identical blocks in ciphertext, each block is first xor'd with +something that won't be identical. In the case of CBC, the last ciphertext block +or the initialisation vector (IV) is used. Here is a diagram for encryption + +``` + ___plaintext____|___plaintext____|___plaintext____|... + v v v +IV--->XOR ,---------->XOR ,--------->XOR ,---- ... + v | v | v | + AES | AES | AES | + v---' v---' v---' + ___ciphertext___|___ciphertext___|___ciphertext___|... +``` + +For decryption we can just flip the diagram and replace AES with reverse AES. + +``` + ___ciphertext___|___ciphertext___|___ciphertext___|... + v---, v---, v---, + ∀EZ | ∀EZ | ∀EZ | + v | v | v | +IV--->XOR '---------->XOR '--------->XOR '---- ... + v v v + ___plaintext____|___plaintext____|___plaintext____|... +``` + +This does make sense, however i noticed that all but the first block do not +depend on IV. This turns out useful since we can turn any block into any other +block by applying a chosen value with XOR. So we can control the ciphertext with +the IV directly as follows: + +- $m$: first plaintext block +- $c$: first ciphertext block + +$$ + +c = AES(m \oplus IV) \\ + +AES^{-1}(c) = m \oplus IV \\ + +AES^{-1}(c) \oplus m = IV + +$$ + +All blocks in ciphertext after the first are now "uncontrollable" because IV and +plaintext are set. + +## 2. JPEG + +JPEG consists of a list of _segments_. Each starts with a marker byte (`ff`) +followed by a identifier and the length of the segment (if non-zero). + +| Identifier | Name | +| ---------- | ----------------------------------------------- | +| `d8` | Start of Image | +| `fe` | Comment | +| `d9` | End of Image | +| ... | _a bunch more that you dont need to know about_ | + +The comment segment is perfect for embedding our ELF binary into JPEG. We can +first generate a JPEG image, then insert a _comment_ somewhere containing any +data we want. + +## 3. ELF Payload + +The binary needs to be super small so creating it "manually" was required. I +followed the guide +[Creating a minimal ELF-64 file by tchajed](https://github.com/tchajed/minimal-elf/) +and recreated it for my needs. Like in the guide i also wrote the assembly with +a rust EDSL. + +```rs +let mut str_end = a.create_label(); +let mut filename = a.create_label(); +a.jmp(str_end)?; // jump over the string +a.set_label(&mut filename)?; +a.db(b"flag.txt\0")?; +a.set_label(&mut str_end)?; + +// open("flag.txt", O_RDONLY) +a.mov(eax, 2)?; +a.lea(rdi, ptr(filename))?; +a.mov(rsi, 0u64)?; +a.syscall()?; // fd -> rax + +// sendfile(1, rax, 0, 0xff) +a.mov(rsi, rax)?; +a.mov(eax, 40)?; +a.mov(rdi, 1u64)?; +a.mov(rdx, 0u64)?; +a.mov(r10, 0xffu64)?; +a.syscall()?; +``` + +I was able to produce a 207 byte long executable. + +## 4. _magic!_ + +Here is how we align the files now (single quotes `'` indicate ASCII +representation for clarity, question marks `?` represent data that is implicitly +defined): + +``` +plaintext: 7f 'E 'L 'F 02 01 01 00 00 00 00 00 00 00 00 00 +iv: ?? ?? ?? ?? ?? ?? 'D 'U 'C 'T 'F 00 00 00 00 00 +ciphertext: ff d8 ff fe {len} ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? +``` + +This scenario is a little more complicated because in some places we define +ciphertext and plaintext and in some we define ciphertext and IV. This is not a +problem because XOR operates on every byte individually. + +All-in-all, the file looks like this now: + +- First block: + - overlapping headers (6 bytes) + - `DUCTF` string (5 bytes) + - padding (5 bytes) +- Rest of the ELF binary +- _end of the jpeg comment_ +- Rest of the JPEG image + +All this information should be enough to solve this challenge! + +I here attach the implementation that i created _during_ the CTF here. I kept it +as messy as it was, just removed not-so-interesting code and added comments. + +```rs +let mut i = image::RgbImage::new(13, 37); +// jpeg is lossy so filling guarantees the pixel actually has the *exact* color +i.pixels_mut().for_each(|p| *p = Rgb([7, 7, 7])); + +let mut imgbuf = Cursor::new(vec![]); +image::codecs::jpeg::JpegEncoder::new(&mut imgbuf) + .encode_image(&i) + .unwrap(); + +let key = Aes128::new(&GenericArray::from(*b"downunderctf2022")); +let mut payload = create_elf_payload(); +let mut buf = BytesMut::new(); + +// pad payload so AES works +while payload.len() % 16 != 0 { + payload.put_u8(0); +} +assert!(payload.len() % 16 == 0); + +let prefix_len = 6; +// write the JPEG headers to start a comment +buf.put_u16(0xffd8); +buf.put_u16(0xfffe); +buf.put_u16(payload.len() as u16 + 2 /*seg len*/ - prefix_len as u16); + +// find a good IV +let iv = { + let mut fblock_target = vec![0u8; 16]; + fblock_target[0..prefix_len].copy_from_slice(&buf[0..prefix_len]); + key.decrypt_block(GenericArray::from_mut_slice(&mut fblock_target)); + let mut iv = xor_slice(&fblock_target, &payload[0..16]); + iv[prefix_len..prefix_len + 5].copy_from_slice(b"DUCTF"); + iv +}; + +// fill the first block up with zeroes +for _ in prefix_len..16 { + buf.put_u8(0); +} + +// encrypt starting with the 2nd block +buf.put(&payload[16..]); +let block_range = |n: usize| (n) * 16..(n + 1) * 16; +for i in 1..buf.len() / 16 { + let tb = Vec::from(&buf[block_range(i - 1)]); + xor_assign(&mut buf[block_range(i)], &tb); + key.encrypt_block(GenericArray::from_mut_slice(&mut buf[block_range(1)])); +} + +// append the rest of the image, stripping the first segment +buf.put(&imgbuf.into_inner()[2..]); + +// pad the final buffer again because the image might not be aligned +while buf.len() % 16 != 0 { + buf.put_u8(0); +} +assert!(buf.len() < 1337); + +File::create("image").unwrap().write_all(&buf).unwrap(); +File::create("iv").unwrap().write_all(&iv).unwrap(); +``` + +I am also still looking for team mates for upcoming CTF events and would be +happy to hack together with you! Just [contact](https://metamuffin.org/contact) +me. diff --git a/blog/2022-11-07-programming-language-design.md b/blog/2022-11-07-programming-language-design.md new file mode 100644 index 0000000..674e696 --- /dev/null +++ b/blog/2022-11-07-programming-language-design.md @@ -0,0 +1,70 @@ +# Some Thoughts on Programming Language Design + +This is a collection of ideas to look at when inventing new langauges. + +## Other Ideas + +- The Language pushes abstraction to the limit by not noting any + hardware-related issues like memory-allocations, parallelism, heterogenous + computer architecture (CPU, GPU, …) + - requires a very "intellegent" compiler and a way to describe unknowns like + possible inputs, etc. in the language itself +- Start with assembly but add a very flexible macro system + +## Type System + +```diff +# Haskell +data LinkedList a = Nil | Cons a (Box (LinkedList a)) +data Test = Empty | Blub Int | State { x :: Int, y :: Int } +# Rust +enum LinkedList<T> { Nil, Cons(T, LinkedList<T>) } +``` + +## Memory Management + +- **Drop when out-of-scope** +- Garbage collections +- Reference counting + +## Compile-time logic + +- Annotation when calling function to be run as-far-as-possible at comptime + +```diff +fn format(template: String, args: [String]) -> String { + template.replace("@", (match, i) => args[i]) +} + +fun add(x, y) x + y + +fun main() print(format!("@ ist @; @", ["1+1", 1+1, x])) +# should expand to +fun main() print("1+1 ist 2; " ~ x)) +``` + +## Examples + +### Fizz-Buzz + +```diff +for (n in 0..100) { + if (n % (3*5) == 0) print("FizzBuzz") + else if (n % 3 == 0) print("Fizz") + else if (n % 5 == 0) print("Buzz") + else print(n) +} + + +if (true) x = 1 +if (true) { x = 1 } +``` + +``` +f(x) = 10 + g(x) +f x = 10 + g x + +main = { + +} +``` diff --git a/blog/2022-11-10-artist-correlation.md b/blog/2022-11-10-artist-correlation.md new file mode 100644 index 0000000..d52e613 --- /dev/null +++ b/blog/2022-11-10-artist-correlation.md @@ -0,0 +1,78 @@ +# Correlating music artists + +I listen to a lot of music and so every few months my music collection gets +boring again. So far I have asked friends to recommend me music but I am running +out of friend too now. Therefore I came up with a new solution during a few +days. + +I want to find new music that i might like too. After some research I found that +there is [Musicbrainz](https://musicbrainz.org/) (a database of all artists and +recordings ever made) and [Listenbrainz](https://listenbrainz.org/) (a service +to which you can submit what you are listening to). Both databases are useful +for this project. The high-level goal is to know, what people that have a lot of +music in common with me, like to listen to. For that the shared number of +listeners for each artist is relevant. I use the word 'a listen', to refer to +one playthrough of a track. + +## The Procedure + +### Parse data & drop unnecessary detail + +All of the JSON files of listenbrainz are parsed and only information about how +many listens each user has submitted for what artist are kept. The result is +stored in a B-tree map on my disk (the +[sled library](https://crates.io/crates/sledg) is great for that). + +- First mapping created: `(user, artist) -> shared listens`. +- (Also created a name lookup: `artist -> artist name`) + +The B-Tree stores values ordered, such that i can iterate through all artists of +a user, by scanning the prefix `(user, …`. + +### Create a graph + +Next an undirected graph with weighted edges is generated where nodes are +artists and edges are shared listens. For each user, each edge connecting +artists they listen to, the weight is incremented by the sum of the logarhythms +of either one's playthrough count for that user. This means that artists that +share listeners are connected and because of the logarhythms, users that listen +to an artist _a lot_ won't be weighted proportionally. + +Mapping: `(artist, artist) -> weight`. (Every key `(x, y)` is identical with +`(y, x)` so that edges are undirectional.) + +### Query artists + +The graph tree can now be queried by scanning with a prefix of one artist +(`("The Beatles", …`) and all correlated artists are returned with a weight. The +top-weighted results are kept and saved. + +### Notes + +Two issues appeared during this project that lead to the following fixes: + +- Limit one identity to 32 artists at most because the edge count grows + quadratically (100 artists -> 10000 edges) +- When parsing data the user id is made dependent of the time to seperate arists + when music tastes changing over time. Every 10Ms (~4 months) the user ids + change. + +## Results + +In a couple of minutes I rendered about 2.2 million HTML documents with my +results. They are available at `https://metamuffin.org/artist-correl/{name}`. +Some example links: + +- [The Beatles](https://metamuffin.org/artist-correl/The%20Beatles) +- [Aimer](https://metamuffin.org/artist-correl/Aimer) +- [Rammstein](https://metamuffin.org/artist-correl/Rammstein) +- [Mitski](https://metamuffin.org/artist-correl/Mitski) + +## Numbers + +- Musicbrainz: 15GB +- Listenbrainz: 350GB +- Extracted listening data: 23GB +- Graph: 56GB +- Rendered HTML: 2.3GB +- Compressed HTML (squashfs with zstd): 172MB diff --git a/blog/2023-02-13-new-website-using-gnix.md b/blog/2023-02-13-new-website-using-gnix.md new file mode 100644 index 0000000..04cdc02 --- /dev/null +++ b/blog/2023-02-13-new-website-using-gnix.md @@ -0,0 +1,103 @@ +# New Website and gnix + +_fixme: probably contains a lot of errors, shouldn't have written this late_ + +Last weekend I started a new attempt writing a reverse proxy: This time, with +success! I have been able to finally replace nginx for all services. +Additionally I now have a wildcard TLS certificate for all of +`*.metamuffin.org`. + +The cgit instance is no longer available since it used CGI, which gnix does not +support nor I like. + +## The reverse-proxy + +Nginx was not optimal because I found it was hard to configure, required certbot +automatically chaning the config and was also just _too much_ for my use case. +(Who needs a http server that can also serve SMTP?!) + +My new solution ([gnix](https://codeberg.org/metamuffin/gnix)) has very limited +configuration abilities for now but just enough to work. I simplified about 540 +lines of `/etc/nginx/nginx.conf` to only 20 lines of `/etc/gnix.toml` (yesss. +TOML. of course it is.). The Proxy now only acts as a "Hostname Demultiplexer". +A configuration could look like this: + +```toml +[http] +bind = "0.0.0.0:80" + +[https] +bind = "0.0.0.0:443" +tls_cert = "/path/to/cert.pem" +tls_key = "/path/to/key.pem" + +[hosts] +"domain.tld" = { backend = "127.0.0.1:18000" } +"www.domain.tld" = { backend = "127.0.0.1:18000" } +"keksmeet.domain.tld" = { backend = "127.0.0.1:18001" } +"otherdomain.tld" = { backend = "example.org:80" } +``` + +I am running two gnix instances now, one for `:80`+`:443` and another for matrix +federation on `:8448`. Additionally this required me to move my matrix +homeserver from `https://metamuffin.org/_matrix` to +`https://matrix.metamuffin.org/_matrix` via the `.well-known/matrix/server` +file. And that intern required me to host a file there, which was nginx' job +previously. At this point I started rewriting my main website. + +## Wildcard Certificates + +Another inconvinience was that I would need `certbot` to aquire one certificate +for each subdomain. Letsencrypt offers wildcard certificates; These can be +obtained by solving an ACME challenge that requires changing a DNS record (to +prove you own the domain). My current registrar (Namecheap) does not offer me an +API for automatically applying these though. They do however (through a very +very confusing, badly designed user interface) allow me to set a custom +nameserver. By setting the nameserver to `144.91.114.82` (IP address of my VPS) +the server can run its own nameserver that has authority over resolving +`metamuffin.org`. I used BIND9's `named` to do that and also dynamically update +records. + +```conf +# /etc/named.conf (-rw-------; owned by named) +zone "metamuffin.org" IN { + type master; + # the zone file is trivial to configure, look it up somewhere else. :) + file "metamuffin.org.zone"; + update-policy { + # only allow certbot to change TXT records of _acme-challenge.metamuffin.org + grant certbot. name _acme-challenge.metamuffin.org. TXT; + }; +}; + +# generated with `tsig-keygen -a HMAC-SHA512 -n HOST certbot` +key "certbot" { + algorithm hmac-sha512; + secret "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +} +``` + +Then certbot can be configured to use these credentials for solving challenges: + +```ini +# /etc/certbot/rfc2136.ini (-rw-------; owned by root) +dns_rfc2136_server = 127.0.0.1 +dns_rfc2136_port = 53 +dns_rfc2136_name = certbot +dns_rfc2136_secret = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +dns_rfc2136_algorithm = HMAC-SHA512 +``` + +Now you can automatically request new wildcard certificates by running +`doas certbot certonly --dns-rfc2136 --dns-rfc2136-credentials /etc/letsencrypt/rfc2136.ini -d '*.domain.tld' -d 'domain.tld' --server https://acme-v02.api.letsencrypt.org/directory` + +## Rewrite of my website + +As mentioned above, I replace my former Deno + pug.js + static file server setup +with a custom rust application (using Rocket and Markup and 253 other +dependencies). I rewrote my blog rendering system too, that why you don't see +syntax highlighting right now. + +## End + +In case of questions, ask me. Have fun suffering with the modern web! diff --git a/blog/2024-05-03-replaced-infra.md b/blog/2024-05-03-replaced-infra.md new file mode 100644 index 0000000..1177d7b --- /dev/null +++ b/blog/2024-05-03-replaced-infra.md @@ -0,0 +1,107 @@ +# infra - my homebrew package and configuration manager + +The last 8 months I was configuring my server with my own little package manager +[`infra`](https://codeberg.org/metamuffin/infra) before just recently replacing +it again a few days ago for reasons I will mention later. This had multiple +reasons; primarily that I want to version control all configuration of all my +servers (the VPS and a Raspi) from one source-controlled repository. + +## infra good + +My "package manager" was actually more like a library where one would write code +to specify how the machines were set up. This is similar to how Nix or Guix do +it. My implementation however was written in Rust and initially hacked together +in a few hours. Let's look at an example: + +```rs +// You would pass credentials to the machine here +let m = Machine::new(...); + +// Load a minimal gnix config without any hosts. +let mut gnix = Gnix::load(include_str!("gnix_base.yaml")) + +m.install(Fastbangs { + // Here gnix automatically allocates a new port for internal proxying. + bind_addr: gnix.new_host("search.metamuffin.org"), + data_dir: "/var/local/fastbangs".into(), + ..Default::default() +}.service()); + +m.eu1.install(MetamuffinWebsite { + bind_addr: eu1_gnix.new_host("metamuffin.org"), +}.service()); // `service` transforms the mere software configuration to a systemd service that uses it. + +m.install(gnix); +``` + +Infra would for this example automatically download, compile, install, configure +and start/enable required services. It was a total solution. The current state +of each machine (i.e. installed packages) was tracked locally. Whenever the +deployment specification changes, a diff is calculated and applied +incrementally. Applying an installation is very general term in infra, it could +mean placing some configs somewhere but also starting and stopping systemd +services or whatever. + +Procedurally generating the server configuration had more advantages than not +struggling with port numbers, I could also create fully meshed Wireguard VPNs +with ease. Something that is considerably more pain if done manually. The +following excerpt creates such a network, automatically assigns IP addresses and +even writes hostnames to `/etc/hosts`. + +```rs +let mut hosts = HostsFile::default(); +let mut wg_myservers_subnet = IpSubnet([10, 123, 0, 0].into(), 16); +let wg_myservers = WireguardMesh::new("myservers", 16); +server1.install(wg_myservers.add_peer( + hosts.register(wg_myservers_subnet.next(), "server1"), + "server1.example.org:12345".into(), + "SECRET VALUE GOES HERE" +)); +server2.install(wg_myservers.add_peer( + hosts.register(wg_myservers_subnet.next(), "server2"), + "server2.example.org:12345".into(), + "SECRET VALUE GOES HERE" +)); +server3.install(wg_myservers.add_peer( + hosts.register(wg_myservers_subnet.next(), "server2"), + "server3.example.org:12345".into(), + "SECRET VALUE GOES HERE" +)) +for s in [server1, server2, server3] { + s.install(hosts); +} +``` + +## infra bad + +Like mentioned the state was tracked locally, which meant I was restricted to a +single machine for maintaining my server. + +Also, and this is the worst part, infra would manage the server by connecting +via SSH and executing random commands through a simple shell wrapper. This +process will not take any feedback about the success about what it did. +Obviously all commands are executed intelligently but if the connection broke or +something else destabilized the system, there was no way to fix it trivially. + +Another problem was transparency. Although infra allows exporting an overview of +your deployment as a directed graph, it still didn't suffice for a good +understanding about what was configured where. Sometimes I would install two +packages that wrote to the same configuration - something that infra does not +worry about - and get unexpected results. + +It could also be considered a minor problem, that some configuration files just +don't prettier when written with a Rust DSL. + +## infra useless? + +`infra` is flawed. It just doesn't work if you have anything serious to +maintain. However the basic concept of generating configuration from code is +quite nice and were somewhat elegant to use sometimes. + +In the last week I replaced infra in my deployments with a different system that +I will describe in the next article. Going forward though I am thinking of +taking the best from infra and turning it into a static configuration and script +generator to be used in the new system. + +That's that. If you have any interesting feedback or thoughts on this topic, +please [reach out](/contact). diff --git a/blog/2024-11-28-optimal-computer-part-1.md b/blog/2024-11-28-optimal-computer-part-1.md new file mode 100644 index 0000000..27f1ce1 --- /dev/null +++ b/blog/2024-11-28-optimal-computer-part-1.md @@ -0,0 +1,137 @@ +# My dream computer (Part 1: Processor architecture) + +## Preamble + +For multiple years now I have had a vision for how a perfect operating system +should be designed. The specifics transformed slightly over the years but have +generally stood the same. However I have never actually gotten to implement this +design that envisioned, because of some or another problem that was hard to +solve at the time. I have still learned many things with my failed attempts and +considered more radical ideas too. In my continuing efforts in implementing my +ideas some day I want to write my most important thoughts on this topic in the +next few days because I realized that a problem of such great complexity is hard +to solve just within my head. These notes should be helpful for me but may also +interest others and so are published here. + +During my time of failing to implement the thing I found myself questioning +lower-level things a lot and so reevaluated these too and came to the conclusion +that these should be redesigned aswell. For my overview I will therefore start +from the bottom. + +In the rest of this article I am also just writing what I think is true or close +to the truth even for topics that I know less about. So view the text below as +pure speculation. I expect some things to be wrong. In that case, please tell +me. + +## Content + +My goal is it to design a _Computer system_ (You should know what that means to +you.). The heart of the physical part of this machine is a _Processor_, the +remaining parts store data or interface with the outside world or user and are +of less interest to me. Software is also important and I will write more about +this in the next posts. + +For performing the actual computations many design principles have been found in +the past: You could use a mechanical contraption, DNA/Protein's biochemical +reactions or anything really. Electric circuits however are most useful and +widely deployed today and since I do not have the expertise, I am not +reconsidering at this level. + +With electronic semiconductor logic gates you can arrange circuits in form of a +silicon die that perform most arithmetic and logic operations. The arrangement +of those gates on such a die is immutable however, meaning it is not possible to +be reprogrammed in that way. It is therefore required to build a circuit that is +general-purpose and can be programmed with data ("software"). + +This problem has been approached from multiple sides before. An FPGA is where +relatively small clusters of gates can be arranged to circuits by switching +connecting gates (that's a simplification). [Write how "traditional" CPUs work] +In the end there are many ways to achieve the required semi-turing-completeness +required for a computer. The performance of these does differ though. From +observing optimization in current CPUs it seems that the **useful computation +per space per time** matters most. The minimum time interval for computations +(cpu clock) does primarily depend on the size of the die (which is constraint by +the manufacturing technology which I consider fixed) and distance of components +on the die. A major part in optimizing _computational density_ of a processor is +keeping all parts as busy with computation as possible. + +I see a tradeoff between having small reconfigurable parts (like FPGAs) where +the overhead of reconfiguration is large (as in: many "useless" gates for +programming) and big parts where you lack the flexibility optimize the software. +In an unoptimized basic CPU for example, only one part would active at a time. +(The ADD instruction only performs an addition while other destinct components +like the multiplier, logic unit or memory are idle). Modern CPU design avoid +this to some extent with pipelining, speculative execution and simultaneous +multithreading which however introduce new complexity and also overhead for this +coordination. Also the program execution timing varies at runtime which +introduces additional problems. The concept of _Very Long Instruction Word_ +architectures appeals to me. It describes architectures where an instruction +specifies the configuration of most (usually all) components of the processor at +once. + +[Skipping a few steps because its already 4 am...] Next I am describing my +design: Firstly the processor is made up of a number of _modules_ that have +_inputs_, _outputs_ and _parameters_. These modules' inputs are then connected +with data multiplexers to allow abitrary cross-module data flow. Parameters of +modules are bits that configure the modules operating within one clock cycle of +the processor. These parameters also include an output index for each input of +the module to obtain the data for this cycle from. The processor operates in +clock cycles where each cycle a new instruction is loaded and executed. This +module system is very flexible; Here are a few examples of useful modules for a +processor: + +- Add/Sub unit: Two inputs and one output. A flag to switch subtract mode. +- Literal loader: One output set to a value set by 32 or so parameter bits. + Essentially providing a way to introduce new constants from program code +- Memory loader: One input (address) and an output that takes on the value of + the RAM at the provided address. +- Flow controller: Two inputs, a condition and a program counter value, that set + the PC when a condition is met, otherwise increments the PC as normal. +- Memory storer: (left as an exercise to the reader) +- Logic unit +- Mul/Div unit +- Floating-point unit + +To balance the load between modules, the most busy units can be contained +multiple times within the processor, allowing for example to perform two +addition per cycle. + +Additionally, since typical RAM is rather slow, it is also possible to introduce +a _latency_ to some modules like that memory loader that need main memory where +there is internal uninterupted pipelining for memory fetches such that, for +example memory fetches arrive with 4 cycles delay and jumps happen 4 cycles +after beeing issued. This always assumes the worst case memory latency and can +not utilise a cache. You could however reimplement a cache manually be adding +secondary "fast" memory that is local but smaller where you load data into with +software. + +Still current superscalar CPUs can be smarter about module load balancing and +memory caching because of their runtime knowledge, that a compiler does not +have. In general, writing a _good_ compiler for this architecture (assuming a +traditional language) is relatively hard. + +I am already visualizing code for such a processor in my head in a table with +time and module axis. For some later post or development I might generate such +diagrams from code to think about about. (will probably look super cool) + +## End + +Thats it for today. The writing of this article has been motivated by me +"participating" in +[Macoy Madson's Simple Useful System Challenge](https://macoy.me/blog/programming/SimpleUsefulSystem). +As usual I am always happy to receive feedback about what I am writing here. +[Send your thoughts!](https://metamuffin.org/contact) (any method is fine) + +Next article will be more about my ideas about software. The overview is: + +- Compiler/Language design + - Memory safety + - Type systems + - Representing hardware execution/performance characteristics + - Memory management + - Data flow oriented programming +- Software design + - Permission checks at compile-time + - Cooperative multithreading asserted by compiler + - No driver-program boundary + - Global Safety diff --git a/contact.md b/contact.md new file mode 100644 index 0000000..9ba3a44 --- /dev/null +++ b/contact.md @@ -0,0 +1,9 @@ +# Conact + +You can reach out to me in a bunch of ways. Don't hesitate to contact me for any +kind of reason! + +- matrix: [@metamuffin:metamuffin.org](https://matrix.to/#/@metamuffin:metamuffin.org) +- fedi: [@metamuffin@social.metamuffin.org](https://social.metamuffin.org/@metamuffin) +- electronic mail: [metamuffin@disroot.org](mailto:metamuffin@disroot.org) +- telepathy: come on, just try hard enough diff --git a/index.md b/index.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/index.md diff --git a/makefile b/makefile new file mode 100644 index 0000000..820adad --- /dev/null +++ b/makefile @@ -0,0 +1,7 @@ + +HTML = $(patsubst %.md,%.html,$(shell find -name '*.md')) + +all: $(HTML) + +%.html: %.md process.py template.html + python process.py $< $@ diff --git a/process.py b/process.py new file mode 100644 index 0000000..1c84810 --- /dev/null +++ b/process.py @@ -0,0 +1,29 @@ +import re +from sys import argv +from os import popen +from markdown import markdown +import subprocess + +PROCESSORS = { + "ex": lambda c: popen(c).read(), + "exmd": lambda c: markdown(popen(c).read()) +} + +def run_pi(input: str) -> str: + RE_PI = r"(?sm)\<\?(?P<name>\w+)\W(?P<body>.*)\?\>" + def run_pi_match(m: re.Match): + name = m.group("name") + body = m.group("body") + output = PROCESSORS[name](body) + return output + return re.sub(RE_PI, run_pi_match, input) + +def template(input: str) -> str: + tpl = open("template.html", "r").read() + return tpl.replace("CONTENT", input).replace("TITLE", "TODO TITLE") + +doc = open(argv[1], "r").read() +doc = markdown(doc) +doc = template(doc) +doc = run_pi(doc) +open(argv[2], "w+").write(doc) diff --git a/src/blog/atom.rs b/src/blog/atom.rs deleted file mode 100644 index a29ffb1..0000000 --- a/src/blog/atom.rs +++ /dev/null @@ -1,75 +0,0 @@ -use super::{ - helper::{get_articles, ArticleMeta}, - rocket_uri_macro_r_blog_article, rocket_uri_macro_r_blog_index, ARTICLE_ROOT, -}; -use crate::{error::MyResult, uri}; -use rocket::get; -use std::{path::PathBuf, str::FromStr}; - -#[get("/blog/feed.atom")] -pub async fn r_blog_atom() -> MyResult<String> { - let entries = get_articles(&PathBuf::from_str(ARTICLE_ROOT).unwrap()) - .await? - .iter() - .map( - |ArticleMeta { - title, - date, - canonical_name, - .. - }| { - let title = horrible_escape_function(title); - let datetime = iso8601::DateTime { - date: date.clone(), - time: iso8601::Time::default(), - }; - let href = uri!(r_blog_article(canonical_name)); - format!( - r#" - <entry> - <title>{title}</title> - <link href="{href}" /> - <id>tag:metamuffin.org,{date},{canonical_name}</id> - <published>{datetime}</published> - <summary>N/A</summary> - <author> - <name>metamuffin</name> - <email>metamuffin@disroot.org</email> - </author> - </entry>"# - ) - }, - ) - .collect::<Vec<_>>(); - - let feed_url = uri!(r_blog_atom()); - let index_url = uri!(r_blog_index()); - let now = chrono::Utc::now().to_rfc3339(); - - Ok(format!( - r#"<?xml version="1.0" encoding="utf-8"?> -<feed xmlns="http://www.w3.org/2005/Atom"> - <title>metamuffin's blog</title> - <subtitle>where they post pointless stuff</subtitle> - <link href="{feed_url}" rel="self" /> - <link href="{index_url}" /> - <id>urn:uuid:3cf2b704-3d94-4f1f-b194-42798ab5b47c</id> - <updated>{now}</updated> - <author> - <name>metamuffin</name> - <email>metamuffin@disroot.org</email> - </author> - {} -</feed> - "#, - entries.join("\n") - )) -} - -pub fn horrible_escape_function(text: &str) -> String { - text.replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("'", "’") - .replace("\"", """) -} diff --git a/src/blog/helper.rs b/src/blog/helper.rs deleted file mode 100644 index 35396c0..0000000 --- a/src/blog/helper.rs +++ /dev/null @@ -1,72 +0,0 @@ -use anyhow::{anyhow, Context}; -use futures::future::join_all; -use std::{ - path::{Path, PathBuf}, - process::Stdio, -}; -use tokio::{ - fs::File, - io::{AsyncBufReadExt, BufReader}, - process::Command, -}; - -#[derive(Clone)] -pub struct ArticleMeta { - pub title: String, - pub canonical_name: String, - pub date: iso8601::Date, -} - -pub async fn article_metadata(path: PathBuf) -> anyhow::Result<ArticleMeta> { - let f = File::open(&path).await.context("article not found")?; - let mut f = BufReader::new(f); - let mut buf = String::new(); - f.read_line(&mut buf).await.context("cant read the file")?; // assume the 1st line has the title - Ok(ArticleMeta { - title: String::from(buf[2..].trim()), - canonical_name: path - .file_stem() - .ok_or(anyhow!("no file stem"))? - .to_str() - .ok_or(anyhow!("this file's name is broken"))? - .to_string(), - date: iso8601::date( - &path - .file_name() - .ok_or(anyhow!("file has no name"))? - .to_str() - .ok_or(anyhow!("this file's name is broken"))?[0..10], - ) - .map_err(|e| anyhow!("file date wrong: {e}"))?, - }) -} - -pub async fn get_articles(blog_root: &Path) -> anyhow::Result<Vec<ArticleMeta>> { - let mut a = join_all( - std::fs::read_dir(blog_root)? - .map(|e| e.unwrap()) - .map(|e| article_metadata(e.path())), - ) - .await - .into_iter() - .collect::<anyhow::Result<Vec<_>>>()?; - a.sort_by_cached_key(|e| -match e.date { - iso8601::Date::YMD { year, month, day } => day as i32 + month as i32 * 100 + year * 10000, - _ => unreachable!(), - }); - Ok(a) -} - -// TODO use this somewhere -pub async fn file_history(filename: &str) -> String { - String::from_utf8( - Command::new("/usr/bin/git") - .args(&["log", "--follow", "--pretty=tformat:%as %h %s", filename]) - .stdout(Stdio::piped()) - .output() - .await - .unwrap() - .stdout, - ) - .unwrap() -} diff --git a/src/blog/mod.rs b/src/blog/mod.rs deleted file mode 100644 index b3ab5a4..0000000 --- a/src/blog/mod.rs +++ /dev/null @@ -1,146 +0,0 @@ -pub mod atom; -pub mod helper; - -use self::helper::{article_metadata, get_articles}; -use crate::error::MyResult; -use crate::layout::{DynScaffold, Scaffold}; -use crate::uri; -use anyhow::anyhow; -pub use atom::r_blog_atom; -use atom::rocket_uri_macro_r_blog_atom; -use latex2mathml::DisplayStyle; -use markdown::mdast::Node; -use markup::{raw, DynRender}; -use rocket::{get, response::Redirect}; -use std::{path::PathBuf, str::FromStr}; -use syntect::highlighting::ThemeSet; -use syntect::html::highlighted_html_for_string; -use syntect::parsing::SyntaxSet; -use tokio::fs::read_to_string; - -pub const ARTICLE_ROOT: &'static str = "./blog/articles"; -pub const ASSET_ROOT: &'static str = "./blog/assets"; - -#[get("/blog")] -pub fn r_blog() -> Redirect { - Redirect::to(rocket::uri!(r_blog_index())) -} - -#[get("/blog/index")] -pub async fn r_blog_index() -> MyResult<DynScaffold<'static>> { - // TODO this is a major performance issue here. requires O(n) syscalls to complete - let articles = get_articles(&PathBuf::from_str(ARTICLE_ROOT).unwrap()).await?; - Ok(Scaffold { - title: "blog index".to_string(), - content: markup::new! { - h2 { "The Weblog" } - p { i { "Articles in reverse-chronological order." } } - p { a[href=uri!(r_blog_atom())]{ "Atom feed" } } - ul { - @for a in &articles { - li { - @a.date.to_string() ": " - a[href=uri!(r_blog_article(&a.canonical_name))] { @a.title } - } - } - } - }, - }) -} - -#[get("/blog/<name>")] -pub async fn r_blog_article(name: &str) -> MyResult<DynScaffold<'static>> { - let apath = PathBuf::from_str(ARTICLE_ROOT) - .unwrap() - .join(PathBuf::new().with_file_name(name).with_extension("md")); - let a = article_metadata(apath.clone()).await?; - let text = read_to_string(apath).await?; - let ast = markdown::to_mdast( - &text, - &markdown::ParseOptions { - constructs: markdown::Constructs { - math_flow: true, - math_text: true, - ..Default::default() - }, - ..Default::default() - }, - ) - .map_err(|e| anyhow!("the server had trouble parsing markdown: {e}"))?; - - Ok(Scaffold { - title: a.title, - content: markup::new! { - @node_to_render(&ast) - p{i{ "Article written by metamuffin, text licenced under CC BY-ND 4.0, non-trivial code blocks under GPL-3.0-only except where indicated otherwise" }} - }, - }) -} - -fn node_to_render<'a>(node: &'a Node) -> DynRender<'a> { - match node { - Node::Text(s) => markup::new!(@s.value), - Node::Paragraph(el) => markup::new!(p { @for e in &el.children { @node_to_render(e) } }), - Node::List(list) => markup::new!(ul { @for e in &list.children { @node_to_render(e) } }), - Node::Root(el) => markup::new!(article { @for e in &el.children { @node_to_render(e) } }), - Node::ListItem(el) => markup::new!(li { @for e in &el.children { @node_to_render(e) } }), - Node::Emphasis(el) => markup::new!(i { @for e in &el.children { @node_to_render(e) } }), - Node::Strong(el) => markup::new!(strong { @for e in &el.children { @node_to_render(e) } }), - Node::Html(html) => markup::new!(@raw(&html.value)), - Node::Link(l) => { - markup::new!(a[href=&l.url, alt=&l.title] { @for e in &l.children { @node_to_render(e) } }) - } - Node::Break(_) => markup::new!(br;), - Node::InlineCode(s) => markup::new!(code { @s.value }), - Node::Delete(_) => markup::new!("todo1"), - Node::FootnoteReference(_) => markup::new!("todo3"), - Node::FootnoteDefinition(_) => markup::new!("todo4"), - Node::Image(_) => markup::new!("todo5"), - Node::ImageReference(_) => markup::new!("todo6"), - Node::LinkReference(_) => markup::new!("todo8"), - Node::Blockquote(_) => markup::new!("todo10"), - Node::Table(_) => markup::new!("todo12"), - Node::ThematicBreak(_) => markup::new!("todo13"), - Node::TableRow(_) => markup::new!("todo14"), - Node::TableCell(_) => markup::new!("todo15"), - Node::Definition(_) => markup::new!("todo16"), - Node::Toml(_) - | Node::Yaml(_) - | Node::MdxjsEsm(_) - | Node::MdxJsxFlowElement(_) - | Node::MdxJsxTextElement(_) - | Node::MdxTextExpression(_) - | Node::MdxFlowExpression(_) => markup::new!("unsupported"), - Node::Heading(h) => { - let inner = markup::new!(@for e in &h.children { @node_to_render(e) }); - match h.depth { - 1 => markup::new!(h2{@inner}), - 2 => markup::new!(h3{@inner}), - 3 => markup::new!(h4{@inner}), - 4 => markup::new!(h5{@inner}), - 5 => markup::new!(h6{@inner}), - 6 => markup::new!(h6{@inner}), - _ => unreachable!(), - } - } - Node::Code(code) => { - let theme = &ThemeSet::load_defaults().themes["base16-ocean.dark"]; - let syntax = &SyntaxSet::load_defaults_newlines(); - let lang = syntax - .find_syntax_by_extension(&code.lang.to_owned().unwrap_or("txt".to_owned())) - .unwrap_or_else(|| syntax.find_syntax_by_extension("txt").unwrap()); - let html = highlighted_html_for_string(&code.value, syntax, lang, theme).unwrap(); - markup::new!(@raw(&html)) - } - Node::Math(s) => { - let mathml = latex2mathml::latex_to_mathml(&s.value, DisplayStyle::Block) - .expect("invalid block math"); - markup::new!(@raw(&mathml)) - } - Node::InlineMath(s) => { - let mathml = latex2mathml::latex_to_mathml(&s.value, DisplayStyle::Inline) - .expect("invalid inline math"); - markup::new!(@raw(&mathml)) - } - } -} diff --git a/src/error.rs b/src/error.rs deleted file mode 100644 index b6fb84e..0000000 --- a/src/error.rs +++ /dev/null @@ -1,59 +0,0 @@ -use std::fmt::Display; - -use crate::layout::{DynScaffold, Scaffold}; -use rocket::{ - catch, - http::Status, - response::{self, Responder}, - Request, -}; - -#[catch(default)] -pub fn r_catch<'a>(status: Status, _request: &Request) -> DynScaffold<'a> { - Scaffold { - title: "Error".to_string(), - content: markup::new! { - h2 { "Error" } - p { @format!("{status}") } - }, - } -} - -pub type MyResult<T> = Result<T, MyError>; - -#[derive(Debug)] -pub struct MyError(pub anyhow::Error); - -impl<'r> Responder<'r, 'static> for MyError { - fn respond_to(self, req: &'r Request<'_>) -> response::Result<'static> { - Scaffold { - title: "Error".to_string(), - content: markup::new! { - h2 { "An error occured. Nobody is sorry" } - pre.error { @format!("{:?}", self.0) } - }, - } - .respond_to(req) - } -} - -impl Display for MyError { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - self.0.fmt(f) - } -} -// impl<T: std::error::Error> From<T> for MyError { -// fn from(err: T) -> MyError { -// MyError(anyhow::anyhow!("{err}")) -// } -// } -impl From<std::io::Error> for MyError { - fn from(err: std::io::Error) -> MyError { - MyError(anyhow::anyhow!("{err}")) - } -} -impl From<anyhow::Error> for MyError { - fn from(err: anyhow::Error) -> MyError { - MyError(err) - } -} diff --git a/src/layout.rs b/src/layout.rs deleted file mode 100644 index 637e2fc..0000000 --- a/src/layout.rs +++ /dev/null @@ -1,104 +0,0 @@ -/* -This file is part of metamuffins website (https://codeberg.org/metamuffin/website) -which is licensed under the GNU Affero General Public License (version 3); see /COPYING. -Copyright (C) 2023 metamuffin <metamuffin.org> -*/ - -use crate::blog::rocket_uri_macro_r_blog; -use crate::pages::{ - rocket_uri_macro_r_about, rocket_uri_macro_r_contact, rocket_uri_macro_r_pgp_key, - rocket_uri_macro_r_stuff, -}; -use crate::projects::rocket_uri_macro_r_projects; -use crate::source::rocket_uri_macro_r_source; -use crate::uri; -use markup::{raw, Render}; -use rocket::{ - http::ContentType, - response::{self, Responder}, - Request, Response, -}; -use std::io::Cursor; - -markup::define! { - ScaffoldImpl<Main: Render>( - title: String, - main: Main, - noimg: bool, - ) { - @markup::doctype() - html[lang="en"] { - head { - title { @title " - " "metamuffin's website" } - meta[name="viewport", content="width=device-width, initial-scale=1.0"]; - meta[name="description", content="metamuffin's personal website"]; // TODO - link[rel="stylesheet", href="/style.css"]; - } - body { - @if !noimg { img[ - src="https://s.metamuffin.org/avatar/default-512.webp", - alt="a muffin with purple glowing regions where a 3d vornoi function using chebychev distance exceeds some threshold", - align="left", - height=80, - width=80, - hspace=10, - ]; } - h1 { "metamuffin's personal website" } - nav { - a[href=uri!(r_about())] { "About" } " " - a[href=uri!(r_blog())] { "Blog" } " " - a[href=uri!(r_projects())] { "Projects" } " " - a[href=uri!(r_contact())] { "Contact" } " " - a[href=uri!(r_stuff())] { "Stuff" } " " - a[href="https://codeberg.org/metamuffin"] { "Codeberg" } " " - a[href=uri!(r_pgp_key())] { "PGP-Key" } " " - } - hr; - article { @main } - hr; - footer { - p { - "metamuffin's website; version " @include_str!("../.git/refs/heads/main")[0..10] "; " - "sources available on " a[href=uri!(r_source())] { "this page itself" } - " and on " a[href="https://codeberg.org/metamuffin/metamuffin-website"] { "codeberg" } - } - } - hr; - @if !noimg { - details.ad { summary { "Advertisement by a first-party" } - iframe[loading="lazy", src="https://adservices.metamuffin.org/v1/embed?s=metamuffin.org", style="width:728px;height:90px;border:none;"] {} - } - details.ad { summary { "Advertisement by a third-party" } - iframe[loading="lazy", src="https://john.citrons.xyz/embed?ref=metamuffin.org", style="width:732px;height:94px;border:none;"] {} - } - script { @raw("document.querySelectorAll(\".ad\").forEach(e=>e.open=true) // evil js enables ads hehe") } - } - } - } - } -} - -pub type DynScaffold<'a> = Scaffold<markup::DynRender<'a>>; - -pub struct Scaffold<T> { - pub title: String, - pub content: T, -} - -impl<'r, Main: Render> Responder<'r, 'static> for Scaffold<Main> { - fn respond_to(self, _req: &'r Request<'_>) -> response::Result<'static> { - let mut out = String::new(); - ScaffoldImpl { - main: self.content, - noimg: self.title == "Source", - title: self.title, - } - .render(&mut out) - .unwrap(); - - Response::build() - .header(ContentType::HTML) - .streamed_body(Cursor::new(out)) - .ok() - } -} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index b380491..0000000 --- a/src/main.rs +++ /dev/null @@ -1,67 +0,0 @@ -/* - This file is part of metamuffins website (https://codeberg.org/metamuffin/website) - which is licensed under the GNU Affero General Public License (version 3); see /COPYING. - Copyright (C) 2023 metamuffin <metamuffin.org> -*/ -#![feature(const_trait_impl)] -pub mod blog; -pub mod error; -pub mod layout; -pub mod pages; -pub mod projects; -pub mod source; -pub mod wellknown; - -use blog::*; -use error::*; -use pages::*; -use projects::*; -use rocket::{catchers, fairing::AdHoc, fs::FileServer, http::Header, routes}; -use source::*; -use wellknown::*; - -#[tokio::main] -async fn main() { - env_logger::init_from_env("LOG"); - let _ = rocket::build() - .attach(AdHoc::on_response("set server header", |_req, res| { - res.set_header(Header::new("server", "blub")); - Box::pin(async {}) - })) - .manage(prepare_source()) - .mount("/blog/assets", FileServer::from(ASSET_ROOT)) - .mount( - "/", - routes![ - r_root, - r_about, - r_contact, - r_projects, - r_pgp_key, - r_source, - r_blog, - r_stuff, - r_hello, - r_favicon, - r_blog_index, - r_blog_article, - r_blog_atom, - r_style, - r_wellknown_security, - r_wellknown_matrix_server, - r_wellknown_matrix_client, - r_wellknown_flathub_verified, - ], - ) - .register("/", catchers![r_catch]) - .launch() - .await - .unwrap(); -} - -#[macro_export] -macro_rules! uri { - ($kk:stmt) => { - &rocket::uri!($kk).to_string() - }; -} diff --git a/src/pages.rs b/src/pages.rs deleted file mode 100644 index 4990491..0000000 --- a/src/pages.rs +++ /dev/null @@ -1,122 +0,0 @@ -use crate::uri; -use crate::{ - helper::get_articles, - layout::{DynScaffold, Scaffold}, - rocket_uri_macro_r_blog_article, ARTICLE_ROOT, -}; -use chrono::{NaiveTime, Utc}; -use rocket::{get, http::ContentType, response::Redirect}; -use std::{path::PathBuf, str::FromStr}; - -#[get("/")] -pub fn r_root() -> Redirect { - Redirect::to(rocket::uri!(r_about())) -} - -#[get("/hello")] -pub fn r_hello() -> &'static str { - "Hello World!" -} - -#[get("/about")] -pub async fn r_about<'a>() -> DynScaffold<'a> { - let articles = get_articles(&PathBuf::from_str(ARTICLE_ROOT).unwrap()) - .await - .unwrap_or_default(); - let mut newest = articles.first().cloned(); - if let Some(n) = &newest { - if n.date - .into_naive() - .unwrap() - .and_time(NaiveTime::default()) - .and_utc() - .signed_duration_since(Utc::now()) - .num_days() - < -8 - { - newest = None; - } - } - Scaffold { - title: "about".to_string(), - content: markup::new! { - @if let Some(a) = &newest { - .featured { - p { "Read the newest blog post: " a[href=uri!(r_blog_article(&a.canonical_name))] { @a.title } } - } - } - p { - "Hi. I am a normal person from planet earth. " - "I enjoy starting projects and never finishing them. " - "I do not know what to write here. " - "I am also supporting the free software movement by writing exclusively free software in my spare time. " - } - h2 { "current interests" } - ul { - li { "development of a general-purpose systems programming language" } - li { "development of multimedia processing and streaming applications" } - li { "replacing existing software with rust rewrites and rocket emotes" } - li { "stuff" } - } - h2 { "links" } - p { "some of my projects if you are here because of boredom: " } - ul { - li { a[href="https://meet.metamuffin.org"] { "keks-meet" } } - li { a[href="https://s.metamuffin.org/projects/weakpoint/"] { "weakpoint" } } - li { a[href="https://meet.metamuffin.org"] { "keks-meet" } } - } - - }, - } -} - -#[get("/contact")] -pub fn r_contact() -> DynScaffold<'static> { - Scaffold { - title: "contact".to_string(), - content: markup::new! { - p { "You can reach out to me in a bunch of ways. I am also generally looking for nice software ideas to implement." } - ul { - li { "matrix: " a[href="https://matrix.to/#/@metamuffin:metamuffin.org"]{"@metamuffin:metamuffin.org"} } - li { "fedi: " a[href="https://social.metamuffin.org/@metamuffin"]{"@metamuffin@social.metamuffin.org"} } - li { "electronic mail: " a[href="mailto:metamuffin@disroot.org"]{"metamuffin@disroot.org"} } - li { "telepathy: come on, just try hard enough" } - } - }, - } -} - -#[get("/stuff")] -pub fn r_stuff() -> DynScaffold<'static> { - Scaffold { - title: "stuff".to_string(), - content: markup::new! { - h1 { "Stuff" } - p { "I use arch btw." } - p { "The server uses arch btw." } - p { "My raspberry pi uses arch btw." } - p { "My router uses arch btw." } - p { "One of my smartphones uses arch btw." } - h2 { "Funny People" } - ul { - li { a[href="https://potatoxel.org"] { "Potatoxel" } } - li { a[href="https://pixificial.xyz"] { "Pixificial" } } - li { a[href="https://rustystriker.dev"] { "Rustystriker" } } - li { a[href="https://bgfxc4.de"] { "bgfxc4" } } - } - }, - } -} - -#[get("/favicon.ico")] -pub fn r_favicon() {} - -#[get("/key.asc")] -pub fn r_pgp_key() -> &'static str { - include_str!("../assets/key.asc") -} - -#[get("/style.css")] -pub fn r_style() -> (ContentType, &'static str) { - (ContentType::CSS, include_str!("../assets/style.css")) -} diff --git a/src/projects/data.rs b/src/projects/data.rs deleted file mode 100644 index a307b50..0000000 --- a/src/projects/data.rs +++ /dev/null @@ -1,393 +0,0 @@ -use super::{Project, State::*, Status::*}; - -pub const PROJECTS: &'static [Project] = &[ - Project { - name: "gnix", - status: Maintained, - description: "a stupid reverse proxy to replace nginx. serving the webpage you are viewing right now.", - link: Some("https://metamuffin.org"), - ..default() - }, - Project { - name: "keks-meet", - status: Maintained, - description: "a simple secure web conferencing application.", - link: Some("https://meet.metamuffin.org"), - ..default() - }, - Project { - name: "hurrycurry", - status: Maintained, - description: "A cooperative video game about cooking. Featuring multiplayer, 3d graphics and more.", - link: Some("https://hurrycurry.metamuffin.org"), - repo_link: Some("https://codeberg.org/hurrycurry/hurrycurry"), - ..default() - }, - Project { - name: "weareserver", - status: Developing, - description: "server software (and experimental client) for a generic 3d multiplayer game with VoIP capabilities. Inspired by VRChat and Minetest.", - ..default() - }, - Project { - name: "abrechenbarkeit", - status: Maintained, - description: "a simple trust-based ledger implemented as a Lua CGI web application with a CSV database", - ..default() - }, - Project { - name: "jellything", - status: Paused(Working), - description: "(paused until accumulated technical dept is fixed) media streaming solution (similiar to jellyfin). supports on-the-fly remuxing and federated content.", - ..default() - }, - Project { - name: "pfadfinder", - status: Paused(Working), - description: "parallel anytime A* for openstreetmap with custom frontend and integration into the existing one.", - ..default() - }, - Project { - name: "video-codec-experiments", - status: Paused(Working), - description: "a few attempts of creating my own video codecs, making use of motion compensation, dct, quantization and more. ", - ..default() - }, - Project { - name: "pixelflut tools", - status: Paused(Working), - description: "the programs I hacked together when playing pixelflut. includes GPU-acceleration for updating the canvas with minimal bandwidth usage.", - ..default() - }, - Project { - name: "attocc", - status: Paused(Unfinished), - description: "minimal C compiler in C", - ..default() - }, - Project { - name: "trash-proxy", - status: Maintained, - description: "A minecraft reverse proxy for offline authentification.", - ..default() - }, - Project { - name: "voxelwagen", - status: Paused(Unfinished), - description: "voxel game engine made from scratch; made to host an automation game.", - repo_link: Some("https://codeberg.org/voxelwagen/voxelwagen"), - ..default() - }, - Project { - name: "reCYCLING", - status: Developing, - description: "A fun CAPTCHA solution", - ..default() - }, - Project { - name: "keckup", - status: Maintained, - description: "Backup utility that traverses the filesystem while applying .gitignore and .backupignore files", - ..default() - }, - Project { - name: "ebml-struct", - status: Maintained, - description: "EBML parser and generator library with integrated Matroska types implemented in Rust without proc macros", - ..default() - }, -]; -pub const EXTRA_PROJECTS: &'static [Project] = &[ - Project { - name: "mond", - status: Paused(Unfinished), - description: "server monitoring software, no much code written so far", - ..default() - }, - Project { - name: "infra", - status: Paused(Working), - description: "multi-system installation manager. allows to centrally manage installations with a single configuration in form of a rust DSL", - ..default() - }, - Project { - name: "pbot", - status: Developing, - description: "Opinionated rust library for writing high-level chatbots that concurrently run on multiple messengers.", - ..default() - }, - Project { - name: "karlender", - status: Paused(Working), - description: " a personal calender suite consisting of a daemon, a graphical and a command-line user interface. supports very flexible condition based recurring tasks and automatic scheduling so you dont need to decide.", - ..default() - }, - Project { - name: "bad-editor", - status: Paused(Unfinished), - description: "A really bad editor", - ..default() - }, - Project { - name: "cosu", - status: Paused(Unfinished), - description: "a simple fast osu! client in c (not nearly a working client yet)", - ..default() - }, - Project { - name: "sprakc", - status: Abandoned(Working), - description: "A compiler from c++ to sprak", - ..default() - }, - Project { - name: "sprak-runtime", - status: Abandoned(Working), - description: "", - ..default() - }, - Project { - name: "ehb-data", - status: Abandoned(Working), - description: "", - ..default() - }, - Project { - name: "sgf", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "circuit-simulator", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "metabot", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "website", - status: Maintained, - description: "", - ..default() - }, - Project { - name: "ld49", - status: Abandoned(Unfinished), - description: "Ludum dare 49", - ..default() - }, - Project { - name: "bot-game", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "game-platform", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "simple-game-engine", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "voice-control", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "libreverse-old", - status: Abandoned(Unfinished), - description: "", - ..default() - }, - Project { - name: "golf-lang", - status: Abandoned(Unfinished), - description: "", - ..default() - }, - Project { - name: "mumble-music", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "muon", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "libresyncedvideoplayer", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "fireworks", - status: Abandoned(Unfinished), - description: "Fireworks with Three.js", - ..default() - }, - Project { - name: "bj1", - status: Unknown, - description: "", - ..default() - }, - Project { - name: "so-survey", - status: Paused(Working), - description: "Some code for processing the stackoverflow developer survey's results", - ..default() - }, - Project { - name: "rubberkeys", - status: Abandoned(Working), - description: "", - ..default() - }, - Project { - name: "lunar-lander", - status: Abandoned(Working), - description: "", - ..default() - }, - Project { - name: "molecule-viewer", - status: Paused(Working), - description: "Web application to visualize layout of molecules", - ..default() - }, - Project { - name: "oxelpot", - status: Paused(Working), - description: "text-board service using pure html on the client", - ..default() - }, - Project { - name: "CUBE", - status: Abandoned(Unfinished), - description: "", - ..default() - }, - Project { - name: "godot-mumble-link", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "libreverse-server", - status: Unknown, - description: "2d multiplayer game engine server", - ..default() - }, - Project { - name: "twclient", - status: Paused(Unfinished), - description: "A teeworlds client in rust, based on libtw2", - ..default() - }, - Project { - name: "minetest_meta_uhc", - status: Paused(Unfinished), - description: "ultra hardcore mod for minetest with decreasing border size", - ..default() - }, - Project { - name: "guitar-chords", - status: Paused(Unfinished), - description: "", - ..default() - }, - Project { - name: "gnu-netcat", - status: Paused(Working), - description: "Mirror of the “GNU“ netcat utility (imported from CVS)", - ..default() - }, - Project { - name: "stonk-game", - status: Abandoned(Unfinished), - description: "simple game to compete in trading stocks", - ..default() - }, - Project { - name: "pw-patchbay", - status: Paused(Working), - description: "Tool to setup links for pipewire", - ..default() - }, - Project { - name: "desterr", - status: Maintained, - description: "dead simple tool to distinguish stderr and stdout", - ..default() - }, - Project { - name: "staticwiki", - status: Paused(Working), - description: "tools to convert MediaWiki XML dumps to static HTML pages", - ..default() - }, - Project { - name: "trash-map", - status: Paused(Working), - description: "A minecraft map renderer", - ..default() - }, - Project { - name: "acoustsearch", - status: Paused(Unfinished), - description: "Search the acoustid database locally.", - ..default() - }, - Project { - name: "meta_shell", - status: Paused(Unfinished), - description: "Simple wayland shell only including a status dock.", - ..default() - }, - Project { - name: "3d-frame-interpolation", - status: Paused(Working), - description: "", - ..default() - }, - Project { - name: "librelambda", - status: Paused(Working), - description: "A lambda calculus \"solver\".", - ..default() - }, - Project { - name: "automato", - status: Paused(Unfinished), - description: "A minimal, gridless automation game.", - ..default() - }, -]; - -const fn default() -> Project { - Project { - name: "", - status: super::Status::Unknown, - description: "", - link: None, - repo_link: None, - } -} diff --git a/src/projects/mod.rs b/src/projects/mod.rs deleted file mode 100644 index afb275f..0000000 --- a/src/projects/mod.rs +++ /dev/null @@ -1,88 +0,0 @@ -use self::data::{EXTRA_PROJECTS, PROJECTS}; -use crate::layout::{DynScaffold, Scaffold}; -use markup::Render; -use rocket::get; - -pub mod data; - -#[get("/projects")] -pub fn r_projects() -> DynScaffold<'static> { - Scaffold { - title: "projects".to_string(), - content: markup::new! { - p { "I am starting a lot of projects - this page lists some of them." } - p { - "Starting so many means, that most of then are not maintained or not even properly developed. " - "Here is a quick reference to what I define the status of a project to be: " - } - ol { - li { @Status::Planned.render() ": No code has been written yet." } - li { @Status::Developing.render() ": Project is under active development." } - li { @Status::Maintained.render() ": Project is in a working state and receives regular updates." } - li { @Status::Paused(State::Working).render() @Status::Paused(State::Unfinished).render() ": Project has been discontinued for an unspecified amount of time, but might be resumed if i feel like it." } - li { @Status::Abandoned(State::Working).render() @Status::Abandoned(State::Unfinished).render() ": Project has been discontinued and will likely not ever be continued." } - li { @Status::Unknown.render() ": I have not bothered to write down the status" } - } - ul { @for p in PROJECTS { li { @p } } } - details { summary { "Other not-so-important projects" } - ul { @for p in EXTRA_PROJECTS { li { @p } } } - } - }, - } -} - -#[derive(Debug, Clone, Copy)] -pub enum State { - Working, - Unfinished, -} - -#[derive(Debug, Clone, Copy)] -pub enum Status { - Unknown, - Planned, - Developing, - Paused(State), - Maintained, - Abandoned(State), -} - -markup::define! { Project( - name: &'static str, - status: Status, - description: &'static str, - link: Option<&'static str>, - repo_link: Option<&'static str> -) { - b { @name } - @status.render() - ": " @description - " (" - @if let Some(link) = link { - a[href=link] "Project page" - ", " - } - @let fallback = format!("https://codeberg.org/metamuffin/{name}"); - a[href=repo_link.unwrap_or(&fallback)] "Source code" - ")" -}} - -impl Status { - fn ident(self) -> &'static str { - match self { - Status::Unknown => "unknown", - Status::Planned => "planned", - Status::Developing => "developing", - Status::Maintained => "maintained", - Status::Paused(State::Unfinished) => "paused-unfinished", - Status::Paused(State::Working) => "paused-working", - Status::Abandoned(State::Unfinished) => "abandoned-unfinished", - Status::Abandoned(State::Working) => "abandoned-working", - } - } - pub fn render(self) -> impl Render { - markup::new! { - div[class=format!("status status-{}", self.ident())] { @format!("{self:?}") } - } - } -} diff --git a/src/source.rs b/src/source.rs deleted file mode 100644 index 04ec929..0000000 --- a/src/source.rs +++ /dev/null @@ -1,80 +0,0 @@ -use crate::layout::{DynScaffold, Scaffold}; -use rocket::{ - get, - http::Header, - response::{self, Responder}, - Request, State, -}; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; - -pub struct Reload<T>(pub T); - -#[rocket::async_trait] -impl<'r, T: Responder<'r, 'static>> Responder<'r, 'static> for Reload<T> { - fn respond_to(self, request: &'r Request<'_>) -> response::Result<'static> { - let mut resp = self.0.respond_to(request); - if let Ok(resp) = &mut resp { - resp.set_header(Header::new("refresh", "0")); - } - resp - } -} - -const SOURCE_DIR: include_dir::Dir = include_dir::include_dir!("$CARGO_MANIFEST_DIR/src"); - -pub struct SourceWrap(Vec<String>); - -pub fn prepare_source() -> SourceWrap { - SourceWrap( - SOURCE_DIR - .find("**/*.rs") - .unwrap() - .map(|f| { - format!( - " -====================================== - Contents of {:?} -====================================== -{} -", - f.path(), - f.as_file().unwrap().contents_utf8().unwrap() - ) - }) - .collect::<Vec<_>>() - .join("\n") - .split("\n") - .map(String::from) - .collect(), - ) -} - -#[get("/source")] -pub async fn r_source(text: &State<SourceWrap>) -> Reload<DynScaffold> { - let mspf = 100u128; - - let ts = SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_millis(); - - let frame = ts / mspf; - let frame_off = ts % mspf; - - tokio::time::sleep(Duration::from_millis((mspf - frame_off) as u64)).await; - - let mut out = String::new(); - out += &format!( - "About {} milliseconds have passed since midnight of the january the first in 1970.\n", - ts - ); - out += "------------------------------------------------------\n"; - for i in frame..frame + 30 { - out += &text.0[(i % text.0.len() as u128) as usize]; - out += "\n"; - } - Reload(Scaffold { - title: "Source".to_string(), - content: markup::new! { pre { @out } }, - }) -} diff --git a/src/wellknown.rs b/src/wellknown.rs deleted file mode 100644 index ee800c2..0000000 --- a/src/wellknown.rs +++ /dev/null @@ -1,40 +0,0 @@ -use rocket::{ - get, - http::Header, - response::{self, Responder}, - serde::json::{json, Value}, - Request, -}; - -pub struct Cors<T>(pub T); - -#[rocket::async_trait] -impl<'r, T: Responder<'r, 'static>> Responder<'r, 'static> for Cors<T> { - fn respond_to(self, request: &'r Request<'_>) -> response::Result<'static> { - let mut resp = self.0.respond_to(request); - if let Ok(resp) = &mut resp { - resp.set_header(Header::new("access-control-allow-origin", "*")); - } - resp - } -} - -#[get("/.well-known/matrix/client")] -pub fn r_wellknown_matrix_client() -> Cors<Value> { - Cors(json!({"m.homeserver": {"base_url": "https://matrix.metamuffin.org"}} )) -} - -#[get("/.well-known/matrix/server")] -pub fn r_wellknown_matrix_server() -> Cors<Value> { - Cors(json!({"m.server": "matrix.metamuffin.org:443"} )) -} - -#[get("/.well-known/security.txt")] -pub fn r_wellknown_security() -> &'static str { - include_str!("../assets/security.txt.asc") -} - -#[get("/.well-known/org.flathub.VerifiedApps.txt")] -pub fn r_wellknown_flathub_verified() -> &'static str { - "a29f43db-bd4e-40cb-b121-2899c4d70634\n" -} diff --git a/assets/style.css b/style.css index 8ac5354..36bc470 100644 --- a/assets/style.css +++ b/style.css @@ -1,5 +1,3 @@ -@import url("https://s.metamuffin.org/static/font-ubuntu/include.css"); - :root { --bg1: #090909; --bg2: #141414; diff --git a/template.html b/template.html new file mode 100644 index 0000000..f1d0d48 --- /dev/null +++ b/template.html @@ -0,0 +1,51 @@ +<html lang="en"> + <head> + <title>TITLE - metamuffin's website</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="description" content="metamuffin's personal website" /> + <link rel="stylesheet" href="/style.css" /> + </head> + <body> + <header> + <img + src="https://s.metamuffin.org/avatar/default-512.webp" + alt="a muffin with purple glowing regions where a 3d vornoi function using chebychev distance exceeds some threshold" + align="left" + height="80" + width="80" + hspace="10" + /> + <h1>metamuffin's personal website</h1> + <nav> + <a href="/about.html">About</a> + <a href="/blog.html">Blog</a> + <a href="/projects.html">Projects</a> + <a href="/contact.html">Contact</a> + <a href="https://codeberg.org/metamuffin">Codeberg</a> + </nav> + <hr /> + </header> + <article> + CONTENT + </article> + <footer> + <hr /> + <p> + metamuffin's website; version TODO; sources available on + <a href="https://codeberg.org/metamuffin/metamuffin-website" + >codeberg</a> + </p> + <hr /> + <iframe + loading="lazy" + src="https://adservices.metamuffin.org/v1/embed?s=metamuffin.org" + style="width: 728px; height: 90px; border: none" + ></iframe> + <iframe + loading="lazy" + src="https://john.citrons.xyz/embed?ref=metamuffin.org" + style="width: 732px; height: 94px; border: none" + ></iframe> + </footer> + </body> +</html> |