Warning
Alpha software (v0.3.0). It might not be stable yet.
Xcode Build Server Protocol implementation in Swift.
Aims to provide support for Xcode projects in editors that rely on sourcekit-lsp.
Incoming requests:
build/initializebuild/shutdownworkspace/buildTargetsworkspace/waitForBuildSystemUpdatestextDocument/registerForChangesbuildTarget/sourcesbuildTarget/inverseSourcesbuildTarget/prepare(best-effort cache warmup)textDocument/sourceKitOptions
Incoming notifications:
build/initializedworkspace/didChangeWatchedFilesbuild/exit
Outgoing notifications:
buildTarget/didChangebuild/sourceKitOptionsChanged
Use the setup script, then generate project config with xcode-bsp config.
- Clone the repo.
- Run setup:
This builds the release binary, asks which directory to install
./build_release.sh
xcode-bspinto, then copies the executable there. - In the root folder of your Xcode project, run:
The command:
xcode-bsp config
- asks which schemes to include as active build targets,
- asks for executable path (defaults to detected current
xcode-bsppath), - writes
.bsp/xcode-bsp.json.
If you want to skip the executable-path prompt and set it explicitly:
xcode-bsp config --executable-path /absolute/path/to/xcode-bspactiveSchemes is optional in config. If omitted or empty, xcode-bsp uses all schemes from
xcodebuild -list.
Manual config is still supported. Example .bsp/xcode-bsp.json:
{
"name": "xcode-bsp",
"argv": ["/absolute/path/to/xcode-bsp"],
"version": "0.3.0",
"bspVersion": "2.0.0",
"languages": ["swift", "objective-c", "objective-cpp"],
"activeSchemes": []
}- Diagnostics are not implemented yet.
- Project-specific edge cases still exist.
- Cache warmup can make first-response latency noticeably higher.
- Build:
swift build - Test:
swift test
Rest is up to SourceKit's LSP.
