bitcoin-derive 0.1.18

A procedural macro crate providing attributes for concurrency control, signal-slot mechanisms, and fuzz testing, designed for Bitcoin-related Rust projects.
docs.rs failed to build bitcoin-derive-0.1.18
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: bitcoin-derive-0.1.16-alpha.0

bitcoin-derive

bitcoin-derive is a Rust procedural macro library designed to enhance concurrency and object interaction patterns for projects related to Bitcoin. Utilizing Rust's powerful procedural macros, this crate provides a series of attributes that facilitate compile-time guarantees and annotations for various concurrency and object modeling constructs.

Features

  • Concurrency Control: Decorate functions and methods with macros like LOCKABLE, EXCLUSIVE_LOCK_FUNCTION, SCOPED_LOCKABLE, and LOCKS_EXCLUDED to constraint and manage locking behavior.
  • Signal-Slot Mechanism: Implement Qt-inspired signal and slot patterns using Q_SIGNAL, Q_SIGALS, Q_SLOT, and Q_SLOTS attributes, enhancing modular event-driven designs.
  • Fuzz Testing: Annotate test functions with fuzz and fuzz_test for integration with fuzz testing tools.
  • Annotation Attributes: Utilize no_copy, no_move, and NO_THREAD_SAFETY_ANALYSIS to provide explicit specification of intended data handling and thread safety behaviors.

Getting Started

To integrate bitcoin-derive into your Rust project, include it as a dependency in your Cargo.toml:

[dependencies]
bitcoin-derive = "0.1.18"

Then, import the macros and use them to annotate your functions and structs:

use bitcoin_derive::{LOCKABLE, Q_SIGNAL};

#[LOCKABLE]
fn protected_function() {
    // Implementation 
}

#[Q_SIGNAL]
fn emit_signal() {
    // Emit signal logic
}

Documentation

For comprehensive usage and examples, please refer to the official repository where detailed documentation and example code snippets are available.

License

This project is licensed under the MIT License.


This README.md file is auto-generated by an AI model. Please verify contents for absolute accuracy.