Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place

add build scripts to cli

+24
cli/.gitignore
··· 1 + .DS_STORE 2 + jacquard/ 3 + binaries/ 4 + # Generated by Cargo 5 + # will have compiled files and executables 6 + debug 7 + target 8 + 9 + # These are backup files generated by rustfmt 10 + **/*.rs.bk 11 + 12 + # MSVC Windows builds of rustc generate these, which store debugging information 13 + *.pdb 14 + 15 + # Generated by cargo mutants 16 + # Contains mutation testing data 17 + **/mutants.out*/ 18 + 19 + # RustRover 20 + # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 21 + # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 22 + # and can be added to the global gitignore or merged into this file. For a more nuclear 23 + # option (not recommended) you can uncomment the following to ignore the entire idea folder. 24 + #.idea/
-149
cli/Cargo.lock
··· 922 922 checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 923 923 924 924 [[package]] 925 - name = "foreign-types" 926 - version = "0.3.2" 927 - source = "registry+https://github.com/rust-lang/crates.io-index" 928 - checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 929 - dependencies = [ 930 - "foreign-types-shared", 931 - ] 932 - 933 - [[package]] 934 - name = "foreign-types-shared" 935 - version = "0.1.1" 936 - source = "registry+https://github.com/rust-lang/crates.io-index" 937 - checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 938 - 939 - [[package]] 940 925 name = "form_urlencoded" 941 926 version = "1.2.2" 942 927 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1337 1322 "tokio-rustls", 1338 1323 "tower-service", 1339 1324 "webpki-roots", 1340 - ] 1341 - 1342 - [[package]] 1343 - name = "hyper-tls" 1344 - version = "0.6.0" 1345 - source = "registry+https://github.com/rust-lang/crates.io-index" 1346 - checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 1347 - dependencies = [ 1348 - "bytes", 1349 - "http-body-util", 1350 - "hyper", 1351 - "hyper-util", 1352 - "native-tls", 1353 - "tokio", 1354 - "tokio-native-tls", 1355 - "tower-service", 1356 1325 ] 1357 1326 1358 1327 [[package]] ··· 2132 2101 ] 2133 2102 2134 2103 [[package]] 2135 - name = "native-tls" 2136 - version = "0.2.14" 2137 - source = "registry+https://github.com/rust-lang/crates.io-index" 2138 - checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 2139 - dependencies = [ 2140 - "libc", 2141 - "log", 2142 - "openssl", 2143 - "openssl-probe", 2144 - "openssl-sys", 2145 - "schannel", 2146 - "security-framework", 2147 - "security-framework-sys", 2148 - "tempfile", 2149 - ] 2150 - 2151 - [[package]] 2152 2104 name = "ndk-context" 2153 2105 version = "0.1.1" 2154 2106 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2288 2240 checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" 2289 2241 2290 2242 [[package]] 2291 - name = "openssl" 2292 - version = "0.10.74" 2293 - source = "registry+https://github.com/rust-lang/crates.io-index" 2294 - checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" 2295 - dependencies = [ 2296 - "bitflags", 2297 - "cfg-if", 2298 - "foreign-types", 2299 - "libc", 2300 - "once_cell", 2301 - "openssl-macros", 2302 - "openssl-sys", 2303 - ] 2304 - 2305 - [[package]] 2306 - name = "openssl-macros" 2307 - version = "0.1.1" 2308 - source = "registry+https://github.com/rust-lang/crates.io-index" 2309 - checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 2310 - dependencies = [ 2311 - "proc-macro2", 2312 - "quote", 2313 - "syn 2.0.108", 2314 - ] 2315 - 2316 - [[package]] 2317 - name = "openssl-probe" 2318 - version = "0.1.6" 2319 - source = "registry+https://github.com/rust-lang/crates.io-index" 2320 - checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 2321 - 2322 - [[package]] 2323 - name = "openssl-sys" 2324 - version = "0.9.110" 2325 - source = "registry+https://github.com/rust-lang/crates.io-index" 2326 - checksum = "0a9f0075ba3c21b09f8e8b2026584b1d18d49388648f2fbbf3c97ea8deced8e2" 2327 - dependencies = [ 2328 - "cc", 2329 - "libc", 2330 - "pkg-config", 2331 - "vcpkg", 2332 - ] 2333 - 2334 - [[package]] 2335 2243 name = "option-ext" 2336 2244 version = "0.2.0" 2337 2245 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2499 2407 ] 2500 2408 2501 2409 [[package]] 2502 - name = "pkg-config" 2503 - version = "0.3.32" 2504 - source = "registry+https://github.com/rust-lang/crates.io-index" 2505 - checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 2506 - 2507 - [[package]] 2508 2410 name = "potential_utf" 2509 2411 version = "0.1.4" 2510 2412 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2827 2729 "http-body-util", 2828 2730 "hyper", 2829 2731 "hyper-rustls", 2830 - "hyper-tls", 2831 2732 "hyper-util", 2832 2733 "js-sys", 2833 2734 "log", 2834 2735 "mime", 2835 - "native-tls", 2836 2736 "percent-encoding", 2837 2737 "pin-project-lite", 2838 2738 "quinn", ··· 2843 2743 "serde_urlencoded", 2844 2744 "sync_wrapper", 2845 2745 "tokio", 2846 - "tokio-native-tls", 2847 2746 "tokio-rustls", 2848 2747 "tokio-util", 2849 2748 "tower", ··· 3019 2918 ] 3020 2919 3021 2920 [[package]] 3022 - name = "schannel" 3023 - version = "0.1.28" 3024 - source = "registry+https://github.com/rust-lang/crates.io-index" 3025 - checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" 3026 - dependencies = [ 3027 - "windows-sys 0.61.2", 3028 - ] 3029 - 3030 - [[package]] 3031 2921 name = "schemars" 3032 2922 version = "0.9.0" 3033 2923 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3072 2962 ] 3073 2963 3074 2964 [[package]] 3075 - name = "security-framework" 3076 - version = "2.11.1" 3077 - source = "registry+https://github.com/rust-lang/crates.io-index" 3078 - checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 3079 - dependencies = [ 3080 - "bitflags", 3081 - "core-foundation 0.9.4", 3082 - "core-foundation-sys", 3083 - "libc", 3084 - "security-framework-sys", 3085 - ] 3086 - 3087 - [[package]] 3088 - name = "security-framework-sys" 3089 - version = "2.15.0" 3090 - source = "registry+https://github.com/rust-lang/crates.io-index" 3091 - checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" 3092 - dependencies = [ 3093 - "core-foundation-sys", 3094 - "libc", 3095 - ] 3096 - 3097 - [[package]] 3098 2965 name = "serde" 3099 2966 version = "1.0.228" 3100 2967 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3698 3565 ] 3699 3566 3700 3567 [[package]] 3701 - name = "tokio-native-tls" 3702 - version = "0.3.1" 3703 - source = "registry+https://github.com/rust-lang/crates.io-index" 3704 - checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 3705 - dependencies = [ 3706 - "native-tls", 3707 - "tokio", 3708 - ] 3709 - 3710 - [[package]] 3711 3568 name = "tokio-rustls" 3712 3569 version = "0.26.4" 3713 3570 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3927 3784 version = "0.2.2" 3928 3785 source = "registry+https://github.com/rust-lang/crates.io-index" 3929 3786 checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 3930 - 3931 - [[package]] 3932 - name = "vcpkg" 3933 - version = "0.2.15" 3934 - source = "registry+https://github.com/rust-lang/crates.io-index" 3935 - checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3936 3787 3937 3788 [[package]] 3938 3789 name = "version_check"
+2 -1
cli/Cargo.toml
··· 21 21 serde_json = "1.0.145" 22 22 serde = { version = "1.0", features = ["derive"] } 23 23 shellexpand = "3.1.1" 24 - reqwest = "0.12" 24 + #reqwest = "0.12" 25 + reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] } 25 26 rustversion = "1.0" 26 27 flate2 = "1.0" 27 28 base64 = "0.22"
+23
cli/build-linux.sh
··· 1 + #!/usr/bin/env bash 2 + # Build Linux binaries (statically linked) 3 + set -e 4 + mkdir -p binaries 5 + 6 + # Build Linux binaries 7 + echo "Building Linux binaries..." 8 + 9 + echo "Building Linux ARM64 (static)..." 10 + nix-shell -p rustup --run ' 11 + rustup target add aarch64-unknown-linux-musl 12 + RUSTFLAGS="-C target-feature=+crt-static" cargo zigbuild --release --target aarch64-unknown-linux-musl 13 + ' 14 + cp target/aarch64-unknown-linux-musl/release/wisp-cli binaries/wisp-cli-aarch64-linux 15 + 16 + echo "Building Linux x86_64 (static)..." 17 + nix-shell -p rustup --run ' 18 + rustup target add x86_64-unknown-linux-musl 19 + RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-unknown-linux-musl 20 + ' 21 + cp target/x86_64-unknown-linux-musl/release/wisp-cli binaries/wisp-cli-x86_64-linux 22 + 23 + echo "Done! Binaries in ./binaries/"
+15
cli/build-macos.sh
··· 1 + #!/bin/bash 2 + # Build Linux and macOS binaries 3 + 4 + set -e 5 + 6 + mkdir -p binaries 7 + rm -rf target 8 + 9 + # Build macOS binaries natively 10 + echo "Building macOS binaries..." 11 + rustup target add aarch64-apple-darwin 12 + 13 + echo "Building macOS arm64 binary." 14 + RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target aarch64-apple-darwin 15 + cp target/aarch64-apple-darwin/release/wisp-cli binaries/wisp-cli-macos-arm64
-14
cli/test_headers.rs
··· 1 - use http::Request; 2 - 3 - fn main() { 4 - let builder = Request::builder() 5 - .header(http::header::CONTENT_TYPE, "*/*") 6 - .header(http::header::CONTENT_TYPE, "application/octet-stream"); 7 - 8 - let req = builder.body(()).unwrap(); 9 - 10 - println!("Content-Type headers:"); 11 - for value in req.headers().get_all(http::header::CONTENT_TYPE) { 12 - println!(" {:?}", value); 13 - } 14 - }