9 breaking releases

new 0.10.0 Apr 24, 2024
0.9.0 Dec 5, 2023
0.8.0 Sep 15, 2023
0.7.0 May 17, 2023
0.4.0 Nov 19, 2022

#1 in #brigadier

Download history 36/week @ 2024-02-19 23/week @ 2024-02-26 7/week @ 2024-03-04 16/week @ 2024-03-11 5/week @ 2024-03-18 13/week @ 2024-03-25 34/week @ 2024-04-01 157/week @ 2024-04-15

204 downloads per month
Used in 3 crates (2 directly)

MIT license

115KB
3K SLoC

Azalea Brigadier

A Rust port of Mojang's Brigadier command parsing and dispatching library.

Examples

use azalea_brigadier::prelude::*;
use std::sync::Arc;

#[derive(Debug, PartialEq)]
struct CommandSource {}

let mut subject = CommandDispatcher::new();
subject.register(literal("foo").executes(|_| 42));

assert_eq!(
    subject
        .execute("foo", Arc::new(CommandSource {}))
        .unwrap(),
    42
);

See the tests for more.

Dependencies

~0.4–7MB
~20K SLoC