Registry / ffi / block2

block2

JSON →
library0.6.2rscratesunverified

Provides Rust bindings for Apple's C language extension of blocks, enabling closure-like functionality.

# Cargo.toml [dependencies] block2 = "0.6.2"
INSTALL
IMPORT
SIG · BLOCK2
B
block2
ffirustv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Block
use block2::Block;

Create and call a simple block.

use block2::Block; fn main() { let block = Block::new(|| println!("Hello from block!")); block.call(); }
Debug
Known issues
gotchaRequires nightly Rust or specific target features for Apple platforms.
fix
Use nightly Rust or ensure you are targeting an Apple platform with blocks support.
affects: >=0.6.0
Upgrade
Version history
0.6.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
block2 — cargo add block2 · libregistry