Lyrebird 2.0.0 — Linux support

Consolidated release: the cross-platform Linux port (engine, generators, CLI,
REPL, NRT, portable DSP), live ALSA audio + ALSA MIDI + POSIX OSC + portable
WAV codec, the GTK4 GUI (LyrebirdUI on the SwiftOpenUI backend), and the Linux
live-coding scratchpad (LiveCompile). Apple platforms unchanged; all additive.
See RELEASES.md and LINUX_README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-09-10 21:09:11 -07:00
parent 77580ee98e
commit b6fdee8bfc
293 changed files with 16800 additions and 775 deletions
@@ -91,9 +91,29 @@ struct ProjectScaffolderTests {
#expect(source.contains("import LyrebirdSynth"))
}
@Test func mainSwiftReferencesCoreAudioDriver() {
let source: String = ProjectScaffolder.mainSwift(name: "Demo")
#expect(source.contains("CoreAudioDriver"))
@Test func mainSwiftDefersDriverChoiceToTheLibrary() {
// A scaffolded CLI project has to build wherever it was created, and
// which drivers exist is not something consumer code can test for: the
// Linux driver is absent from a build without libasound, and from a
// Linux binary cross-compiled on a Mac. Naming a concrete driver — or
// writing the `#if` in the emitted source — produces a project that
// fails to compile on those configurations.
for template: ProjectTemplate in [.quickstart, .basic, .demo] {
let source: String = ProjectScaffolder.mainSwift(name: "Demo", template: template)
#expect(source.contains("makeDefaultAudioDriver()"), "\(template)")
#expect(source.contains("driver: driver"), "\(template)")
#expect(!source.contains("CoreAudioDriver()"), "\(template)")
#expect(!source.contains("ALSAAudioDriver()"), "\(template)")
}
}
@Test func appKitTemplateStaysAppleOnly() {
// The GUI template imports AppKit, so it is macOS-only by construction;
// a platform switch there would imply a portability it does not have.
let source: String = ProjectScaffolder.mainSwift(name: "Demo", template: .uiDemo)
#expect(source.contains("import AppKit"))
#expect(source.contains("CoreAudioDriver()"))
#expect(!source.contains("ALSAAudioDriver"))
}
// MARK: - testsSwift template
@@ -633,7 +653,9 @@ struct ProjectScaffolderTests {
let source: String = ProjectScaffolder.mainSwift(name: "Demo", template: .demo)
#expect(source.contains("@LiveParam"))
#expect(source.contains("SineTone"))
#expect(source.contains("CoreAudioDriver"))
// Driver choice belongs to the library — see
// `mainSwiftDefersDriverChoiceToTheLibrary`.
#expect(source.contains("makeDefaultAudioDriver()"))
}
@Test func demoMainSwiftContainsName() {
@@ -712,7 +734,10 @@ struct ProjectScaffolderTests {
let source: String = ProjectScaffolder.mainSwift(name: "MyRender", template: .nrt)
#expect(source.contains("NRTDriver"))
#expect(source.contains("renderDuration"))
#expect(source.contains("output.caf"))
// WAV, not CAF: CAF is Apple-only, so a CAF render fails at run time
// on Linux even though the project compiles there.
#expect(source.contains("output.wav"))
#expect(source.contains(".wavFloat32"))
}
@Test func nrtMainSwiftContainsName() {
@@ -738,7 +763,8 @@ struct ProjectScaffolderTests {
@Test func scoreMainSwiftRendersOfflineWithNRTDriver() {
let source: String = ProjectScaffolder.mainSwift(name: "MyPiece", template: .score)
#expect(source.contains("NRTDriver"))
#expect(source.contains("score.caf"))
#expect(source.contains("score.wav"))
#expect(source.contains(".wavFloat32"))
#expect(source.contains("engine.schedule"))
// Must not embed the Lyrebird copyright in emitted user source.
#expect(!source.contains("Joshua Parmenter"))