1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! # libosu
//!
//! `libosu` is an attempt to make a convenient library for writing OSU-related programs. It
//! includes data structures and parsers for beatmaps, replays, and more.
//!
//! Please note that until this crate hits `1.0`, none of the APIs in this crate will be stable, so
//! take care when using this crate. Always pin to the version that you are using!

#![deny(missing_docs)]

#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate derive_more;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
#[macro_use]
extern crate num_derive;
#[macro_use]
extern crate thiserror;

#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;

/// Provides NotNan
pub extern crate ordered_float;

pub(crate) mod float;
pub(crate) mod utils;

/// Client for the OSU api
#[cfg(feature = "apiv1")]
pub mod apiv1;
/// Beatmaps
pub mod beatmap;
/// Defines the Color struct
pub mod color;

/// Deals with osu database files (osu.db, collections.db, etc)
pub mod db;
/// Data structures
// TODO: should probably split this and move enums into their respective modules
pub mod enums;
/// Errors
pub mod errors;
/// Beatmap events
pub mod events;
/// Hit-objects
pub mod hitobject;
/// Data structures for hitsounds
pub mod hitsounds;
/// Math
pub mod math;
// /// Working with beatmap files.
// pub mod parsing;
pub mod replay;
/// Calculating slider body shapes.
pub mod spline;
/// Timing and timing points.
pub mod timing;

/// Exports everything in the library.
pub mod prelude {
    #[cfg(feature = "apiv1")]
    pub use crate::apiv1::*;
    pub use crate::beatmap::*;
    pub use crate::color::*;
    pub use crate::db::*;
    pub use crate::enums::*;
    pub use crate::events::*;
    pub use crate::hitobject::*;
    pub use crate::hitsounds::*;
    pub use crate::math::*;
    pub use crate::replay::*;
    pub use crate::spline::*;
    pub use crate::timing::*;
    pub use ordered_float::*;
}

/// Says "hello there"
#[deprecated]
pub fn say_hello_there() {
    println!("hello there");
}