[go: up one dir, main page]

portable-atomic 1.4.1

Portable atomic types including support for 128-bit atomics, atomic float, etc.
Documentation
[package]
name = "portable-atomic"
version = "1.4.1" #publish:version
edition = "2018"
rust-version = "1.34"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/taiki-e/portable-atomic"
keywords = ["atomic"]
categories = ["concurrency", "data-structures", "embedded", "hardware-support", "no-std"]
exclude = ["/.*", "/ci", "/tools", "/target-specs", "/Cross.toml", "/DEVELOPMENT.md"]
description = """
Portable atomic types including support for 128-bit atomics, atomic float, etc.
"""

[package.metadata.docs.rs]
# NB: sync with:
# - env.TEST_FEATURES in .github/workflows/ci.yml.
# - test_features list in tools/build.sh and tools/test.sh.
features = ["float", "std", "serde", "critical-section"]
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu"]

[workspace]
members = [
    "bench",
    "portable-atomic-util",
    "tests/api-test",
    "tests/helper",
    "tools/codegen",
]

[lib]
doc-scrape-examples = false

[features]
default = ["fallback"]

# (enabled by default) Enable fallback implementations.
#
# Disabling this allows only atomic types for which the platform natively supports atomic operations.
fallback = []

# Provide `AtomicF{32,64}`.
#
# See documentation for more: https://github.com/taiki-e/portable-atomic#optional-features-float
float = []

# Use `std`.
std = []

# Emit compile error if atomic CAS is not available.
#
# See documentation for more: https://github.com/taiki-e/portable-atomic#optional-features-require-cas
require-cas = []

# Assume the target is single core, to enable implementations based on disabling interrupts.
# IMPORTANT: This feature is unsafe. See the documentation for the safety contract:
# https://github.com/taiki-e/portable-atomic#optional-features-unsafe-assume-single-core
unsafe-assume-single-core = []

# For RISC-V targets, generate code for S mode to disable interrupts.
s-mode = []

# For ARM targets, also disable FIQs when disabling interrupts.
disable-fiq = []

# Note: serde and critical-section are public dependencies.
[dependencies]
# Implements serde::{Serialize,Deserialize} for atomic types.
#
# See documentation for more: https://github.com/taiki-e/portable-atomic#optional-features-serde
serde = { version = "1.0.103", optional = true, default-features = false }

# Use `critical-section`.
#
# See documentation for more: https://github.com/taiki-e/portable-atomic#optional-features-critical-section
critical-section = { version = "1", optional = true }

[dev-dependencies]
test-helper = { path = "tests/helper", features = ["std"] }

build-context = "0.1"
crossbeam-utils = "0.8"
fastrand = "2"
paste = "1"
quickcheck = { default-features = false, git = "https://github.com/taiki-e/quickcheck.git", branch = "dev" } # https://github.com/BurntSushi/quickcheck/pull/304 + https://github.com/BurntSushi/quickcheck/pull/282 + lower MSRV
serde_test = "1"
sptr = "0.3"
static_assertions = "1"