build-server-protocol is a free, open source build & deployment project written in Scala and released under Apache-2.0. It has 554 GitHub stars, 74 forks and 40 open issues, and was last pushed 4 days ago. On this registry it ranks #81 of 84 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 7 stars over the last 30 tracked days.

What is build-server-protocol?

Build Server Protocol (BSP) is an Apache-2.0 protocol that lets IDEs and build tools communicate about compile, run, test and debug operations, and it is aimed at tooling developers who build editors, language servers and build tools rather than at end users who want a finished application.

What it is

Build Server Protocol is a specification and a set of support libraries, written primarily in Scala and built on JSON-RPC, that defines how a language server or editor talks to a build tool. The effort is led by the Scala Center together with tooling developers in the Scala ecosystem and beyond, with current maintainers Adrien Piquerez of the Scala Center and Łukasz Wawrzyk of VirtusLab, and former maintainers drawn from JetBrains, Lunatech and the Scala Center. The specification text, the documentation and the support libraries for some supported languages are automatically generated from a Smithy model held in the repository at spec/src/main/resources/META-INF/smithy/bsp/bsp.smithy.

The concrete problem it solves is the integration gap between editors and build tools. Before BSP, every editor or language server that wanted to know a project's source layout, compile a target, run a test suite or attach a debugger had to reach its own agreement with each build tool, producing duplicated and divergent integrations. BSP replaces those bespoke, point-to-point integrations with one protocol in which a build server exposes targets, sources, compile, test and run operations, and any conforming client can consume them. Although the protocol currently focuses on Scala developer tools, its design is explicitly language-agnostic, and the repository has begun adding extensions for other ecosystems.

Key capabilities

  • A JSON-RPC protocol covering compile, run, test and debug operations between build tools and language servers or editors.
  • Specification, docs and per-language support libraries generated from the Smithy model at spec/src/main/resources/META-INF/smithy/bsp/bsp.smithy.
  • Optional environment variable and working directory parameters on buildTarget/run and buildTarget/test requests, replacing the argument and environment lists previously carried on ScalaMainClass and ScalaTestSuites.
  • A buildToolParams field added to compile, test and run requests.
  • Streaming output and input notifications in the unreleased 2.2.0 changelog: run/printStdout, run/printStderr and run/readStdin.
  • An originId field on TaskStartParams, TaskProgressParams and TaskFinishParams, with deprecation of the same field in CompileReport and TestReport, so clients can distinguish multiple reports for one target.
  • Protocol extensions for Rust and for cargo, plus diagnostic structures updated to match LSP 3.17.
  • An optional data field on SourceItem.

Who uses it and how

  • Editor and IDE plugin developers who need their client to query a build tool for targets, sources and classpath without writing a separate integration per build tool.
  • Language server authors in the Scala ecosystem, where the protocol's current tooling and support libraries are most developed.
  • Build tool authors who implement BSP on the server side and expose compile, test and run operations through a single JSON-RPC endpoint.
  • Tooling teams spanning organisations, as shown by the maintainer history across the Scala Center, VirtusLab, JetBrains and Lunatech.
  • Rust and cargo tooling developers, following the newer protocol extensions.

Getting started

The entry point is the published specification at https://build-server-protocol.github.io/docs/specification, which is generated from the Smithy model. Contributors are directed to CONTRIBUTING.md and to the project's Discord server for discussion.

How it compares

BSP sits alongside the Language Server Protocol rather than competing with it: LSP carries editor-facing features such as diagnostics, which BSP aligns with in LSP 3.17, while BSP carries the build knowledge that LSP does not model. Both protocols share a JSON-RPC foundation, so a client already speaking LSP will recognise the transport and message shapes. Editors generally need both, with BSP supplying targets, compiles, tests and runs to the language server that LSP drives.

When to use it — and when not to

Adopt BSP when building an editor, language server or build tool that must exchange compile, test, run and debug information in a tool-agnostic way; the cost is implementing or consuming a JSON-RPC protocol whose specification is machine-generated from a Smithy model. It is the wrong choice for anyone who wants a ready-made build tool or IDE feature out of the box, because the project ships a specification, generated docs and support libraries rather than an installed product. Note also that version 2.2.0 is still marked unreleased in the changelog, the current focus remains Scala tooling despite the language-agnostic design, and the repository carries 40 open issues.

project readme (upstream, from github) — read inline

bsp logo Build Server Protocol

Join the chat on Discord

This project is an effort to improve the integration between language server/editors and build tools. This effort is led by the Scala Center together with the help of other tooling developers in the Scala ecosystem and beyond.

Even though the protocol currently focuses on Scala developer tools, it's designed to be language-agnostic.

You can read the specification here.

The specification text, docs and support libraries for some of the supported languages are automatically generated from the smithy model.

Contribution

If you'd like to contribute to the protocol, please check out our CONTRIBUTING doc.

Maintainers

Current Maintainers

Former Maintainers

  • Chris Kipp (ex-Lunatech) - @ckipp01
  • Jorge Vicente Cantero (ex-Scala Center) - @jvican
  • Ólafur Páll Geirsson (ex-Scala Center) - @olafurpg
  • Tomasz Pasternak (JetBrains/VirtusLab) - @tpasternak
  • Andrzej Głuszak (JetBrains) - @agluszak
  • Justin Kaeser (JetBrains) - @jastice
  • Marcin Abramowicz (JetBrains) - @abrams27

Protocol Changelog

2.2.0 (Unreleased)

  • Add unstable run/printStdout, run/printStderr and run/readStdin notifications
  • Add an optional originId field to TaskStartParams, TaskProgressParams and TaskFinishParams and deprecate it in CompileReport and TestReport to support BSP clients that need to distinguish between multiple reports for the same target.
    • Migration: Use the originId field in TaskFinishParams instead of CompileReport/TestReport to identify the report.
  • Add optional support for environment variables and working directory parameters in buildTarget/run and buildTarget/test requests. Mark arguments and environment variables lists in ScalaMainClass and ScalaTestSuites deprecated as they are replaced by the parameters in the base request.
  • Add cargo (Rust build tool) protocol extension
  • Update diagnostic-related structures to match LSP 3.17
  • Add Rust protocol extension
  • Add buildToolParams to compile/test/run requests
  • Add an optional data field to SourceItem

Frequently asked questions

Is build-server-protocol free to use?

build-server-protocol is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does build-server-protocol do?

Protocol for IDEs and build tools to communicate about compile, run, test, debug and more.

What is build-server-protocol written in?

build-server-protocol is primarily written in Scala. Its source is publicly available at https://github.com/build-server-protocol/build-server-protocol, and it has 554 GitHub stars.