dpi: make no_std compatible

This commit is contained in:
Daniel McNab 2025-04-20 06:46:15 +01:00 committed by GitHub
parent 24e2c6914a
commit ecc884ac91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 179 additions and 14 deletions

View file

@ -3,16 +3,22 @@ categories = ["gui"]
description = "Types for handling UI scaling"
edition.workspace = true
keywords = ["DPI", "HiDPI", "scale-factor"]
license.workspace = true
# N.B. This is "AND", because of the imported libm code.
license = "Apache-2.0 AND MIT"
name = "dpi"
repository.workspace = true
rust-version.workspace = true
version = "0.1.1"
[features]
default = ["std"]
mint = ["dep:mint"]
serde = ["dep:serde"]
# Access mathematical functions using the standard library implementations
std = []
[dependencies]
mint = { workspace = true, optional = true }
serde = { workspace = true, optional = true }