#bip-39 #bitcoin #mnemonic

no-std bip0039

Another Rust implementation of BIP-0039 standard

15 unstable releases

Uses new Rust 2024

0.13.4 Jan 30, 2026
0.12.0 Feb 19, 2024
0.11.0 Nov 22, 2022
0.10.1 Dec 14, 2021
0.6.0 Jan 7, 2020

#8 in #bip-39

Download history 5778/week @ 2025-10-22 6708/week @ 2025-10-29 4227/week @ 2025-11-05 4874/week @ 2025-11-12 4883/week @ 2025-11-19 3949/week @ 2025-11-26 5071/week @ 2025-12-03 3410/week @ 2025-12-10 2439/week @ 2025-12-17 1377/week @ 2025-12-24 2325/week @ 2025-12-31 2244/week @ 2026-01-07 2842/week @ 2026-01-14 3691/week @ 2026-01-21 4659/week @ 2026-01-28 3022/week @ 2026-02-04

14,612 downloads per month
Used in 68 crates (12 directly)

Apache-2.0

110KB
1.5K SLoC

bip0039

Another Rust implementation of BIP-0039 standard.

Usage

Compile-time language selection

use bip0039::{Count, English, Mnemonic};

// Generate an English mnemonic with 12 words randomly
let mnemonic = <Mnemonic<English>>::generate(Count::Words12);
// Or use the default generic type (English).
let mnemonic = <Mnemonic>::generate(Count::Words12);
println!("phrase: {}", mnemonic.phrase());

// Generate the HD wallet seed from the mnemonic and the passphrase.
let seed = mnemonic.to_seed("");
assert_eq!(seed.len(), 64);
println!("seed: {}", const_hex::encode(seed));

Runtime language selection

use bip0039::{AnyLanguage, AnyMnemonic, BuiltInLanguage, Count, English};

// Generate an English mnemonic with 12 words randomly
let mnemonic = AnyMnemonic::generate(BuiltInLanguage::English, Count::Words12);
assert_eq!(mnemonic.language(), AnyLanguage::of::<English>());
println!("phrase: {}", mnemonic.phrase());

// Generate the HD wallet seed from the mnemonic and the passphrase.
let seed = mnemonic.to_seed("");
assert_eq!(seed.len(), 64);
println!("seed: {}", const_hex::encode(seed));

Documentation

See documentation and examples at https://docs.rs/bip0039.

Features

  • Support all languages in the BIP-0039 Word Lists
    • English
    • Japanese
    • Korean
    • Spanish
    • Chinese (Simplified)
    • Chinese (Traditional)
    • French
    • Italian
    • Czech
    • Portuguese
  • Support no_std environment

Performance

See benchmarks for more details

Alternatives

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

Dependencies

~2.5MB
~59K SLoC