From 640e9507a149ba176f00437f5dc1157b1c3c857d Mon Sep 17 00:00:00 2001 From: dzu Date: Wed, 11 Feb 2026 06:36:50 +0100 Subject: [PATCH 1/8] Initial implementation (#1) initial renerated client cargo fmt over generated client minimal forgejo openapi test also example setup to compile this thing move out Forgejo OpenAPI definintion remove openapi test initial implementation [Cargo.lock] Reviewed-on: https://git.dzuchun.ing/dzu/anode/pulls/1 Co-authored-by: dzu Co-committed-by: dzu --- .gitignore | 1 + Cargo.lock | 1138 +++++++++++++++++++++++++++++++++ Cargo.toml | 27 + README.md | 16 + anode-build/Cargo.toml | 14 + anode-build/src/lib.rs | 84 +++ anode-build/src/manifest.rs | 142 ++++ anode-build/src/runs.yml | 5 + anode-macros-input/Cargo.toml | 12 + anode-macros-input/src/lib.rs | 246 +++++++ anode-macros/Cargo.toml | 17 + anode-macros/src/lib.rs | 134 ++++ anode/Cargo.toml | 12 + anode/src/lib.rs | 103 +++ 14 files changed, 1951 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 anode-build/Cargo.toml create mode 100644 anode-build/src/lib.rs create mode 100644 anode-build/src/manifest.rs create mode 100644 anode-build/src/runs.yml create mode 100644 anode-macros-input/Cargo.toml create mode 100644 anode-macros-input/src/lib.rs create mode 100644 anode-macros/Cargo.toml create mode 100644 anode-macros/src/lib.rs create mode 100644 anode/Cargo.toml create mode 100644 anode/src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..11b84a9 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1138 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anode" +version = "0.1.0" +dependencies = [ + "anode-macros", + "forgejo-openapi", + "thiserror", +] + +[[package]] +name = "anode-build" +version = "0.1.0" +dependencies = [ + "anode-macros-input", + "quote", + "serde", + "syn", + "yaml_serde", +] + +[[package]] +name = "anode-macros" +version = "0.1.0" +dependencies = [ + "anode-macros-input", + "proc-macro2", + "quote", + "syn", + "yaml_serde", +] + +[[package]] +name = "anode-macros-input" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "forgejo-openapi" +version = "14.0.2-2-84240ce3a2+gitea-1.22.0" +source = "git+https://git.dzuchun.ing/dzu/forgejo-openapi.git#6e89b980f860faceb50a9a9c9ba3eef04aafefc2" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "serde_repr", + "tokio", + "tokio-util", + "url", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[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-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.181" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[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.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yaml_serde" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a7f5270edc6fab0529a772a772b3e505dfd883a8de5cc5b464e35fabe586411" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..cb2ce28 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,27 @@ +[workspace] +resolver = "3" +members = [ + "anode", + "anode-macros-input", + "anode-build", + "anode-macros", +] + +[workspace.dependencies] +# workspace +anode = { path = "./anode" } +anode-macros-input = { path = "./anode-macros-input" } +anode-macros = { path = "./anode-macros" } +anode-build = { path = "./anode-build" } +# git +forgejo-openapi = { git = "https://git.dzuchun.ing/dzu/forgejo-openapi.git", default-features = false } +# crates.io +syn = { version = "2", default-features = false } +quote = { version = "1", default-features = false } +proc-macro2 = "1.0.102" +serde = { version = "1", default-features = false } +yaml_serde = { version = "0.10", default-features = false } +thiserror = { version = "2", default-features = false } + +[workspace.lints.clippy] +missing_panics_doc = "allow" diff --git a/README.md b/README.md new file mode 100644 index 0000000..aca7fba --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +Rust toolkit for CI actions + +anode -- action without node + +# Compile + +install +- libunwind-static +- xz-static + +get C runtime libraries from somewhere (I literally copied them from whatever `gcc` found them in on my system; I think that on actual alpine system they will be found with no problem) + +test is compiled with the following command: +```sh +RUSTFLAGS="-Lunwind -L/lib/musl/lib -Lcrt -Lxz -llzma" cargo +nightly b -Z build-std -p tests --release --target x86_64-unknown-linux-musl -v +``` diff --git a/anode-build/Cargo.toml b/anode-build/Cargo.toml new file mode 100644 index 0000000..e0ec5de --- /dev/null +++ b/anode-build/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "anode-build" +version = "0.1.0" +edition = "2024" + +[dependencies] +anode-macros-input.workspace = true +serde = {workspace = true, features = ["derive"]} +syn.workspace = true +quote.workspace = true +yaml_serde.workspace = true + +[lints] +workspace = true diff --git a/anode-build/src/lib.rs b/anode-build/src/lib.rs new file mode 100644 index 0000000..e91b6f1 --- /dev/null +++ b/anode-build/src/lib.rs @@ -0,0 +1,84 @@ +use syn::{File, punctuated::Punctuated}; + +use anode_macros_input::pretty_span; + +use crate::manifest::ActionManifest; + +mod manifest; + +pub fn build() { + let main_src = std::fs::read_to_string("src/main.rs").unwrap(); + let main_ast = syn::parse_file(&main_src).unwrap(); + let input = parse_file(main_ast); + let action = anode_macros_input::Action::from_struct(&input); + let manifest = ActionManifest::from_action(&action); + + // panic!("{manifest:#?}"); + std::fs::write( + "action.yml", + yaml_serde::to_string::(&manifest).unwrap(), + ) + .unwrap(); +} + +pub fn parse_file(input: File) -> syn::ItemStruct { + use syn::{Fields, FieldsNamed, Generics, Item, Path, Token}; + let structs = input.items.into_iter().filter_map(|item| { + if let Item::Struct(struct_) = item { + Some(struct_) + } else { + None + } + }); + let with_fields = structs.filter(|str| { + if str.generics != Generics::default() { + // struct has generics -- not an input + println!( + "cargo:warn=generics at {} are not allowed in the input struct", + pretty_span(&str.generics) + ); + return false; + } + + let Fields::Named(FieldsNamed { .. }) = &str.fields else { + println!( + "cargo:warn=fields at {} must be named for the action input", + pretty_span(&str.fields) + ); + return false; + }; + true + }); + let mut with_derive = with_fields + .filter(|str| { + str.attrs.iter().any(|attr| { + if !attr.meta.path().is_ident("derive") { + return false; + } + let Ok(traits) = + attr.parse_args_with(Punctuated::::parse_terminated) + else { + return false; + }; + traits.iter().any(|tr| { + let input: syn::Path = syn::parse_quote!(Input); + let anode_input: syn::Path = syn::parse_quote!(anode::Input); + tr == &input || tr == &anode_input + }) + }) + }) + .collect::>(); + + assert!( + !with_derive.is_empty(), + "no valid input definition in the main module" + ); + + assert!( + with_derive.len() <= 1, + "input module contains multiple valid input definintions: {:#?}", + with_derive.iter().map(pretty_span).collect::>(), + ); + + with_derive.pop().unwrap() +} diff --git a/anode-build/src/manifest.rs b/anode-build/src/manifest.rs new file mode 100644 index 0000000..2006458 --- /dev/null +++ b/anode-build/src/manifest.rs @@ -0,0 +1,142 @@ +use std::collections::BTreeMap; + +use quote::ToTokens; +use syn::{Expr, Ident, parse::Parser}; + +use anode_macros_input::{Action, ActionInput, pretty_span}; + +#[derive(Debug, serde::Serialize)] +pub struct InputManifest { + #[serde(skip_serializing_if = "String::is_empty")] + pub description: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub r#default: Option, + pub required: bool, +} + +impl InputManifest { + pub fn from_input(input: &ActionInput) -> (&str, InputManifest) { + #[expect( + clippy::manual_map, + reason = "this expression will optionally produce an error in the future" + )] + let default = if let Some(default) = &input.default { + Some(match default { + anode_macros_input::ActionInputDefault::Str(s) => { + yaml_serde::Value::String(s.clone().into_string()) + } + anode_macros_input::ActionInputDefault::Expr(expr) => parse_default(expr), + }) + } else { + None + }; + ( + &input.name, + InputManifest { + description: input.description.clone(), + default, + required: input.required, + }, + ) + } +} + +fn parse_default(expr: &Expr) -> yaml_serde::Value { + use syn::Lit; + use yaml_serde::{Number, Value}; + let lit = { + use syn::parse::Parse; + let parser = Lit::parse; + #[expect( + clippy::match_wild_err_arm, + reason = "`_err` can be used for debugging" + )] + match parser.parse2(expr.to_token_stream()) { + Ok(ok) => ok, + Err(_err) => panic!( + "to allow automatic manifest generation, default value must be a literal. non-literal default for field at {}", + pretty_span(expr), + ), + } + }; + match lit { + Lit::Str(lit_str) => Value::String(lit_str.value()), + Lit::Bool(lit_bool) => Value::Bool(lit_bool.value()), + Lit::Byte(lit_byte) => Value::Number(Number::from(u64::from(lit_byte.value()))), + Lit::Char(lit_char) => Value::String(format!("'{}'", lit_char.value())), + Lit::Int(lit_int) => { + let num = if let Ok(pos_int) = lit_int.base10_parse::() { + Number::from(pos_int) + } else if let Ok(neg_int) = lit_int.base10_parse::() { + Number::from(neg_int) + } else { + panic!("failed to parse int into yaml value: {}", lit_int,); + }; + Value::Number(num) + } + Lit::Float(lit_float) => { + let float = lit_float.base10_parse::().unwrap(); + Value::Number(float.into()) + } + Lit::ByteStr(_) => { + unimplemented!("bytestr is not a valid yaml value. please use regular str") + } + Lit::CStr(_) => { + unimplemented!("cstr is not a valid yaml literal. please use regular str") + } + Lit::Verbatim(_) => unimplemented!("uninterpreted literal"), + _ => unimplemented!("unknown literal kind"), + } +} + +#[derive(Debug, serde::Serialize)] +pub struct ActionManifest { + pub name: String, + pub description: String, + pub inputs: BTreeMap, + pub runs: yaml_serde::Value, +} + +impl ActionManifest { + pub fn from_action(action: &Action) -> Self { + let name = action + .name_override + .clone() + .unwrap_or_else(|| action.name.to_string()); + // collect both input manifests AND their idents, to provide informative error messages + let mut inputs = BTreeMap::<&str, (InputManifest, Ident)>::new(); + for input in &action.inputs { + use std::collections::btree_map::Entry; + let (name, mani) = InputManifest::from_input(input); + match inputs.entry(name) { + Entry::Vacant(vacant_entry) => { + vacant_entry.insert((mani, input.ident.clone())); + } + Entry::Occupied(occupied_entry) => { + // input mapping to the same name already exists + let (_, prev_ident) = occupied_entry.get(); + panic!( + "Fields at {} and {} map to the same name ({})", + pretty_span(&input.ident), + pretty_span(prev_ident), + name, + ); + } + } + } + ActionManifest { + name, + description: action.description.clone(), + // strip the idents out + inputs: inputs + .into_iter() + .map(|(k, (v, _))| (k.to_owned(), v)) + .collect(), + runs: runs(), + } + } +} + +fn runs() -> yaml_serde::Value { + yaml_serde::from_str::(include_str!("runs.yml")).unwrap() +} diff --git a/anode-build/src/runs.yml b/anode-build/src/runs.yml new file mode 100644 index 0000000..b9f3b8b --- /dev/null +++ b/anode-build/src/runs.yml @@ -0,0 +1,5 @@ +runs: + using: composite + steps: + - run: ${{ forgejo.action_path }}/main + shell: bash diff --git a/anode-macros-input/Cargo.toml b/anode-macros-input/Cargo.toml new file mode 100644 index 0000000..3b26000 --- /dev/null +++ b/anode-macros-input/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "anode-macros-input" +version = "0.1.0" +edition = "2024" + +[dependencies] +proc-macro2 = { workspace = true, features = [ "span-locations" ] } +syn = { workspace = true, features = [ "parsing", "printing", "full", "extra-traits", "clone-impls"] } +quote.workspace = true + +[lints] +workspace = true diff --git a/anode-macros-input/src/lib.rs b/anode-macros-input/src/lib.rs new file mode 100644 index 0000000..75c8623 --- /dev/null +++ b/anode-macros-input/src/lib.rs @@ -0,0 +1,246 @@ +use syn::{ + AngleBracketedGenericArguments, Attribute, Expr, ExprLit, Field, GenericArgument, Ident, Lit, + LitStr, Meta, MetaNameValue, Path, PathArguments, PathSegment, Type, TypePath, + spanned::Spanned, +}; + +pub enum ActionInputDefault { + Str(Box), + Expr(Box), +} + +pub struct ActionInput { + pub ident: syn::Ident, + pub name: String, + pub description: String, + pub r#default: Option, + pub required: bool, + pub ty: Type, + pub parser: Option, +} + +pub struct Action { + pub name: Ident, + pub name_override: Option, + pub description: String, + pub inputs: Vec, +} + +impl Action { + pub fn from_struct( + syn::ItemStruct { + attrs, + ident, + fields, + .. + }: &syn::ItemStruct, + ) -> Self { + let mut name_override = Option::::None; + let description = parse_desc(attrs); + for attr in attrs { + if attr.path().is_ident("name") + && let Meta::NameValue(MetaNameValue { + value: + Expr::Lit(ExprLit { + lit: Lit::Str(rename), + .. + }), + .. + }) = &attr.meta + { + let token = rename.token(); + let mut literal = token.to_string(); + literal.pop().unwrap(); + literal.remove(0); + name_override = Some(literal); + } + } + + let mut inputs = Vec::new(); + for field in fields { + inputs.push(parse_input(field)); + } + Action { + name: ident.clone(), + name_override, + description, + inputs, + } + } +} + +pub fn pretty_span(t: &T) -> String { + let span2 = t.span(); + let start = span2.start(); + let end = span2.end(); + let at = if start.line == end.line { + format_args!("line {}:{}-{}", start.line, start.column, end.column) + } else { + format_args!("lines {}-{}", start.line, end.line) + }; + format!("at {at} in main.rs") +} + +fn parse_input(field: &Field) -> ActionInput { + let Field { + attrs, ident, ty, .. + } = field; + let name = to_kebab(&ident.as_ref().unwrap().to_string()); + let description = parse_desc(attrs); + let required = if let Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }) = ty + && let Some(PathSegment { ident, .. }) = segments.first() + && ident == "Option" + { + false + } else { + true + }; + + // first, assign the default parser, if it can be inferred from the type + let mut parser = infer_parser(ty); + + let mut default = Option::::None; + + for attr in attrs { + if attr.path().is_ident("default") { + default = Some(ActionInputDefault::Expr(Box::new( + attr.parse_args::().unwrap(), + ))); + } + + if attr.path().is_ident("default_str") { + default = Some(ActionInputDefault::Str( + attr.parse_args::() + .unwrap() + .value() + .into_boxed_str(), + )); + } + + if attr.path().is_ident("parser") { + parser = Some(attr.parse_args::().unwrap()); + } + } + + ActionInput { + description, + default, + required, + parser, + ident: field.ident.clone().expect("field must have an ident"), + name, + ty: ty.clone(), + } +} + +fn parse_desc(attrs: &[Attribute]) -> String { + let mut description = String::new(); + for attr in attrs { + if attr.path().is_ident("doc") + && let Meta::NameValue(MetaNameValue { + value: + Expr::Lit(ExprLit { + lit: Lit::Str(doc), .. + }), + .. + }) = &attr.meta + { + let token = doc.token(); + let mut literal = token.to_string(); + literal.pop().unwrap(); + literal.remove(0); + if literal.starts_with(' ') { + literal.remove(0); + } + if !description.is_empty() { + description.push('\n'); + } + description.push_str(&literal); + } + } + description +} + +pub fn to_kebab(name: &str) -> String { + let mut name = name.trim_start_matches(['-', '_']).replace('_', "-"); + let mut name = name.as_mut_str(); + assert!(!name.is_empty()); // TODO that's an invalid ident error, use proper signaling + let mut res = String::new(); + while !name.is_empty() { + let next_upper = name + .find(|ch: char| ch.is_ascii_uppercase()) + .unwrap_or(name.len()); + let (this, rest) = name.split_at_mut(next_upper); + name = rest; + if !res.is_empty() { + res.push('-'); + } + res.push_str(this); + if let Some((ind, _)) = name.char_indices().nth(1) { + name[..ind].make_ascii_lowercase(); + } else { + name.make_ascii_lowercase(); + } + } + res +} + +macro_rules! mch { + ($p:pat = $e:expr) => { + let $p = $e else { + return None; + }; + }; +} + +fn infer_parser(ty: &Type) -> Option { + // ensure that type is a single-length path at the top (that covers both well-known types and any `Option`) + mch!( + Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }) = ty + ); + if segments.len() != 1 { + return None; + } + let PathSegment { ident, arguments } = segments.first()?; + + if let PathArguments::None = arguments { + // no arguments and simple ident -- use well-known parser + return Some(syn::parse_quote!(::anode::__default_parser::#ident)); + } + + // at this point, if the parser can be inferred, type must be an option + if ident != "Option" { + return None; + } + mch!( + PathArguments::AngleBracketed(AngleBracketedGenericArguments { + args: arguments, + .. + }) = arguments + ); + if arguments.len() != 1 { + // real `Option` has only 1 argument + return None; + } + mch!( + Some(GenericArgument::Type(Type::Path(TypePath { + qself: None, + path: Path { segments, .. }, + }))) = arguments.first() + ); + if segments.len() != 1 { + // simple type must be just an ident + return None; + } + + let PathSegment { ident, .. } = segments.first()?; + + // well-known parser for the inner type + Some(syn::parse_quote!(::anode::__default_parser::#ident)) +} diff --git a/anode-macros/Cargo.toml b/anode-macros/Cargo.toml new file mode 100644 index 0000000..4536798 --- /dev/null +++ b/anode-macros/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "anode-macros" +version = "0.1.0" +edition = "2024" + +[lib] +proc-macro = true + +[dependencies] +anode-macros-input = { workspace = true } +yaml_serde.workspace = true +proc-macro2.workspace = true +syn = { workspace = true, features = [ "parsing", "proc-macro" ] } +quote.workspace = true + +[lints] +workspace = true diff --git a/anode-macros/src/lib.rs b/anode-macros/src/lib.rs new file mode 100644 index 0000000..ad9a53f --- /dev/null +++ b/anode-macros/src/lib.rs @@ -0,0 +1,134 @@ +use anode_macros_input::{Action, ActionInput, ActionInputDefault}; +use proc_macro::TokenStream as TStream1; +use proc_macro2::Span; +use quote::{ToTokens, format_ident}; +use syn::{ + ExprStruct, FieldValue, Ident, ItemFn, LitStr, Member, Stmt, Token, + punctuated::Punctuated, + token::{Brace, Colon}, +}; + +#[proc_macro_derive(Input, attributes(name, default, default_str, parser))] +pub fn input(item: TStream1) -> TStream1 { + let input = syn::parse_macro_input!(item as syn::ItemStruct); + let ident = &input.ident; + let action = Action::from_struct(&input); + let try_get_impl = try_get(&action); + + let get_impl: syn::ItemFn = syn::parse_quote! { + fn get() -> Self { + Self::try_get().expect("Failed to parse the input") + } + }; + + let impl_block: syn::ItemImpl = syn::parse_quote! { + impl #ident { + #try_get_impl + #get_impl + } + }; + impl_block.into_token_stream().into() +} + +fn try_get(action: &Action) -> ItemFn { + let mut body = Vec::::new(); + let errors = format_ident!("errors"); + body.push( + syn::parse_quote! { let mut #errors = ::std::vec::Vec::<(&'static str, ::anode::InputErrorMessage)>::new(); }, + ); + + let mut idents = Vec::<(Ident, Ident)>::new(); + let mut required_idents = Vec::::new(); + for ( + ActionInput { + name, + parser, + required, + r#default, + ident: struct_ident, + .. + }, + i, + ) in action.inputs.iter().zip(0..) + { + let input_ident = format_ident!("f{i}"); + body.push(syn::parse_quote! { let mut #input_ident: Option<_> = None; }); + + let input_lit = LitStr::new(name, proc_macro2::Span::call_site()); + let input_envvar = LitStr::new( + &format!("INPUT_{}", name.to_uppercase().replace('-', "_")), + proc_macro2::Span::call_site(), + ); + let mut envvar: syn::Expr = syn::parse_quote!( ::std::env::var_os(#input_envvar) ); + if let Some(ActionInputDefault::Str(default_str)) = default { + // has default str value -- use it as a fallback + let def = LitStr::new(&default_str, Span::call_site()); + envvar = syn::parse_quote!( #envvar.or_else(|| Some(::std::ffi::OsString::from(String::from(#def)))) ); + } + let mut parse_input: syn::ExprIf = syn::parse_quote! { + if let Some(envvar) = #envvar { + match #parser(envvar) { + Ok(ok) => #input_ident = Some(ok), + Err(error) => #errors.push((#input_lit, ::anode::InputErrorMessage::Parsing(::std::boxed::Box::new(error)))), + } + } + }; + // else branch, if this input is required + if *required { + let else_branch = if let Some(ActionInputDefault::Expr(default_expr)) = default { + // has a default expression value -- assign it instead + syn::parse_quote! {{ + #input_ident = Some(#default_expr); + }} + } else { + // no default - error + syn::parse_quote! {{ + #errors.push((#input_lit, ::anode::InputErrorMessage::NotPresent)); + }} + }; + + parse_input.else_branch = Some((::default(), Box::new(else_branch))); + } + body.push(syn::parse_quote! (#parse_input)); + idents.push((input_ident.clone(), struct_ident.clone())); + if *required { + required_idents.push(input_ident); + } + } + + // assert there are no errors, and all required fields are present + body.push(syn::parse_quote! { + let (#(Some(#required_idents)),*, &[]) = (#(#required_idents),*, &*#errors) else { + return Err(::anode::InputError(#errors.into_boxed_slice())); + }; + }); + + // return the struct + let mut fields = Punctuated::new(); + for (val, member) in idents { + fields.push(FieldValue { + attrs: Vec::new(), + member: Member::Named(member), + colon_token: Some(Colon::default()), + expr: syn::parse_quote!(#val), + }); + } + let str = ExprStruct { + attrs: Vec::new(), + qself: None, + path: syn::parse_quote!(Self), + brace_token: Brace::default(), + fields, + dot2_token: None, + rest: None, + }; + body.push(syn::parse_quote! { + return Ok(#str); + }); + + syn::parse_quote! { + fn try_get() -> Result { + #(#body)* + } + } +} diff --git a/anode/Cargo.toml b/anode/Cargo.toml new file mode 100644 index 0000000..3649d67 --- /dev/null +++ b/anode/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "anode" +version = "0.1.0" +edition = "2024" + +[dependencies] +anode-macros.workspace = true +thiserror.workspace = true +forgejo-openapi = { workspace = true, optional = true } + +[features] +forge-forgejo = [ "dep:forgejo-openapi" ] diff --git a/anode/src/lib.rs b/anode/src/lib.rs new file mode 100644 index 0000000..bda5cd6 --- /dev/null +++ b/anode/src/lib.rs @@ -0,0 +1,103 @@ +pub use anode_macros::Input; + +#[doc(hidden)] +pub mod __default_parser { + #![allow(non_snake_case)] + + use std::{ + ffi::OsString, + os::unix::ffi::{OsStrExt, OsStringExt}, + path::PathBuf, + }; + + #[derive(Debug, thiserror::Error)] + pub enum InputIntError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(#[from] core::num::ParseIntError), + } + + macro_rules! int { + ($t:ident) => { + pub fn $t(input: OsString) -> Result<$t, InputIntError> { + let str = core::str::from_utf8(input.as_bytes())?; + Ok(str.parse::<$t>()?) + } + }; + } + + int!(i8); + int!(u8); + int!(i16); + int!(u16); + int!(i32); + int!(u32); + int!(i64); + int!(u64); + int!(i128); + int!(u128); + + #[derive(Debug, thiserror::Error)] + pub enum InputFloatError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(#[from] core::num::ParseFloatError), + } + + macro_rules! flt { + ($t:ident) => { + pub fn $t(input: OsString) -> Result<$t, InputFloatError> { + let str = core::str::from_utf8(input.as_bytes())?; + Ok(str.parse::<$t>()?) + } + }; + } + + flt!(f32); + flt!(f64); + + pub fn String(input: OsString) -> Result { + let bytes = input.into_vec(); + String::from_utf8(bytes) + } + + pub fn OsString(input: OsString) -> Result { + Ok(input) + } + + pub fn PathBuf(input: OsString) -> Result { + Ok(input.into()) + } +} + +pub mod parse { + use std::{ffi::OsString, os::unix::ffi::OsStrExt, str::FromStr}; + + #[derive(Debug, thiserror::Error)] + pub enum InputFromStrError { + #[error(transparent)] + Uft8(#[from] core::str::Utf8Error), + #[error(transparent)] + Parse(T::Err), + } + + pub fn from_str(input: OsString) -> Result> { + let str = core::str::from_utf8(input.as_bytes())?; + str.parse::().map_err(InputFromStrError::Parse) + } +} + +#[cfg(feature = "forge-forgejo")] +pub use forgejo_openapi as forgejo; + +#[derive(Debug)] +pub struct InputError(#[doc(hidden)] pub Box<[(&'static str, InputErrorMessage)]>); + +#[derive(Debug)] +#[doc(hidden)] +pub enum InputErrorMessage { + NotPresent, + Parsing(Box), +} From ce4fd8ccc95747a1bd3212b627ffd5b36111aeba Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 13 Feb 2026 10:16:18 +0000 Subject: [PATCH 2/8] add hard-coded paths warning --- anode-build/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/anode-build/src/lib.rs b/anode-build/src/lib.rs index e91b6f1..e2d1f97 100644 --- a/anode-build/src/lib.rs +++ b/anode-build/src/lib.rs @@ -1,3 +1,4 @@ +// WARN: be aware that both source code file path and output path and hard-coded. they might not work for you; if you have any suggestion for heuristics would determine these paths in a universal way, please let me know use syn::{File, punctuated::Punctuated}; use anode_macros_input::pretty_span; From 44916a91dbe4b053baea05fb6986e6bc842288d9 Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 13 Feb 2026 10:17:50 +0000 Subject: [PATCH 3/8] remeve Forgejo-openapi from the workspace There is literally to reason to mingle them --- Cargo.toml | 2 -- anode/Cargo.toml | 4 ---- 2 files changed, 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cb2ce28..6d43f1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,6 @@ anode = { path = "./anode" } anode-macros-input = { path = "./anode-macros-input" } anode-macros = { path = "./anode-macros" } anode-build = { path = "./anode-build" } -# git -forgejo-openapi = { git = "https://git.dzuchun.ing/dzu/forgejo-openapi.git", default-features = false } # crates.io syn = { version = "2", default-features = false } quote = { version = "1", default-features = false } diff --git a/anode/Cargo.toml b/anode/Cargo.toml index 3649d67..ca29a33 100644 --- a/anode/Cargo.toml +++ b/anode/Cargo.toml @@ -6,7 +6,3 @@ edition = "2024" [dependencies] anode-macros.workspace = true thiserror.workspace = true -forgejo-openapi = { workspace = true, optional = true } - -[features] -forge-forgejo = [ "dep:forgejo-openapi" ] From d9ad91c55dfb099ed1d8356c0f537402d6c99f1e Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 13 Feb 2026 14:06:58 +0000 Subject: [PATCH 4/8] add boolean parser --- anode/src/lib.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/anode/src/lib.rs b/anode/src/lib.rs index bda5cd6..fa916d4 100644 --- a/anode/src/lib.rs +++ b/anode/src/lib.rs @@ -70,6 +70,24 @@ pub mod __default_parser { pub fn PathBuf(input: OsString) -> Result { Ok(input.into()) } + + #[derive(Debug, thiserror::Error)] + #[error("Unknown boolean value: {}", _0.display())] + pub struct UnknownBoolean(OsString); + + pub fn bool(input: OsString) -> Result { + const VALID_TRUE: &[&[u8]] = &[b"TRUE", b"True", b"true", b"1"]; + const VALID_FALSE: &[&[u8]] = &[b"FALSE", b"False", b"false", b"0"]; + if VALID_TRUE.contains(&input.as_bytes()) { + return Ok(true); + } + + if VALID_FALSE.contains(&input.as_bytes()) { + return Ok(false); + } + + Err(UnknownBoolean(input)) + } } pub mod parse { From 0e37f99cd2b48e5afb78cc102f89fcc49f926341 Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 15 Feb 2026 05:42:01 +0000 Subject: [PATCH 5/8] fix(macro): do not replace `-` with `_` in inputs --- anode-macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anode-macros/src/lib.rs b/anode-macros/src/lib.rs index ad9a53f..b75d60d 100644 --- a/anode-macros/src/lib.rs +++ b/anode-macros/src/lib.rs @@ -56,7 +56,7 @@ fn try_get(action: &Action) -> ItemFn { let input_lit = LitStr::new(name, proc_macro2::Span::call_site()); let input_envvar = LitStr::new( - &format!("INPUT_{}", name.to_uppercase().replace('-', "_")), + &format!("INPUT_{}", name.to_uppercase()), proc_macro2::Span::call_site(), ); let mut envvar: syn::Expr = syn::parse_quote!( ::std::env::var_os(#input_envvar) ); From 2c1972141b3c011df32341385c858af5ae656a85 Mon Sep 17 00:00:00 2001 From: dzu Date: Sun, 15 Feb 2026 07:25:19 +0000 Subject: [PATCH 6/8] fix(build): correct action runs spec --- anode-build/src/runs.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/anode-build/src/runs.yml b/anode-build/src/runs.yml index b9f3b8b..4d00ba3 100644 --- a/anode-build/src/runs.yml +++ b/anode-build/src/runs.yml @@ -1,5 +1,4 @@ -runs: - using: composite - steps: - - run: ${{ forgejo.action_path }}/main - shell: bash +using: composite +steps: + - run: ${{ forgejo.action_path }}/main + shell: bash From 2bc5e3c712e1a1b725f62712fe3cc028c3f7df24 Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 20 Feb 2026 14:54:47 +0000 Subject: [PATCH 7/8] fix: ignore empty provided inputs apparently, Forgejo provides empty variables for optional not-specified inputs, for some reason :shrug: --- anode-macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anode-macros/src/lib.rs b/anode-macros/src/lib.rs index b75d60d..063d732 100644 --- a/anode-macros/src/lib.rs +++ b/anode-macros/src/lib.rs @@ -66,7 +66,7 @@ fn try_get(action: &Action) -> ItemFn { envvar = syn::parse_quote!( #envvar.or_else(|| Some(::std::ffi::OsString::from(String::from(#def)))) ); } let mut parse_input: syn::ExprIf = syn::parse_quote! { - if let Some(envvar) = #envvar { + if let Some(envvar) = #envvar && !envvar.is_empty() { match #parser(envvar) { Ok(ok) => #input_ident = Some(ok), Err(error) => #errors.push((#input_lit, ::anode::InputErrorMessage::Parsing(::std::boxed::Box::new(error)))), From 98addf4d54ae16c21979a1dae63d17738b3a277b Mon Sep 17 00:00:00 2001 From: dzu Date: Fri, 20 Feb 2026 14:58:27 +0000 Subject: [PATCH 8/8] cleanup --- Cargo.lock | 966 +---------------------------------------------- anode/src/lib.rs | 3 - 2 files changed, 4 insertions(+), 965 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11b84a9..40617b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,6 @@ name = "anode" version = "0.1.0" dependencies = [ "anode-macros", - "forgejo-openapi", "thiserror", ] @@ -42,334 +41,18 @@ dependencies = [ "syn", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "bumpalo" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" -[[package]] -name = "forgejo-openapi" -version = "14.0.2-2-84240ce3a2+gitea-1.22.0" -source = "git+https://git.dzuchun.ing/dzu/forgejo-openapi.git#6e89b980f860faceb50a9a9c9ba3eef04aafefc2" -dependencies = [ - "reqwest", - "serde", - "serde_json", - "serde_repr", - "tokio", - "tokio-util", - "url", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[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-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "hyper" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-util" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "icu_collections" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" - -[[package]] -name = "icu_properties" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" - -[[package]] -name = "icu_provider" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - [[package]] name = "indexmap" version = "2.13.0" @@ -380,122 +63,12 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "itoa" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "js-sys" -version = "0.3.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.181" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "mio" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "potential_utf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" -dependencies = [ - "zerovec", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -514,48 +87,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "js-sys", - "log", - "mime_guess", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-util", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - [[package]] name = "ryu" version = "1.0.23" @@ -592,101 +123,17 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "thiserror" version = "2.0.18" @@ -707,123 +154,11 @@ dependencies = [ "syn", ] -[[package]] -name = "tinystr" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.49.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" -dependencies = [ - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" -dependencies = [ - "bitflags", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "unicase" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" - [[package]] name = "unicode-ident" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unsafe-libyaml" @@ -831,216 +166,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[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.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasm-bindgen" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" -dependencies = [ - "cfg-if", - "futures-util", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "writeable" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" - [[package]] name = "yaml_serde" version = "0.10.3" @@ -1053,86 +178,3 @@ dependencies = [ "serde", "unsafe-libyaml", ] - -[[package]] -name = "yoke" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerotrie" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zmij" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7" diff --git a/anode/src/lib.rs b/anode/src/lib.rs index fa916d4..953740c 100644 --- a/anode/src/lib.rs +++ b/anode/src/lib.rs @@ -107,9 +107,6 @@ pub mod parse { } } -#[cfg(feature = "forge-forgejo")] -pub use forgejo_openapi as forgejo; - #[derive(Debug)] pub struct InputError(#[doc(hidden)] pub Box<[(&'static str, InputErrorMessage)]>);