diff --git a/Cargo.lock b/Cargo.lock index 2bb4add..7eb19f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,15 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aho-corasick" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" version = "1.0.75" @@ -40,12 +31,11 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c950a809d39bc9480207cb1cfc879ace88ea7e3a4392a8e9999e45d6e5692e" +checksum = "3182c19847238b50b62ae0383a6dbfc14514e552eb5e307e1ea83ccf5840b8a6" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-sdk-sso", "aws-sdk-ssooidc", @@ -60,7 +50,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http", + "http 0.2.9", "hyper", "ring 0.17.5", "time", @@ -71,9 +61,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1317e1a3514b103cf7d5828bbab3b4d30f56bd22d684f8568bc51b6cfbbb1c" +checksum = "e5635d8707f265c773282a22abe1ecd4fbe96a8eb2f0f14c0796f8016f11a41a" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -81,51 +71,36 @@ dependencies = [ "zeroize", ] -[[package]] -name = "aws-http" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361c4310fdce94328cc2d1ca0c8a48c13f43009c61d3367585685a50ca8c66b6" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http", - "http-body", - "pin-project-lite", - "tracing", -] - [[package]] name = "aws-runtime" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed7ef604a15fd0d4d9e43701295161ea6b504b63c44990ead352afea2bc15e9" +checksum = "6f82b9ae2adfd9d6582440d0eeb394c07f74d21b4c0cc72bdb73735c9e1a9c0e" dependencies = [ "aws-credential-types", - "aws-http", "aws-sigv4", "aws-smithy-async", "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", + "bytes", "fastrand", - "http", + "http 0.2.9", + "http-body", "percent-encoding", + "pin-project-lite", "tracing", "uuid", ] [[package]] name = "aws-sdk-ec2" -version = "1.3.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3c8f50ef601c7c38da0319262760a7bc15efa25cb805e6a837818bbf77c4f9" +checksum = "e462a754158c044480c161e93052a51bd0bb5e6dc4b74458400c93741f3871e6" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", "aws-smithy-http", @@ -137,19 +112,19 @@ dependencies = [ "aws-smithy-xml", "aws-types", "fastrand", - "http", - "regex", + "http 0.2.9", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-pricing" -version = "1.3.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9aecd402d5f5fbefdc3607ee7bf690cc00c86b02ac74d9307d7278eff3336" +checksum = "38763c76b30abbc22791c13ba1d685d49dd5d8e3349b2108f54ddb7de1201313" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", "aws-smithy-http", @@ -159,19 +134,19 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", - "regex", + "http 0.2.9", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-sso" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155bd9419f2ded0626c93eb79b7ce7e195f95e3289335cba659783c6f9029ae9" +checksum = "ca7e8097448832fcd22faf6bb227e97d76b40e354509d1307653a885811c7151" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", "aws-smithy-http", @@ -181,19 +156,19 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", - "regex", + "http 0.2.9", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-ssooidc" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2d7d0155d3bef6c3210e77c37865a9878ef316dce28474afedb3459de23c6" +checksum = "a75073590e23d63044606771afae309fada8eb10ded54a1ce4598347221d3fef" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", "aws-smithy-http", @@ -203,19 +178,19 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", - "regex", + "http 0.2.9", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-sts" -version = "1.2.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabefa95e53cb4e1a17578342b3510b8f1c04bc6cfe89b2539920c30c321fd5c" +checksum = "650e4aaae41547151dea4d8142f7ffcc8ab8ba76d5dccc8933936ef2102c3356" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", "aws-smithy-http", @@ -226,16 +201,17 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "http", - "regex", + "http 0.2.9", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sigv4" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380adcc8134ad8bbdfeb2ace7626a869914ee266322965276cbc54066186d236" +checksum = "404c64a104188ac70dd1684718765cb5559795458e446480e41984e68e57d888" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -245,10 +221,10 @@ dependencies = [ "form_urlencoded", "hex", "hmac", - "http", + "http 0.2.9", + "http 1.0.0", "once_cell", "percent-encoding", - "regex", "sha2", "time", "tracing", @@ -256,9 +232,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbfa248f7f966d73e325dbc85851a5500042b6d96e3c3b535a8527707f36fe4" +checksum = "8ec441341e019c441aa78472ed6d206cfe198026c495277a95ac5bebda520742" dependencies = [ "futures-util", "pin-project-lite", @@ -267,16 +243,16 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.0" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1de8aee22f67de467b2e3d0dd0fb30859dc53f579a63bd5381766b987db644" +checksum = "85d6a0619f7b67183067fa3b558f94f90753da2df8c04aeb7336d673f804b0b8" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "bytes-utils", "futures-core", - "http", + "http 0.2.9", "http-body", "once_cell", "percent-encoding", @@ -287,18 +263,18 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.60.0" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a46dd338dc9576d6a6a5b5a19bd678dcad018ececee11cf28ecd7588bd1a55c" +checksum = "a1c1b5186b6f5c579bf0de1bcca9dd3d946d6d51361ea1d18131f6a0b64e13ae" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-query" -version = "0.60.0" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5b8c7a86d4b6399169670723b7e6f21a39fc833a30f5c5a2f997608178129" +checksum = "1c0a2ce65882e788d2cf83ff28b9b16918de0460c47bf66c5da4f6c17b4c9694" dependencies = [ "aws-smithy-types", "urlencoding", @@ -306,9 +282,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "064b808143d80b50744b1b22cce801238a545b84859c6cf8e275997252dd1d25" +checksum = "3b36f1f98c8d7b6256b86d4a3c8c4abb120670267baa9712a485ba477eaac9e9" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -316,7 +292,8 @@ dependencies = [ "aws-smithy-types", "bytes", "fastrand", - "http", + "h2", + "http 0.2.9", "http-body", "hyper", "hyper-rustls", @@ -330,14 +307,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d27c3235d4972ed976b5c1a82286e7c4457f618f3c2ae6d4ae44f081dd24575" +checksum = "180898ed701a773fb3fadbd94b9e9559125cf88eeb1815ab99e35d4f5f34f7fb" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", - "http", + "http 0.2.9", + "http 1.0.0", "pin-project-lite", "tokio", "tracing", @@ -346,15 +324,15 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fc32035dc0636a8583cf0c6dd7f1e6d5404103b836d26228b8730907a88d9f" +checksum = "897f1db4020ad91f2c2421945ec49b7e3eb81cc3fea99e8b5dd5be721e697fed" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", - "http", + "http 0.2.9", "http-body", "itoa", "num-integer", @@ -369,9 +347,9 @@ dependencies = [ [[package]] name = "aws-smithy-types-convert" -version = "0.60.0" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e161aa33a99e36ed942974d02a73f08dc5f312f62ad7996d11e5f3e9c0251d" +checksum = "f04bda6ceb45a1db69d59c36ec196acb908504bc49b528c8ae21670dcacb1a07" dependencies = [ "aws-smithy-types", "chrono", @@ -379,24 +357,24 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.0" +version = "0.60.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec40d74a67fd395bc3f6b4ccbdf1543672622d905ef3f979689aea5b730cb95" +checksum = "d16f94c9673412b7a72e3c3efec8de89081c320bf59ea12eed34c417a62ad600" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.0.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8403fc56b1f3761e8efe45771ddc1165e47ec3417c68e68a4519b5cb030159ca" +checksum = "8fbb5d48aae496f628e7aa2e41991dd4074f606d9e3ade1ce1059f293d40f9a2" dependencies = [ "aws-credential-types", "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "http", + "http 0.2.9", "rustc_version", "tracing", ] @@ -607,15 +585,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", @@ -630,15 +608,15 @@ checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-macro", @@ -686,7 +664,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.9", "indexmap", "slab", "tokio", @@ -726,6 +704,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -733,7 +722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", "pin-project-lite", ] @@ -760,7 +749,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.9", "http-body", "httparse", "httpdate", @@ -780,7 +769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http", + "http 0.2.9", "hyper", "log", "rustls", @@ -970,21 +959,10 @@ dependencies = [ ] [[package]] -name = "regex" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.1" +name = "regex-lite" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" [[package]] name = "ring" @@ -1300,9 +1278,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 2a08cb4..a0ac8c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { version = "1.34.0", features = ["macros", "rt"] } +tokio = { version = "1.35.1", features = ["macros", "rt"] } anyhow = "1.0.75" num-traits = "0.2.17" serde = { version = "1.0.193", features = ["derive"] } @@ -15,9 +15,13 @@ tracing-subscriber = "0.3.18" pretty_assertions = "1.4.0" -aws-sdk-ec2 = "1.3.0" -aws-sdk-pricing = "1.3.0" +aws-sdk-ec2 = "1.20.0" +aws-sdk-pricing = "1.15.0" -aws-config = "1.0.1" -aws-types = "1.0.1" -aws-smithy-types-convert = {version = "0.60.0", features = ["convert-chrono"] } +aws-config = "1.1.6" +aws-types = "1.1.6" +aws-smithy-types-convert = {version = "0.60.5", features = ["convert-chrono"] } + + +[profile.release] +lto = "thin" diff --git a/README.md b/README.md index e8a1e5b..ecae776 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ - ![MSRV](https://img.shields.io/badge/msrv-1.73.0-red) + ![MSRV](https://img.shields.io/badge/msrv-1.76.0-red) # aws_ec2_analyzer ```console -> RUSTFLAGS='-C target-cpu=native' cargo run --release +> RUSTFLAGS='-C codegen-units=1 -C target-cpu=native' cargo build --release ``` diff --git a/src/ec2.rs b/src/ec2.rs index 1fdfef4..493f461 100644 --- a/src/ec2.rs +++ b/src/ec2.rs @@ -105,6 +105,7 @@ impl Ec2 { "ap-southeast-1".to_string(), "ap-southeast-2".to_string(), "ca-central-1".to_string(), + // "ca-west-1".to_string(), "eu-central-1".to_string(), "eu-north-1".to_string(), "eu-west-1".to_string(), diff --git a/src/main.rs b/src/main.rs index 1a0ae4a..6037fc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,6 @@ const REGIONS: &[&str] = &[ ]; const INSTANCE_TYPES: &[InstanceType] = &[ - //InstanceType::C524xlarge, //InstanceType::C5n18xlarge, InstanceType::C6i32xlarge, InstanceType::C6a48xlarge,