| Crates.io | osynic_osudb |
| lib.rs | osynic_osudb |
| version | 0.1.4 |
| created_at | 2025-03-12 14:09:51.772294+00 |
| updated_at | 2025-11-10 14:57:46.556472+00 |
| description | osu!db parser for Osynic, refactoring based on osu-db |
| homepage | https://osynicite.deno.dev |
| repository | https://github.com/osynicite/osynic_osudb |
| max_upload_size | |
| id | 1589791 |
| size | 89,286 |
🚀 高性能 · 🏗️ 结构优良 · 🔧 WASM 支持
功能完整的 osu! 数据库解析库,支持解析 osu!.db, collection.db 与 scores.db 。
高性能的 osu! 数据库解析库,基于优秀的 osu-db 库重构。支持 osu!.db、collection.db、scores.db 等所有数据库文件,完全兼容 osu! 2025+ 版本。
[dependencies]
osynic_osudb = "0.1.4"
use osynic_osudb::entity::osu::osudb::OsuDB;
fn main() {
let mut osudb = OsuDB::from_file("osu!.db").unwrap();
for (index, beatmap) in osudb.beatmaps.iter_mut().take(3).enumerate() {
println!(
"Song {}: {} - {}",
index + 1,
beatmap.artist_unicode.as_ref().unwrap(),
beatmap.title_unicode.as_ref().unwrap()
);
println!("Creator: {}", beatmap.creator.as_ref().unwrap());
println!("Difficulty: {}", beatmap.difficulty_name.as_ref().unwrap());
println!("Audio: {}", beatmap.audio.as_ref().unwrap());
println!("Hash: {}", beatmap.hash.as_ref().unwrap());
println!("File Name: {}", beatmap.file_name.as_ref().unwrap());
println!("Status: {:?}", beatmap.status);
println!("Hitcircle Count: {}", beatmap.hitcircle_count);
println!("Slider Count: {}", beatmap.slider_count);
println!("Spinner Count: {}", beatmap.spinner_count);
println!("Last Modified: {}", beatmap.last_modified);
println!("Approach Rate: {}", beatmap.approach_rate);
println!("Circle Size: {}", beatmap.circle_size);
println!("HP Drain: {}", beatmap.hp_drain);
println!("Overall Difficulty: {}", beatmap.overall_difficulty);
println!("---------------------------------");
}
}
🎯 更多示例:查看 examples/ 目录获取完整示例,或运行 cargo run --example 示例名 查看实际效果。
本项目基于 osu-db 库重构,进行了架构优化、性能提升和版本兼容性改进。
感谢 osu-db 的作者们!
osu-db 项目基于 Unlicense,项目证书放置在 licenses/ 目录。
欢迎提交 PR 或 Issue!如果您发现任何问题或有改进建议,请遵循以下规则:
cargo fmt 和 cargo clippy本项目基于 MIT License 开源,请尊重原作者的著作权。