41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
// swift-tools-version: 6.0
|
|
// Package.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// Build-time code generator for the interpreted graph-DSL's builtin registry.
|
|
//
|
|
// Deliberately a SEPARATE package under `Tools/` rather than a target in the
|
|
// main package: it depends on swift-syntax, which is large and would otherwise
|
|
// be resolved and built on every `swift build` of Lyrebird itself. The shipped
|
|
// `LyrebirdGraphDSL` target has no such dependency — it only consumes the Swift
|
|
// file this tool emits.
|
|
//
|
|
// Run via `bash scripts/generate-dsl-registry.sh` (which shells
|
|
// `swift run --package-path Tools/DSLRegistryGen`).
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "DSLRegistryGen",
|
|
platforms: [.macOS(.v13)],
|
|
dependencies: [
|
|
.package(
|
|
url: "https://github.com/swiftlang/swift-syntax",
|
|
"600.0.0"..<"700.0.0"
|
|
),
|
|
],
|
|
targets: [
|
|
.executableTarget(
|
|
name: "DSLRegistryGen",
|
|
dependencies: [
|
|
.product(name: "SwiftSyntax", package: "swift-syntax"),
|
|
.product(name: "SwiftParser", package: "swift-syntax"),
|
|
],
|
|
path: "Sources/DSLRegistryGen"
|
|
),
|
|
]
|
|
)
|