rummage-rs 0.1.1

Safe Rust wrappers for the Rummage GPU Nostr mining library (CUDA)
docs.rs failed to build rummage-rs-0.1.1
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.

rummage-rs

Safe Rust wrappers for the Rummage GPU Nostr mining library.

Rummage is a high-performance CUDA-accelerated tool for Nostr vanity key mining and NIP-13 Proof of Work. This crate provides memory-safe, idiomatic Rust wrappers with automatic GPU resource cleanup via Drop.

Features

  • PowMiner — NIP-13 Proof of Work mining for Nostr events (8,000+ MH/s on RTX PRO 6000)
  • VanityMiner — Vanity npub/hex key generation (240M+ keys/sec on RTX PRO 6000)
  • GTable — Pre-computed secp256k1 generator table for vanity mining

Example: PoW Mining

use rummage_rs::PowMiner;

let prefix = r#"[0,"ab..cd",1234567890,1,[["nonce",""#;
let suffix = r#"","21"]],"hello"]"#;

let mut miner = PowMiner::new().expect("GPU init");
miner.init(prefix, suffix, 21).expect("init failed");

let threads = miner.thread_count();
let streams = miner.stream_count();
let nonces_per_batch = threads as u64 * 128 * streams as u64;

let mut nonce_start = 0u64;
loop {
    if let Some(result) = miner.mine_batch(nonce_start, threads) {
        println!("Found nonce {} with {} bits", result.nonce, result.difficulty);
        break;
    }
    nonce_start += nonces_per_batch;
}

Example: Vanity Key Mining

use rummage_rs::{GTable, VanityMiner, VanityMode, SearchMode};

let gtable = GTable::load().expect("failed to load GTable");

let start_offset = [0u8; 32];
let mut miner = VanityMiner::new(
    &gtable, "cafe", VanityMode::HexPrefix,
    &start_offset, SearchMode::Random, 0,
).expect("failed to create miner");

for iteration in 0.. {
    miner.iterate(iteration);
    if miner.check_results() {
        println!("Match found! Keys searched: {}", miner.keys_generated());
        break;
    }
}

Build Requirements

  • NVIDIA CUDA Toolkit (nvcc)
  • GMP library (libgmp-dev)
  • g++ compiler
CUDA_CCAP=89 cargo build  # override compute capability (default: 120)