From 0177b1d97569238322d26aca23740e1098ce9c90 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 18 Sep 2024 15:55:43 +0200 Subject: [PATCH] add proxmox-rrd-api-types crate - moved out of proxmox-rrd so we can access them from wasm without pulling in proxmox-rrd as it also pulls in sys... Signed-off-by: Wolfgang Bumiller --- Cargo.toml | 1 + proxmox-rrd-api-types/Cargo.toml | 15 +++++++++++++++ proxmox-rrd-api-types/debian/changelog | 5 +++++ proxmox-rrd-api-types/debian/copyright | 18 ++++++++++++++++++ proxmox-rrd-api-types/debian/debcargo.toml | 7 +++++++ .../src/lib.rs | 0 proxmox-rrd/Cargo.toml | 3 +-- proxmox-rrd/src/lib.rs | 3 --- 8 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 proxmox-rrd-api-types/Cargo.toml create mode 100644 proxmox-rrd-api-types/debian/changelog create mode 100644 proxmox-rrd-api-types/debian/copyright create mode 100644 proxmox-rrd-api-types/debian/debcargo.toml rename proxmox-rrd/src/api_types.rs => proxmox-rrd-api-types/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index fa02f9f1..a832307d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ members = [ "proxmox-rest-server", "proxmox-router", "proxmox-rrd", + "proxmox-rrd-api-types", "proxmox-schema", "proxmox-section-config", "proxmox-serde", diff --git a/proxmox-rrd-api-types/Cargo.toml b/proxmox-rrd-api-types/Cargo.toml new file mode 100644 index 00000000..db2fa0d1 --- /dev/null +++ b/proxmox-rrd-api-types/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "proxmox-rrd-api-types" +version = "1.0.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true +exclude.workspace = true +description = "Types for RRD values." + +[dependencies] +serde = { workspace = true, features = ["derive"] } +serde_plain.workspace = true + +proxmox-schema = { workspace = true, features = [ "api-macro" ] } diff --git a/proxmox-rrd-api-types/debian/changelog b/proxmox-rrd-api-types/debian/changelog new file mode 100644 index 00000000..914d4d13 --- /dev/null +++ b/proxmox-rrd-api-types/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-rrd-api-types (1.0.0-1) bookworm; urgency=medium + + * split out of proxmox-rrd + + -- Proxmox Support Team Wed, 18 Sep 2024 15:24:01 +0200 diff --git a/proxmox-rrd-api-types/debian/copyright b/proxmox-rrd-api-types/debian/copyright new file mode 100644 index 00000000..869939c3 --- /dev/null +++ b/proxmox-rrd-api-types/debian/copyright @@ -0,0 +1,18 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: + * +Copyright: 2024 Proxmox Server Solutions GmbH +License: AGPL-3.0-or-later + This program is free software: you can redistribute it and/or modify it under + the terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) any + later version. + . + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + details. + . + You should have received a copy of the GNU Affero General Public License along + with this program. If not, see . diff --git a/proxmox-rrd-api-types/debian/debcargo.toml b/proxmox-rrd-api-types/debian/debcargo.toml new file mode 100644 index 00000000..b7864cdb --- /dev/null +++ b/proxmox-rrd-api-types/debian/debcargo.toml @@ -0,0 +1,7 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team " + +[source] +vcs_git = "git://git.proxmox.com/git/proxmox.git" +vcs_browser = "https://git.proxmox.com/?p=proxmox.git" diff --git a/proxmox-rrd/src/api_types.rs b/proxmox-rrd-api-types/src/lib.rs similarity index 100% rename from proxmox-rrd/src/api_types.rs rename to proxmox-rrd-api-types/src/lib.rs diff --git a/proxmox-rrd/Cargo.toml b/proxmox-rrd/Cargo.toml index 1db64c99..6522bc4d 100644 --- a/proxmox-rrd/Cargo.toml +++ b/proxmox-rrd/Cargo.toml @@ -17,7 +17,7 @@ bitflags.workspace = true crossbeam-channel.workspace = true log.workspace = true nix.workspace = true -serde.workspace = true +serde = { workspace = true, features = ["derive"] } serde_cbor.workspace = true serde_json.workspace = true serde_plain.workspace = true @@ -28,5 +28,4 @@ proxmox-time.workspace = true [features] default = [ "rrd_v1" ] -api-types = [] rrd_v1 = [] diff --git a/proxmox-rrd/src/lib.rs b/proxmox-rrd/src/lib.rs index d0fd71c8..175bb877 100644 --- a/proxmox-rrd/src/lib.rs +++ b/proxmox-rrd/src/lib.rs @@ -17,6 +17,3 @@ pub use rrd::Entry; mod cache; pub use cache::*; - -#[cfg(feature = "api-types")] -pub mod api_types;