From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id E13431FF17C for ; Wed, 6 Aug 2025 11:20:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5EF8B36EC9; Wed, 6 Aug 2025 11:22:08 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Wed, 6 Aug 2025 11:21:21 +0200 Message-ID: <20250806092122.316117-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250806092122.316117-1-c.ebner@proxmox.com> References: <20250806092122.316117-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754472072330 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.044 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Currently, a build of s3 client pulls in all dependencies, independent of the feature set. To allow correctly building the pbs api types, as required for e.g. wasm builds using pbs-api-types, add the `api-types` feature and make the `impl` feature dependencies optional. Also, set the `api-types` feature to be the default. Signed-off-by: Christian Ebner --- proxmox-s3-client/Cargo.toml | 60 +++++++++++++++-------- proxmox-s3-client/debian/control | 84 ++++++++++++++------------------ 2 files changed, 76 insertions(+), 68 deletions(-) diff --git a/proxmox-s3-client/Cargo.toml b/proxmox-s3-client/Cargo.toml index b249010f..20b9b772 100644 --- a/proxmox-s3-client/Cargo.toml +++ b/proxmox-s3-client/Cargo.toml @@ -13,35 +13,55 @@ rust-version.workspace = true [dependencies] anyhow.workspace = true -bytes.workspace = true -futures.workspace = true +bytes = { workspace = true, optional = true } +futures = { workspace = true, optional = true } const_format.workspace = true -hex = { workspace = true, features = [ "serde" ] } -http-body-util.workspace = true -hyper-util = { workspace = true, features = [ "client-legacy", "tokio", "http1" ] } -hyper.workspace = true -iso8601.workspace = true -md5.workspace = true -openssl.workspace = true -quick-xml = { workspace = true, features = [ "async-tokio" ] } +hex = { workspace = true, features = [ "serde" ], optional = true } +http-body-util = { workspace = true, optional = true } +hyper-util = { workspace = true, features = [ "client-legacy", "tokio", "http1" ], optional = true } +hyper = { workspace = true, optional = true } +iso8601 = { workspace = true, optional = true } +md5 = { workspace = true, optional = true } +openssl = { workspace = true, optional = true } +quick-xml = { workspace = true, features = [ "async-tokio" ], optional = true } regex.workspace = true serde.workspace = true serde_plain.workspace = true -serde-xml-rs.workspace = true -tokio.workspace = true -tokio-util = { workspace = true, features = [ "compat" ] } -tracing.workspace = true -url.workspace = true +serde-xml-rs = { workspace = true, optional = true } +tokio = { workspace = true, optional = true } +tokio-util = { workspace = true, features = [ "compat" ], optional = true } +tracing = { workspace = true, optional = true } +url = {workspace = true, optional = true } -proxmox-base64.workspace = true -proxmox-http = { workspace = true, features = [ "body", "client", "client-trait", "rate-limiter" ] } +proxmox-base64 = { workspace = true, optional = true } +proxmox-http = { workspace = true, features = [ "body", "client", "client-trait", "rate-limiter" ], optional = true } proxmox-schema = { workspace = true, features = [ "api-macro", "api-types" ] } proxmox-serde.workspace = true -proxmox-time.workspace = true +proxmox-time = {workspace = true, optional = true } [features] -default = [] -impl = [] +default = [ "api-types" ] +api-types = [] +impl = [ + "dep:bytes", + "dep:futures", + "dep:hex", + "dep:http-body-util", + "dep:hyper-util", + "dep:hyper", + "dep:iso8601", + "dep:md5", + "dep:openssl", + "dep:quick-xml", + "dep:serde-xml-rs", + "dep:tokio", + "dep:tokio-util", + "dep:tracing", + "dep:url", + "dep:proxmox-base64", + "dep:proxmox-http", + "dep:proxmox-time", +] [[example]] name = "s3_client" diff --git a/proxmox-s3-client/debian/control b/proxmox-s3-client/debian/control index ba684c17..e6fd64ae 100644 --- a/proxmox-s3-client/debian/control +++ b/proxmox-s3-client/debian/control @@ -7,43 +7,15 @@ Build-Depends-Arch: cargo:native , rustc:native (>= 1.82) , libstd-rust-dev , librust-anyhow-1+default-dev , - librust-bytes-1+default-dev , librust-const-format-0.2+default-dev , - librust-futures-0.3+default-dev , - librust-hex-0.4+default-dev , - librust-hex-0.4+serde-dev , - librust-http-body-util-0.1+default-dev , - librust-hyper-1+default-dev , - librust-hyper-util-0.1+client-legacy-dev (>= 0.1.12-~~) , - librust-hyper-util-0.1+default-dev (>= 0.1.12-~~) , - librust-hyper-util-0.1+http1-dev (>= 0.1.12-~~) , - librust-hyper-util-0.1+tokio-dev (>= 0.1.12-~~) , - librust-iso8601-0.6+default-dev (>= 0.6.1-~~) , - librust-md5-0.7+default-dev , - librust-openssl-0.10+default-dev , - librust-proxmox-base64-1+default-dev , - librust-proxmox-http-1+body-dev (>= 1.0.2-~~) , - librust-proxmox-http-1+client-dev (>= 1.0.2-~~) , - librust-proxmox-http-1+client-trait-dev (>= 1.0.2-~~) , - librust-proxmox-http-1+default-dev (>= 1.0.2-~~) , - librust-proxmox-http-1+rate-limiter-dev (>= 1.0.2-~~) , librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~) , librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~) , librust-proxmox-schema-4+default-dev (>= 4.1.0-~~) , librust-proxmox-serde-1+default-dev , librust-proxmox-serde-1+serde-json-dev , - librust-proxmox-time-2+default-dev (>= 2.1.0-~~) , - librust-quick-xml-0.36+async-tokio-dev (>= 0.36.1-~~) , - librust-quick-xml-0.36+default-dev (>= 0.36.1-~~) , librust-regex-1+default-dev (>= 1.5-~~) , librust-serde-1+default-dev , - librust-serde-plain-1+default-dev , - librust-serde-xml-rs-0.5+default-dev , - librust-tokio-1+default-dev (>= 1.6-~~) , - librust-tokio-util-0.7+compat-dev , - librust-tokio-util-0.7+default-dev , - librust-tracing-0.1+default-dev , - librust-url-2+default-dev (>= 2.2-~~) + librust-serde-plain-1+default-dev Maintainer: Proxmox Support Team Standards-Version: 4.7.0 Vcs-Git: git://git.proxmox.com/git/proxmox.git @@ -58,8 +30,39 @@ Multi-Arch: same Depends: ${misc:Depends}, librust-anyhow-1+default-dev, - librust-bytes-1+default-dev, librust-const-format-0.2+default-dev, + librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~), + librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~), + librust-proxmox-schema-4+default-dev (>= 4.1.0-~~), + librust-proxmox-serde-1+default-dev, + librust-proxmox-serde-1+serde-json-dev, + librust-regex-1+default-dev (>= 1.5-~~), + librust-serde-1+default-dev, + librust-serde-plain-1+default-dev +Suggests: + librust-proxmox-s3-client+impl-dev (= ${binary:Version}) +Provides: + librust-proxmox-s3-client+api-types-dev (= ${binary:Version}), + librust-proxmox-s3-client+default-dev (= ${binary:Version}), + librust-proxmox-s3-client-1-dev (= ${binary:Version}), + librust-proxmox-s3-client-1+api-types-dev (= ${binary:Version}), + librust-proxmox-s3-client-1+default-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0+api-types-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0+default-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0.7-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0.7+api-types-dev (= ${binary:Version}), + librust-proxmox-s3-client-1.0.7+default-dev (= ${binary:Version}) +Description: Low level REST API client for AWS S3 compatible object stores - Rust source code + Source code for Debianized Rust crate "proxmox-s3-client" + +Package: librust-proxmox-s3-client+impl-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-s3-client-dev (= ${binary:Version}), + librust-bytes-1+default-dev, librust-futures-0.3+default-dev, librust-hex-0.4+default-dev, librust-hex-0.4+serde-dev, @@ -78,17 +81,9 @@ Depends: librust-proxmox-http-1+client-trait-dev (>= 1.0.2-~~), librust-proxmox-http-1+default-dev (>= 1.0.2-~~), librust-proxmox-http-1+rate-limiter-dev (>= 1.0.2-~~), - librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~), - librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~), - librust-proxmox-schema-4+default-dev (>= 4.1.0-~~), - librust-proxmox-serde-1+default-dev, - librust-proxmox-serde-1+serde-json-dev, librust-proxmox-time-2+default-dev (>= 2.1.0-~~), librust-quick-xml-0.36+async-tokio-dev (>= 0.36.1-~~), librust-quick-xml-0.36+default-dev (>= 0.36.1-~~), - librust-regex-1+default-dev (>= 1.5-~~), - librust-serde-1+default-dev, - librust-serde-plain-1+default-dev, librust-serde-xml-rs-0.5+default-dev, librust-tokio-1+default-dev (>= 1.6-~~), librust-tokio-util-0.7+compat-dev, @@ -96,16 +91,9 @@ Depends: librust-tracing-0.1+default-dev, librust-url-2+default-dev (>= 2.2-~~) Provides: - librust-proxmox-s3-client+default-dev (= ${binary:Version}), - librust-proxmox-s3-client+impl-dev (= ${binary:Version}), - librust-proxmox-s3-client-1-dev (= ${binary:Version}), - librust-proxmox-s3-client-1+default-dev (= ${binary:Version}), librust-proxmox-s3-client-1+impl-dev (= ${binary:Version}), - librust-proxmox-s3-client-1.0-dev (= ${binary:Version}), - librust-proxmox-s3-client-1.0+default-dev (= ${binary:Version}), librust-proxmox-s3-client-1.0+impl-dev (= ${binary:Version}), - librust-proxmox-s3-client-1.0.7-dev (= ${binary:Version}), - librust-proxmox-s3-client-1.0.7+default-dev (= ${binary:Version}), librust-proxmox-s3-client-1.0.7+impl-dev (= ${binary:Version}) -Description: Low level REST API client for AWS S3 compatible object stores - Rust source code - Source code for Debianized Rust crate "proxmox-s3-client" +Description: Low level REST API client for AWS S3 compatible object stores - feature "impl" + This metapackage enables feature "impl" for the Rust proxmox-s3-client crate, + by pulling in any additional dependencies needed by that feature. -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel