Root Swift package mirroring PureYAML's structure, rules, and verification gates. Includes the XML node model (Node, Element, Attribute, QualifiedName), a working emitter (Serializer) with escaping and pretty/compact options, and structural validation. The parser surface is stable; parse() raises notImplemented until the scanner lands, pinned by a test. - dependency-free, namespaced under PureXML - portability and style gates carried over (style, namespacing, forbidden patterns, swiftformat, swiftlint, linux, wasm, windows CI) - 11 tests passing
24 lines
560 B
Bash
Executable File
24 lines
560 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
SDK_ID="${SWIFT_WASM_SDK_ID:-swift-6.3.2-RELEASE_wasm}"
|
|
SWIFT_SELECTOR="${SWIFT_WASM_SWIFT_SELECTOR:-+6.3.2}"
|
|
|
|
swift_command() {
|
|
if command -v swiftly >/dev/null 2>&1; then
|
|
swiftly run swift "$@" "$SWIFT_SELECTOR"
|
|
else
|
|
swift "$@"
|
|
fi
|
|
}
|
|
|
|
if ! swift_command sdk list | grep -qx "$SDK_ID"; then
|
|
echo "wasm: missing Swift SDK '$SDK_ID'" >&2
|
|
echo "wasm: install the SDK or set SWIFT_WASM_SDK_ID" >&2
|
|
exit 2
|
|
fi
|
|
|
|
swift_command build --swift-sdk "$SDK_ID"
|
|
swift_command build -c release --swift-sdk "$SDK_ID"
|