bjrs

Crates.iobjrs
lib.rsbjrs
version0.1.1
created_at2026-01-16 08:32:22.440798+00
updated_at2026-01-16 08:37:28.503626+00
descriptionA blackjack game engine with optional no_std support.
homepagehttps://github.com/waki285/bjrs
repositoryhttps://github.com/waki285/bjrs
max_upload_size
id2048172
size113,407
すずねーう (waki285)

documentation

README

bjrs

Crates.io Docs.rs License

A blackjack game engine with optional no_std support.

Features

  • Full round flow: betting, player actions, insurance, dealer play, showdown
  • Configurable rules via GameOptions
  • Deterministic RNG seeded at game creation
  • std by default, no_std + alloc supported (enable alloc)

Usage

use bjrs::{Game, GameOptions};

let options = GameOptions::default();
let game = Game::new(options, 42);

let player_id = game.join(1_000);
game.start_betting();
game.bet(player_id, 50).unwrap();
game.deal().unwrap();

// Player actions, dealer play, and showdown omitted here.

See examples/cli_blackjack.rs for a complete playable CLI example.

no_std

By default this crate uses std. To opt into no_std:

[dependencies]
bjrs = { version = "0.1", default-features = false, features = ["alloc"] }

License

Licensed under either of:

  • Apache License, Version 2.0
  • MIT license
Commit count: 0

cargo fmt