What's new
Added
- Cargo workspace (
resolver = "2"): the repository is now a multi-crate workspace with four members:
crates/gregorio-core — synchronous core library (parser, validator, formatter, note-ops, ligature helpers, body_start_byte). No tokio or tower-lsp dependencies; compiles to both native and wasm32-unknown-unknown.
crates/gregorio-server — the gregorio-lsp LSP binary (tower-lsp/tokio), unchanged protocol behaviour, now depends on gregorio-core.
crates/gregorio-cli — grelint and grefmt binaries, now depend on gregorio-core.
crates/gregorio-wasm — new cdylib/rlib crate exposing gregorio-core through wasm-bindgen for in-process use by the VS Code extension.
gregorio-wasm WASM bindings (built with wasm-pack --target nodejs): diagnostics, format, document_symbols, shift_notes_up, shift_notes_down, fill_empty_groups_wasm, ligatures_to_tags, tags_to_ligatures, nabc_lines, body_start_byte. The u32::MAX sentinel on end_byte signals "no range / shift entire body".
ligatures_to_tags / tags_to_ligatures helpers in gregorio-core::note_ops: convert between æ/ǽ/œ Unicode ligatures and <sp>ae</sp> / <sp>'ae</sp> / <sp>oe</sp> XML tags.
body_start_byte(text) in gregorio-core::note_ops: returns the byte offset of the first character after the %% header separator.
Changed
- Repository layout: the previous flat
src/ tree becomes crates/gregorio-core/src/. All source files are identical; use crate:: and use super:: references required no changes.
- The
tree-sitter Cargo feature is now declared on gregorio-core and re-exported by gregorio-server.
Installing the LSP binary
cargo install --git https://github.com/AISCGre-BR/gregorio-lsp --tag v0.11.0 --bin gregorio-lsp
Building the WASM module
cd crates/gregorio-wasm
wasm-pack build --target nodejs --release