Skip to main content

sim_lib_music_notation/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Score and notation model for the SIM music libraries.
4//!
5//! This crate is the notation codec surface: it converts between a
6//! `sim_lib_music_core::Score` (and related music objects such as melodies,
7//! progressions, and counterpoint) and bounded LilyPond or MusicXML notation.
8//! MusicXML remains a fail-closed profile with explicit resource limits and
9//! identity/loss sidecars; it is not a second score model or a general XML
10//! codec. [`NotationCodec`] is the Rust entry point, while
11//! [`install_music_notation_lib`] registers the Shape-described
12//! `music/notation/import` runtime callable.
13#![allow(deprecated)]
14
15mod export;
16mod import;
17mod model;
18mod musicxml;
19mod musicxml_export;
20mod musicxml_import;
21mod musicxml_note;
22mod musicxml_support;
23mod runtime;
24mod spell;
25
26pub use export::{
27    export_counterpoint_lilypond, export_lilypond, export_lilypond_report, export_melody_lilypond,
28    export_progression_lilypond,
29};
30pub use import::{import_lilypond, import_lilypond_report};
31pub use model::{
32    MusicXmlLimits, NotationCodec, NotationError, NotationIdentity, NotationIdentityKind,
33    NotationLoss, NotationLossKind, NotationReport,
34};
35pub use musicxml::{
36    export_musicxml_partwise, export_musicxml_partwise_report, import_musicxml_partwise,
37    import_musicxml_partwise_report,
38};
39pub use runtime::*;
40
41/// Cookbook recipes for this lib, embedded at build time.
42pub static RECIPES: sim_cookbook::EmbeddedDir =
43    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
44
45#[cfg(test)]
46mod tests;