linebender_resource_handle/lib.rs
1// Copyright 2024 the Raw Resource Handle Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4//! Linebender Resource Handle provides functionality for storing blobs of data and an associated ID.
5//! This primitive is adapted in Peniko to store images, but the [`FontData`] type lives in this crate.
6//! This crate is designed to allow making semver incompatible releases of Parley and Vello, whilst allowing them to be cross-compatible.
7//!
8//! This crate is not intended for long-term use, and we expect our resource handling story to change.
9//! That's the reason that this crate has the organisation name ("Linebender") in its crate name; we avoid squatting a more general name after we abandon it.
10
11// LINEBENDER LINT SET - lib.rs - v3
12// See https://linebender.org/wiki/canonical-lints/
13// These lints shouldn't apply to examples or tests.
14#![cfg_attr(not(test), warn(unused_crate_dependencies))]
15// These lints shouldn't apply to examples.
16#![warn(clippy::print_stdout, clippy::print_stderr)]
17// Targeting e.g. 32-bit means structs containing usize can give false positives for 64-bit.
18#![cfg_attr(target_pointer_width = "64", warn(clippy::trivially_copy_pass_by_ref))]
19// END LINEBENDER LINT SET
20#![cfg_attr(docsrs, feature(doc_auto_cfg))]
21#![no_std]
22
23#[cfg(feature = "std")]
24// Ensure that we don't compile if you're using the std feature on a platform without `std`
25extern crate std as _;
26
27mod blob;
28mod font;
29
30pub use blob::{Blob, WeakBlob};
31pub use font::FontData;
32
33#[cfg(test)]
34mod tests {
35 // CI will fail unless cargo nextest can execute at least one test per workspace.
36 // Delete this dummy test once we have an actual real test.
37 #[test]
38 fn dummy_test_until_we_have_a_real_test() {}
39}