diff --git a/.github/workflows/build-examples.yaml b/.github/workflows/build-examples.yaml index 8426661..252d6c9 100644 --- a/.github/workflows/build-examples.yaml +++ b/.github/workflows/build-examples.yaml @@ -28,7 +28,7 @@ jobs: for dir in examples/cdn/*/; do [ -f "$dir/Cargo.toml" ] || continue echo "::group::$dir" - (cd "$dir" && cargo build --release --target wasm32-wasip1) + cargo build --release --target wasm32-wasip1 --manifest-path "$dir/Cargo.toml" echo "::endgroup::" done @@ -37,7 +37,7 @@ jobs: for dir in examples/http/basic/*/; do [ -f "$dir/Cargo.toml" ] || continue echo "::group::$dir" - (cd "$dir" && cargo build --release --target wasm32-wasip1) + cargo build --release --target wasm32-wasip1 --manifest-path "$dir/Cargo.toml" echo "::endgroup::" done @@ -46,6 +46,6 @@ jobs: for dir in examples/http/wasi/*/; do [ -f "$dir/Cargo.toml" ] || continue echo "::group::$dir" - (cd "$dir" && cargo build --release --target wasm32-wasip2) + cargo build --release --target wasm32-wasip2 --manifest-path "$dir/Cargo.toml" echo "::endgroup::" done diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c611e11..3c76b72 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,7 +31,7 @@ jobs: run: cargo build --release --all-features - name: Documentation - run: cargo doc + run: cargo doc --package fastedge --package fastedge-derive - name: Run Clippy - run: cargo clippy --all-targets --all-features \ No newline at end of file + run: cargo clippy --all-targets --all-features diff --git a/Cargo.lock b/Cargo.lock index 0dd372b..9cfc851 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,123 +2,2168 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + [[package]] name = "anyhow" version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey", + "rayon", + "thiserror", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "bitstream-io" +version = "4.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" +dependencies = [ + "no_std_io2", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "built" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cc" +version = "1.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cdn_ab_testing" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_api_key" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "proxy-wasm", +] + +[[package]] +name = "cdn_body" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", +] + +[[package]] +name = "cdn_cache_control" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_convert_image" +version = "0.1.0" +dependencies = [ + "image 0.25.10", + "proxy-wasm", +] + +[[package]] +name = "cdn_cors" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_custom" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", +] + +[[package]] +name = "cdn_custom_error_pages" +version = "0.1.0" +dependencies = [ + "base64 0.22.1", + "handlebars", + "proxy-wasm", + "regex", + "serde_json", +] + +[[package]] +name = "cdn_geo_redirect" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_geoblock" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_headers" +version = "0.1.0" +dependencies = [ + "proxy-wasm", +] + +[[package]] +name = "cdn_hello_world" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", +] + +[[package]] +name = "cdn_http_call" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", +] + +[[package]] +name = "cdn_jwt" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "headers", + "jsonwebtoken", + "proxy-wasm", + "serde", +] + +[[package]] +name = "cdn_key_value" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "proxy-wasm", + "querystring", + "serde_json", +] + +[[package]] +name = "cdn_large_env_variable" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "proxy-wasm", +] + +[[package]] +name = "cdn_log_time" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", +] + +[[package]] +name = "cdn_md2html" +version = "0.1.0" +dependencies = [ + "proxy-wasm", + "pulldown-cmark", +] + +[[package]] +name = "cdn_properties" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", + "querystring", +] + +[[package]] +name = "cdn_request_url" +version = "0.1.0" +dependencies = [ + "log", + "proxy-wasm", + "querystring", +] + +[[package]] +name = "cdn_variables_and_secrets" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "proxy-wasm", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[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 = "either" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" + +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +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 = "exr" +version = "1.74.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fastedge" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9042fccaffdd2171e8ff481e5c21d22f15b8a4454b37273c2f3f902fb3d375e" +dependencies = [ + "bytes", + "fastedge-derive 0.3.5", + "http", + "mime", + "thiserror", + "wit-bindgen 0.46.0", +] + +[[package]] +name = "fastedge" +version = "0.4.0" +dependencies = [ + "bytes", + "fastedge-derive 0.4.0", + "http", + "mime", + "serde_json", + "thiserror", + "wit-bindgen 0.46.0", +] + +[[package]] +name = "fastedge-derive" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acacf180f92cbdf6f2fe1a772b7d92301e430ba207fb15b2fc87ccab4e418ff9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fastedge-derive" +version = "0.4.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[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" +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 = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + +[[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 = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getopts" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "gif" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "handlebars" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43ccdfe15a81ab0a8af639e90254227c9a46afd9c5f5b6ec7efaa345c4b0f00" +dependencies = [ + "derive_builder", + "log", + "num-order", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "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 = "http_api_wrapper" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "http_backend" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "querystring", + "urlencoding", +] + +[[package]] +name = "http_cache" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.4.0", +] + +[[package]] +name = "http_hello_world" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", +] + +[[package]] +name = "http_markdown_render" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "mime", + "pulldown-cmark", + "url", +] + +[[package]] +name = "http_outbound_fetch" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "serde_json", +] + +[[package]] +name = "http_print" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", +] + +[[package]] +name = "http_s3upload" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "rusty-s3", + "url", +] + +[[package]] +name = "http_secret" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", +] + +[[package]] +name = "http_smart_switch" +version = "0.1.0" +dependencies = [ + "fastedge 0.3.5", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "http_wasi_cache" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.4.0", + "wstd", +] + +[[package]] +name = "http_wasi_geo_redirect" +version = "0.1.0" +dependencies = [ + "anyhow", + "wstd", +] + +[[package]] +name = "http_wasi_headers" +version = "0.1.0" +dependencies = [ + "anyhow", + "wstd", +] + +[[package]] +name = "http_wasi_hello_world" +version = "0.1.0" +dependencies = [ + "anyhow", + "wstd", +] + +[[package]] +name = "http_wasi_key_value" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "querystring", + "serde_json", + "wstd", +] + +[[package]] +name = "http_wasi_large_env_variable" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "wstd", +] + +[[package]] +name = "http_wasi_outbound_fetch" +version = "0.1.0" +dependencies = [ + "anyhow", + "serde_json", + "wstd", +] + +[[package]] +name = "http_wasi_print" +version = "0.1.0" +dependencies = [ + "anyhow", + "wstd", +] + +[[package]] +name = "http_wasi_secret_rollover" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "serde_json", + "wstd", +] + +[[package]] +name = "http_wasi_simple_fetch" +version = "0.1.0" +dependencies = [ + "anyhow", + "wstd", +] + +[[package]] +name = "http_wasi_variables_and_secrets" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "wstd", +] + +[[package]] +name = "http_watermark" +version = "0.1.0" +dependencies = [ + "anyhow", + "fastedge 0.3.5", + "image 0.24.9", + "rusty-s3", + "url", +] + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.24.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif 0.13.3", + "jpeg-decoder", + "num-traits", + "png 0.17.16", + "qoi", + "tiff 0.9.1", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "exr", + "gif 0.14.2", + "image-webp", + "moxcms", + "num-traits", + "png 0.18.1", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff 0.11.3", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imgref" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40fac9d56ed6437b198fddba683305e8e2d651aa42647f00f5ae542e7f5c94a2" + +[[package]] +name = "indexmap" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "jpeg-decoder" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "9.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" +dependencies = [ + "base64 0.22.1", + "js-sys", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "log" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "no_std_io2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +dependencies = [ + "memchr", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-modular" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" + +[[package]] +name = "num-order" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6" +dependencies = [ + "num-modular", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pest" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" +dependencies = [ + "memchr", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" +dependencies = [ + "pest", + "sha2", +] + +[[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 = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.11.1", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[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.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "proxy-wasm" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de8f6564bd52c2f4ff79fa5d1bd3bc10d8f822162af8d527e121e46703496aa0" +dependencies = [ + "hashbrown 0.16.1", + "log", +] + +[[package]] +name = "pulldown-cmark" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625" +dependencies = [ + "bitflags 2.11.1", + "getopts", + "memchr", + "pulldown-cmark-escape", + "unicase", +] + +[[package]] +name = "pulldown-cmark-escape" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" + +[[package]] +name = "pxfm" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" [[package]] -name = "autocfg" -version = "1.4.0" +name = "qoi" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] [[package]] -name = "bitflags" -version = "2.9.0" +name = "querystring" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "9318ead08c799aad12a55a3e78b82e0b6167271ffd1f627b758891282f739187" [[package]] -name = "bytes" -version = "1.10.1" +name = "quick-error" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] -name = "equivalent" -version = "1.0.2" +name = "quick-xml" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] [[package]] -name = "fastedge" -version = "0.4.0" +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ - "bytes", - "fastedge-derive", - "http", - "mime", - "serde_json", + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", "thiserror", - "wit-bindgen", + "v_frame", + "wasm-bindgen", ] [[package]] -name = "fastedge-derive" -version = "0.4.0" +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" dependencies = [ - "proc-macro2", - "quote", - "syn", + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "rayon" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] [[package]] -name = "foldhash" -version = "0.1.5" +name = "rayon-core" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] [[package]] -name = "futures" -version = "0.3.31" +name = "regex" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "futures-channel" -version = "0.3.31" +name = "regex-automata" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ - "futures-core", - "futures-sink", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "futures-core" -version = "0.3.31" +name = "regex-syntax" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] -name = "futures-executor" -version = "0.3.31" +name = "rgb" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ - "futures-core", - "futures-task", - "futures-util", + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys", ] [[package]] -name = "futures-io" -version = "0.3.31" +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] -name = "futures-macro" -version = "0.3.31" +name = "rusty-s3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "31aa883f1b986a5249641e574ca0e11ac4fb9970b009c6fbb96fedaf4fa78db8" +dependencies = [ + "base64 0.21.7", + "hmac", + "md-5", + "percent-encoding", + "quick-xml", + "serde", + "serde_json", + "sha2", + "time", + "url", + "zeroize", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[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", @@ -126,249 +2171,361 @@ dependencies = [ ] [[package]] -name = "futures-sink" -version = "0.3.31" +name = "serde_json" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] [[package]] -name = "futures-task" -version = "0.3.31" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] [[package]] -name = "futures-util" -version = "0.3.31" +name = "sha2" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "cfg-if", + "cpufeatures", + "digest", ] [[package]] -name = "hashbrown" -version = "0.15.2" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" dependencies = [ - "foldhash", + "quote", ] [[package]] -name = "heck" -version = "0.5.0" +name = "simple_asn1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] [[package]] -name = "http" -version = "1.3.1" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "bytes", - "fnv", - "itoa", + "autocfg", ] [[package]] -name = "id-arena" -version = "2.2.1" +name = "smallvec" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[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.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] [[package]] -name = "indexmap" -version = "2.8.0" +name = "time" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ - "equivalent", - "hashbrown", - "serde", + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", ] [[package]] -name = "itoa" -version = "1.0.15" +name = "time-core" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] -name = "leb128fmt" -version = "0.1.0" +name = "time-macros" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] [[package]] -name = "log" -version = "0.4.26" +name = "tinystr" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] [[package]] -name = "memchr" -version = "2.7.4" +name = "typenum" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] -name = "mime" -version = "0.3.17" +name = "ucd-trie" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] -name = "once_cell" -version = "1.21.1" +name = "unicase" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "unicode-ident" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "unicode-width" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] -name = "prettyplease" -version = "0.2.31" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" -dependencies = [ - "proc-macro2", - "syn", -] +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "proc-macro2" -version = "1.0.94" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" -dependencies = [ - "unicode-ident", -] +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "quote" -version = "1.0.40" +name = "url" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ - "proc-macro2", + "form_urlencoded", + "idna", + "percent-encoding", + "serde", ] [[package]] -name = "ryu" -version = "1.0.20" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] -name = "semver" -version = "1.0.26" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] -name = "serde" -version = "1.0.219" +name = "v_frame" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" dependencies = [ - "serde_derive", + "aligned-vec", + "num-traits", + "wasm-bindgen", ] [[package]] -name = "serde_derive" -version = "1.0.219" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "serde_json" -version = "1.0.140" +name = "waker-fn" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] -name = "slab" -version = "0.4.9" +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "autocfg", + "wit-bindgen 0.57.1", ] [[package]] -name = "syn" -version = "2.0.100" +name = "wasm-bindgen" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] -name = "thiserror" -version = "2.0.12" +name = "wasm-bindgen-macro" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ - "thiserror-impl", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "thiserror-impl" -version = "2.0.12" +name = "wasm-bindgen-macro-support" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", + "wasm-bindgen-shared", ] [[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-xid" -version = "0.2.6" +name = "wasm-bindgen-shared" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-encoder" @@ -398,24 +2555,112 @@ version = "0.239.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0" dependencies = [ - "bitflags", - "hashbrown", + "bitflags 2.11.1", + "hashbrown 0.15.2", "indexmap", "semver", ] +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[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.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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "wit-bindgen" version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" dependencies = [ - "bitflags", + "bitflags 2.11.1", "futures", "once_cell", "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +dependencies = [ + "bitflags 2.11.1", +] + [[package]] name = "wit-bindgen-core" version = "0.46.0" @@ -465,7 +2710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88a866b19dba2c94d706ec58c92a4c62ab63e482b4c935d2a085ac94caecb136" dependencies = [ "anyhow", - "bitflags", + "bitflags 2.11.1", "indexmap", "log", "serde", @@ -494,3 +2739,174 @@ dependencies = [ "unicode-xid", "wasmparser", ] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wstd" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0903606f1acdecad11576768ecc61ce215d6848652ac16c0e4592bb265e4200e" +dependencies = [ + "anyhow", + "async-task", + "bytes", + "futures-lite", + "http", + "http-body", + "http-body-util", + "itoa", + "pin-project-lite", + "serde", + "serde_json", + "slab", + "wasip2", + "wstd-macro", +] + +[[package]] +name = "wstd-macro" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6a9df01a7fb39fbe7e9b5ef76f586f06425dd6f2be350de4781936f72f9899d" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zune-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index d0cb623..93b5b46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,59 @@ [workspace] -members = ["derive", "."] +members = [ + ".", + "derive", + # CDN examples + "examples/cdn/ab_testing", + "examples/cdn/api_key", + "examples/cdn/body", + "examples/cdn/cache_control", + "examples/cdn/convert_image", + "examples/cdn/cors", + "examples/cdn/custom", + "examples/cdn/custom_error_pages", + "examples/cdn/geo_redirect", + "examples/cdn/geoblock", + "examples/cdn/headers", + "examples/cdn/hello_world", + "examples/cdn/http_call", + "examples/cdn/jwt", + "examples/cdn/key_value", + "examples/cdn/large_env_variable", + "examples/cdn/log_time", + "examples/cdn/md2html", + "examples/cdn/properties", + "examples/cdn/request_url", + "examples/cdn/variables_and_secrets", + # HTTP basic (sync) examples + "examples/http/basic/api_wrapper", + "examples/http/basic/backend", + "examples/http/basic/cache", + "examples/http/basic/hello_world", + "examples/http/basic/markdown_render", + "examples/http/basic/outbound_fetch", + "examples/http/basic/print", + "examples/http/basic/s3upload", + "examples/http/basic/secret", + "examples/http/basic/smart_switch", + "examples/http/basic/watermark", + # HTTP WASI (async) examples + "examples/http/wasi/cache", + "examples/http/wasi/geo_redirect", + "examples/http/wasi/headers", + "examples/http/wasi/hello_world", + "examples/http/wasi/key_value", + "examples/http/wasi/large_env_variable", + "examples/http/wasi/outbound_fetch", + "examples/http/wasi/print", + "examples/http/wasi/secret_rollover", + "examples/http/wasi/simple_fetch", + "examples/http/wasi/variables_and_secrets", +] +default-members = [".", "derive"] [workspace.package] version = "0.4.0" -edition = "2021" +edition = "2024" license = "Apache-2.0" description = "FastEdge Rust SDK that helps you to create edge cloud application using WASM" documentation = "https://docs.rs/fastedge" diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 41aeafb..19ebd41 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "fastedge-derive" version = { workspace = true } -edition = "2021" +edition = "2024" license = "Apache-2.0" description = "Procedural macros for the FastEdge Rust SDK" documentation = { workspace = true } diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 3e80c55..fedf110 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -154,11 +154,11 @@ pub fn http(_attr: TokenStream, item: TokenStream) -> TokenStream { } #[inline(always)] - #[no_mangle] + #[unsafe(no_mangle)] #func impl Guest for Component { - #[no_mangle] + #[unsafe(no_mangle)] fn process(req: ::fastedge::http_handler::Request) -> ::fastedge::http_handler::Response { let Ok(request) = req.try_into() else { diff --git a/examples/README.md b/examples/README.md index 762e1f7..f74e687 100644 --- a/examples/README.md +++ b/examples/README.md @@ -23,6 +23,7 @@ Examples are organized into three categories: | Example | Description | | --- | --- | | [hello_world](./http/wasi/hello_world/) | Simplest async request handler — returns a greeting with the request URL | +| [print](./http/wasi/print/) | Print request method, URL, and headers to the response body | | [headers](./http/wasi/headers/) | Echo request headers and add a custom header from an environment variable | | [variables_and_secrets](./http/wasi/variables_and_secrets/) | Read an environment variable and a secret | | [simple_fetch](./http/wasi/simple_fetch/) | Fetch from a configurable URL and return the response | diff --git a/examples/cdn/ab_testing/Cargo.toml b/examples/cdn/ab_testing/Cargo.toml index 17901d7..91f978b 100644 --- a/examples/cdn/ab_testing/Cargo.toml +++ b/examples/cdn/ab_testing/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "ab_testing" +name = "cdn_ab_testing" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/api_key/Cargo.toml b/examples/cdn/api_key/Cargo.toml index bb177db..8f954d8 100644 --- a/examples/cdn/api_key/Cargo.toml +++ b/examples/cdn/api_key/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "api_key" +name = "cdn_api_key" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/body/Cargo.toml b/examples/cdn/body/Cargo.toml index 364e849..6e6b13b 100644 --- a/examples/cdn/body/Cargo.toml +++ b/examples/cdn/body/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "body" +name = "cdn_body" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/cache_control/Cargo.toml b/examples/cdn/cache_control/Cargo.toml index 3c674b6..36b38b1 100644 --- a/examples/cdn/cache_control/Cargo.toml +++ b/examples/cdn/cache_control/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "cache_control" +name = "cdn_cache_control" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/convert_image/Cargo.toml b/examples/cdn/convert_image/Cargo.toml index 10ac836..10379cf 100644 --- a/examples/cdn/convert_image/Cargo.toml +++ b/examples/cdn/convert_image/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "convert_image" +name = "cdn_convert_image" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/cors/Cargo.toml b/examples/cdn/cors/Cargo.toml index 5e7692b..33a77fc 100644 --- a/examples/cdn/cors/Cargo.toml +++ b/examples/cdn/cors/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "cors" +name = "cdn_cors" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/custom/Cargo.toml b/examples/cdn/custom/Cargo.toml index 1762550..de22910 100644 --- a/examples/cdn/custom/Cargo.toml +++ b/examples/cdn/custom/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "custom" +name = "cdn_custom" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/custom_error_pages/Cargo.toml b/examples/cdn/custom_error_pages/Cargo.toml index 538bb6a..877541e 100644 --- a/examples/cdn/custom_error_pages/Cargo.toml +++ b/examples/cdn/custom_error_pages/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "custom_error_pages" +name = "cdn_custom_error_pages" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/geo_redirect/Cargo.toml b/examples/cdn/geo_redirect/Cargo.toml index 56720af..0e0db0e 100644 --- a/examples/cdn/geo_redirect/Cargo.toml +++ b/examples/cdn/geo_redirect/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "geo_redirect" +name = "cdn_geo_redirect" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/geoblock/Cargo.toml b/examples/cdn/geoblock/Cargo.toml index b8fd801..05461b6 100644 --- a/examples/cdn/geoblock/Cargo.toml +++ b/examples/cdn/geoblock/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "geoblock" +name = "cdn_geoblock" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/headers/Cargo.toml b/examples/cdn/headers/Cargo.toml index a2f61ab..3bace33 100644 --- a/examples/cdn/headers/Cargo.toml +++ b/examples/cdn/headers/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "headers" +name = "cdn_headers" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/hello_world/Cargo.toml b/examples/cdn/hello_world/Cargo.toml index 8c6cf27..02ac43d 100644 --- a/examples/cdn/hello_world/Cargo.toml +++ b/examples/cdn/hello_world/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "hello_world" +name = "cdn_hello_world" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/http_call/Cargo.toml b/examples/cdn/http_call/Cargo.toml index a6cadc2..c4fed9a 100644 --- a/examples/cdn/http_call/Cargo.toml +++ b/examples/cdn/http_call/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "http_call" +name = "cdn_http_call" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/jwt/Cargo.toml b/examples/cdn/jwt/Cargo.toml index 73fb756..5fac142 100644 --- a/examples/cdn/jwt/Cargo.toml +++ b/examples/cdn/jwt/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "jwt" +name = "cdn_jwt" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/key_value/Cargo.toml b/examples/cdn/key_value/Cargo.toml index cf42af4..b5878e2 100644 --- a/examples/cdn/key_value/Cargo.toml +++ b/examples/cdn/key_value/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "key_value" +name = "cdn_key_value" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/large_env_variable/Cargo.toml b/examples/cdn/large_env_variable/Cargo.toml index 239442e..b032bc2 100644 --- a/examples/cdn/large_env_variable/Cargo.toml +++ b/examples/cdn/large_env_variable/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "large_env_variable" +name = "cdn_large_env_variable" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/log_time/Cargo.toml b/examples/cdn/log_time/Cargo.toml index beced70..a6c7be4 100644 --- a/examples/cdn/log_time/Cargo.toml +++ b/examples/cdn/log_time/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "log_time" +name = "cdn_log_time" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/md2html/Cargo.toml b/examples/cdn/md2html/Cargo.toml index 79f69ac..15b71c8 100644 --- a/examples/cdn/md2html/Cargo.toml +++ b/examples/cdn/md2html/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "md2html" +name = "cdn_md2html" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/properties/Cargo.toml b/examples/cdn/properties/Cargo.toml index c31766e..1f6071c 100644 --- a/examples/cdn/properties/Cargo.toml +++ b/examples/cdn/properties/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "properties" +name = "cdn_properties" version = "0.1.0" edition = "2024" diff --git a/examples/cdn/request_url/Cargo.toml b/examples/cdn/request_url/Cargo.toml new file mode 100644 index 0000000..09c5f02 --- /dev/null +++ b/examples/cdn/request_url/Cargo.toml @@ -0,0 +1,13 @@ + +[package] +name = "cdn_request_url" +version = "0.1.0" +edition = "2024" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +log = "0.4" +proxy-wasm = "0.2" +querystring = "1.1" diff --git a/examples/cdn/request_url/README.md b/examples/cdn/request_url/README.md new file mode 100644 index 0000000..d833a64 --- /dev/null +++ b/examples/cdn/request_url/README.md @@ -0,0 +1,43 @@ +[← Back to examples](../../README.md) + +# Request URL (CDN) + +A CDN proxy-wasm filter that rewrites outbound request properties — URL, host, path, and query string — based on incoming request headers. + +## What it does + +On each incoming HTTP request the filter reads the following special headers and, if present, overwrites the corresponding request property before the request is forwarded to the origin: + +| Header | Property overwritten | +|--------|----------------------| +| `set-url` | `request.url` — full request URL | +| `set-host` | `request.host` — host name | +| `set-path` | `request.path` — URL path | +| `set-query` | `request.query` — query string | + +It also writes a custom Nginx log field `nginx.log_field1` on every request. + +## Use cases + +- Rewrite the upstream URL at the edge without changing client-visible headers. +- Override the request host for multi-tenant routing. +- Strip or replace the path / query string before hitting the origin. + +## Build + +```bash +cargo build --target wasm32-wasip1 --release +``` + +## Example + +Forward a request but override the path and query string: + +```http +GET /original-path HTTP/1.1 +Host: example.com +set-path: /new-path +set-query: page=2&limit=10 +``` + +The filter rewrites `request.path` to `/new-path` and `request.query` to `page=2&limit=10` before the request reaches the origin. diff --git a/examples/cdn/request_url/src/lib.rs b/examples/cdn/request_url/src/lib.rs new file mode 100644 index 0000000..a4f4d8d --- /dev/null +++ b/examples/cdn/request_url/src/lib.rs @@ -0,0 +1,103 @@ +use log::info; +use proxy_wasm::traits::*; +use proxy_wasm::types::*; + +proxy_wasm::main! {{ + proxy_wasm::set_log_level(LogLevel::Trace); + proxy_wasm::set_root_context(|_| -> Box { Box::new(HttpHeadersRoot) }); +}} + +struct HttpHeadersRoot; + +impl Context for HttpHeadersRoot {} + +impl RootContext for HttpHeadersRoot { + fn create_http_context(&self, context_id: u32) -> Option> { + Some(Box::new(HttpHeaders { context_id })) + } + + fn get_type(&self) -> Option { + Some(ContextType::HttpContext) + } +} + +struct HttpHeaders { + context_id: u32, +} + +impl Context for HttpHeaders {} + +pub const REQUEST_URI: &str = "request.url"; +pub const REQUEST_HOST: &str = "request.host"; +pub const REQUEST_PATH: &str = "request.path"; +pub const REQUEST_QUERY: &str = "request.query"; + +impl HttpContext for HttpHeaders { + fn on_http_request_headers(&mut self, _: usize, _: bool) -> Action { + + let Some(uri) = self.get_property(vec![REQUEST_URI]) else { + self.send_http_response(551, vec![], None); + return Action::Pause; + }; + self.add_http_request_header_bytes("request-uri", &uri); + + let Some(host) = self.get_property(vec![REQUEST_HOST]) else { + self.send_http_response(552, vec![], None); + return Action::Pause; + }; + self.add_http_request_header_bytes("request-host", &host); + + let Some(path) = self.get_property(vec![REQUEST_PATH]) else { + self.send_http_response(553, vec![], None); + return Action::Pause; + }; + self.add_http_request_header_bytes("request-path", &path); + + let Some(query) = self.get_property(vec![REQUEST_QUERY]) else { + self.send_http_response(554, vec![], None); + return Action::Pause; + }; + self.add_http_request_header_bytes("request-query", &query); + + if let Some(new_url) = self.get_http_request_header("set-url") { + self.set_property( + vec!["request.url"], + Some(new_url.as_bytes()), + ); + } + + if let Some(new_host) = self.get_http_request_header("set-host") { + self.set_property( + vec!["request.host"], + Some(new_host.as_bytes()), + ); + } + + if let Some(new_path) = self.get_http_request_header("set-path") { + self.set_property( + vec!["request.path"], + Some(new_path.as_bytes()), + ); + } + + if let Some(new_query) = self.get_http_request_header("set-query") { + self.set_property( + vec!["request.query"], + Some(new_query.as_bytes()), + ); + } + + self.set_property( + vec!["nginx.log_field1"], + Some(b"from_wasm nginx.log_field1"), + ); + + Action::Continue + } + + fn on_log(&mut self) { + info!("#{} completed.", self.context_id); + } +} + + diff --git a/examples/cdn/variables_and_secrets/Cargo.toml b/examples/cdn/variables_and_secrets/Cargo.toml index 853a2e1..82459f6 100644 --- a/examples/cdn/variables_and_secrets/Cargo.toml +++ b/examples/cdn/variables_and_secrets/Cargo.toml @@ -1,7 +1,6 @@ -[workspace] [package] -name = "variables_and_secrets" +name = "cdn_variables_and_secrets" version = "0.1.0" edition = "2024" diff --git a/examples/http/basic/api_wrapper/Cargo.toml b/examples/http/basic/api_wrapper/Cargo.toml index 600ddd7..6e32b49 100644 --- a/examples/http/basic/api_wrapper/Cargo.toml +++ b/examples/http/basic/api_wrapper/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "api_wrapper" +name = "http_api_wrapper" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/backend/Cargo.toml b/examples/http/basic/backend/Cargo.toml index bd0151e..de3ce0b 100644 --- a/examples/http/basic/backend/Cargo.toml +++ b/examples/http/basic/backend/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "backend" +name = "http_backend" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/cache/Cargo.toml b/examples/http/basic/cache/Cargo.toml index 262ec27..9303557 100644 --- a/examples/http/basic/cache/Cargo.toml +++ b/examples/http/basic/cache/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "cache_basic" +name = "http_cache" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/hello_world/Cargo.toml b/examples/http/basic/hello_world/Cargo.toml index e19e89b..840abd4 100644 --- a/examples/http/basic/hello_world/Cargo.toml +++ b/examples/http/basic/hello_world/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "hello_world" +name = "http_hello_world" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/markdown_render/Cargo.toml b/examples/http/basic/markdown_render/Cargo.toml index fab0ee3..265397c 100644 --- a/examples/http/basic/markdown_render/Cargo.toml +++ b/examples/http/basic/markdown_render/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "markdown_render" +name = "http_markdown_render" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/outbound_fetch/Cargo.toml b/examples/http/basic/outbound_fetch/Cargo.toml index dc9d9ac..bd655e9 100644 --- a/examples/http/basic/outbound_fetch/Cargo.toml +++ b/examples/http/basic/outbound_fetch/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "outbound_fetch" +name = "http_outbound_fetch" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/print/Cargo.toml b/examples/http/basic/print/Cargo.toml index 4fd20da..75ebae3 100644 --- a/examples/http/basic/print/Cargo.toml +++ b/examples/http/basic/print/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "print" +name = "http_print" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/s3upload/Cargo.toml b/examples/http/basic/s3upload/Cargo.toml index 6cf887c..11a4e68 100644 --- a/examples/http/basic/s3upload/Cargo.toml +++ b/examples/http/basic/s3upload/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "s3upload" +name = "http_s3upload" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/secret/Cargo.toml b/examples/http/basic/secret/Cargo.toml index 43eee82..73059a2 100644 --- a/examples/http/basic/secret/Cargo.toml +++ b/examples/http/basic/secret/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "secret" +name = "http_secret" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/smart_switch/Cargo.toml b/examples/http/basic/smart_switch/Cargo.toml index 2a0668f..7b78fcc 100644 --- a/examples/http/basic/smart_switch/Cargo.toml +++ b/examples/http/basic/smart_switch/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "smart_switch" +name = "http_smart_switch" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/basic/watermark/Cargo.toml b/examples/http/basic/watermark/Cargo.toml index cadf9ac..0477266 100644 --- a/examples/http/basic/watermark/Cargo.toml +++ b/examples/http/basic/watermark/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "watermark" +name = "http_watermark" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/cache/Cargo.lock b/examples/http/wasi/cache/Cargo.lock index 0354cbc..27d247b 100644 --- a/examples/http/wasi/cache/Cargo.lock +++ b/examples/http/wasi/cache/Cargo.lock @@ -49,7 +49,7 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "fastedge" -version = "0.3.5" +version = "0.4.0" dependencies = [ "bytes", "fastedge-derive", @@ -61,7 +61,7 @@ dependencies = [ [[package]] name = "fastedge-derive" -version = "0.3.5" +version = "0.4.0" dependencies = [ "proc-macro2", "quote", diff --git a/examples/http/wasi/cache/Cargo.toml b/examples/http/wasi/cache/Cargo.toml index beaf859..39f701f 100644 --- a/examples/http/wasi/cache/Cargo.toml +++ b/examples/http/wasi/cache/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "cache_wasi" +name = "http_wasi_cache" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/geo_redirect/Cargo.toml b/examples/http/wasi/geo_redirect/Cargo.toml index 0cfa7a2..e12dc14 100644 --- a/examples/http/wasi/geo_redirect/Cargo.toml +++ b/examples/http/wasi/geo_redirect/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "geo_redirect_wasi" +name = "http_wasi_geo_redirect" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/headers/Cargo.toml b/examples/http/wasi/headers/Cargo.toml index c0cd05a..8260efc 100644 --- a/examples/http/wasi/headers/Cargo.toml +++ b/examples/http/wasi/headers/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "headers" +name = "http_wasi_headers" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/hello_world/Cargo.toml b/examples/http/wasi/hello_world/Cargo.toml index 16112af..7c0ddf0 100644 --- a/examples/http/wasi/hello_world/Cargo.toml +++ b/examples/http/wasi/hello_world/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "hello_world" +name = "http_wasi_hello_world" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/key_value/Cargo.toml b/examples/http/wasi/key_value/Cargo.toml index 37b1ae0..d488dc5 100644 --- a/examples/http/wasi/key_value/Cargo.toml +++ b/examples/http/wasi/key_value/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "key_value_wasi" +name = "http_wasi_key_value" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/large_env_variable/Cargo.toml b/examples/http/wasi/large_env_variable/Cargo.toml index 09c0101..807fd3b 100644 --- a/examples/http/wasi/large_env_variable/Cargo.toml +++ b/examples/http/wasi/large_env_variable/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "large_env_variable" +name = "http_wasi_large_env_variable" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/outbound_fetch/Cargo.toml b/examples/http/wasi/outbound_fetch/Cargo.toml index 58c8a28..fedd7d8 100644 --- a/examples/http/wasi/outbound_fetch/Cargo.toml +++ b/examples/http/wasi/outbound_fetch/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "outbound_fetch" +name = "http_wasi_outbound_fetch" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/outbound_fetch/src/lib.rs b/examples/http/wasi/outbound_fetch/src/lib.rs index 70c6fca..1f6cc79 100644 --- a/examples/http/wasi/outbound_fetch/src/lib.rs +++ b/examples/http/wasi/outbound_fetch/src/lib.rs @@ -1,11 +1,18 @@ use anyhow::anyhow; use wstd::http::body::Body; use wstd::http::{Client, Request, Response}; -use serde_json::{json, Value}; #[wstd::http_server] async fn main(_request: Request) -> anyhow::Result> { - let upstream_req = Request::get("http://jsonplaceholder.typicode.com/users") + let origin = match std::env::var("ORIGIN") { + Ok(origin) => origin, + Err(_) => { + return Ok(Response::builder() + .status(500) + .body(Body::from("ORIGIN is not set"))?); + } + }; + let upstream_req = Request::get(origin) .body(Body::empty()) .map_err(|e| anyhow!("failed to build request: {e}"))?; @@ -15,24 +22,5 @@ async fn main(_request: Request) -> anyhow::Result> { .await .map_err(|e| anyhow!("request failed: {e}"))?; - let (_, mut body) = upstream_resp.into_parts(); - let body_bytes = body.contents().await?; - let users: Value = serde_json::from_slice(body_bytes)?; - - let sliced_users = match users.as_array() { - Some(arr) => Value::Array(arr.iter().take(5).cloned().collect()), - None => Value::Array(vec![]), - }; - - let result = json!({ - "users": sliced_users, - "total": 5, - "skip": 0, - "limit": 30, - }); - - Ok(Response::builder() - .status(200) - .header("content-type", "application/json") - .body(Body::from(result.to_string()))?) + Ok(upstream_resp) } diff --git a/examples/http/wasi/print/Cargo.toml b/examples/http/wasi/print/Cargo.toml new file mode 100644 index 0000000..ee8fa74 --- /dev/null +++ b/examples/http/wasi/print/Cargo.toml @@ -0,0 +1,13 @@ + + +[package] +name = "http_wasi_print" +version = "0.1.0" +edition = "2024" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +wstd = "0.6" +anyhow = "1" diff --git a/examples/http/wasi/print/README.md b/examples/http/wasi/print/README.md new file mode 100644 index 0000000..af4978c --- /dev/null +++ b/examples/http/wasi/print/README.md @@ -0,0 +1,5 @@ +[← Back to examples](../../../README.md) + +# Print (WASI) + +Prints the request method, URL, and all headers to the response body. Useful for debugging and inspecting incoming requests. diff --git a/examples/http/wasi/print/src/lib.rs b/examples/http/wasi/print/src/lib.rs new file mode 100644 index 0000000..78f75d0 --- /dev/null +++ b/examples/http/wasi/print/src/lib.rs @@ -0,0 +1,28 @@ +use wstd::http::body::Body; +use wstd::http::{Request, Response, StatusCode}; + +#[wstd::http_server] +async fn main(request: Request) -> anyhow::Result> { + let mut body: String = "Method: ".to_string(); + body.push_str(request.method().as_str()); + + body.push_str("\nURL: "); + body.push_str(request.uri().to_string().as_str()); + + body.push_str("\nHeaders:"); + for (h, v) in request.headers() { + body.push_str("\n "); + body.push_str(h.as_str()); + body.push_str(": "); + match v.to_str() { + Err(_) => body.push_str("not a valid text"), + Ok(a) => body.push_str(a), + } + } + + println!("{}", body); + + Ok(Response::builder() + .status(StatusCode::OK) + .body(Body::from(body))?) +} diff --git a/examples/http/wasi/secret_rollover/Cargo.toml b/examples/http/wasi/secret_rollover/Cargo.toml index 050ff36..e1df70e 100644 --- a/examples/http/wasi/secret_rollover/Cargo.toml +++ b/examples/http/wasi/secret_rollover/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "secret_rollover" +name = "http_wasi_secret_rollover" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/examples/http/wasi/simple_fetch/Cargo.toml b/examples/http/wasi/simple_fetch/Cargo.toml index e2a5e42..6d43351 100644 --- a/examples/http/wasi/simple_fetch/Cargo.toml +++ b/examples/http/wasi/simple_fetch/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "simple_fetch" +name = "http_wasi_simple_fetch" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false [lib] diff --git a/examples/http/wasi/variables_and_secrets/Cargo.toml b/examples/http/wasi/variables_and_secrets/Cargo.toml index d23d4e1..d434cad 100644 --- a/examples/http/wasi/variables_and_secrets/Cargo.toml +++ b/examples/http/wasi/variables_and_secrets/Cargo.toml @@ -1,9 +1,8 @@ -[workspace] [package] -name = "variables_and_secrets" +name = "http_wasi_variables_and_secrets" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib"] diff --git a/src/proxywasm/mod.rs b/src/proxywasm/mod.rs index 58fdf56..229bb8c 100644 --- a/src/proxywasm/mod.rs +++ b/src/proxywasm/mod.rs @@ -32,7 +32,7 @@ pub mod secret; pub mod dictionary; pub mod utils; -extern "C" { +unsafe extern "C" { fn proxy_secret_get( key_data: *const u8, key_size: usize,