consortium-codec 0.1.0

Codec traits and implementations for Consortium IPC serialization
Documentation
# Copyright 2026 Ethan Wu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

[package]
description            = "Codec traits and implementations for Consortium IPC serialization"
edition.workspace      = true
license.workspace      = true
name                   = "consortium-codec"
version.workspace      = true
authors.workspace      = true
categories.workspace   = true
homepage.workspace     = true
keywords.workspace     = true
readme.workspace       = true
repository.workspace   = true
rust-version.workspace = true

[features]
alloc   = ["rkyv?/alloc", "rkyv?/bytecheck"]
default = []
# Route codec tracing to `defmt` for firmware-side builds; `defmt`'s macros
# expand to literal `defmt::` paths, so a direct `defmt` dep is required too.
# The `std` path routes the same call sites to `tracing`.
defmt    = ["consortium-log/defmt", "dep:defmt", "postcard?/use-defmt"]
postcard = ["dep:postcard", "dep:serde"]
prost    = ["dep:prost"]
rkyv     = ["consortium-codec-macros", "dep:rkyv"]
std      = ["consortium-log/tracing", "rkyv?/bytecheck", "rkyv?/std"]

[dependencies]
consortium-codec-macros = { optional = true, path = "../consortium-codec-macros", version = "0.1.0" }
consortium-log          = { default-features = false, path = "../consortium-log", version = "0.1.0" }
defmt                   = { optional = true, version = "1.1.0" }
postcard                = { optional = true, version = "1.1.3" }
prost                   = { default-features = false, optional = true, version = "0.14.3" }
rkyv                    = { default-features = false, features = ["bytecheck"], optional = true, version = "0.8.16" }
serde                   = { default-features = false, features = ["derive"], optional = true, version = "1.0.228" }

[dev-dependencies]
serde    = { default-features = false, features = ["derive"], version = "1.0.228" }
trybuild = "1"