Libraries
Besides research prototypes, Bismuth contains libraries that are ready for building local-first applications. They are published separately and can be used individually, on the JVM, in the browser via Scala.js, and natively via Scala Native (group id de.tu-darmstadt.stg). We document the RDTs (algebraic replicated data types) and Reactives libraries with a hands-on manual each, and all libraries with generated API documentation (Scaladoc). To build the code yourself, see working with the repository below.
RDTs
Algebraic replicated data types: lattices with automatically derived merge for products and sums, causal metadata, and a collection of common replicated data types.
Reactives
Signals and events in a transactional dataflow graph – the continuation of the REScala library.
Using the libraries
The current version is 0.39.0. See the changelog for what changed.
libraryDependencies += "de.tu-darmstadt.stg" %% "rdts" % "0.39.0"
libraryDependencies += "de.tu-darmstadt.stg" %% "reactives" % "0.39.0"
libraryDependencies += "de.tu-darmstadt.stg" %% "channels" % "0.39.0"//> using dep de.tu-darmstadt.stg::rdts::0.39.0
//> using dep de.tu-darmstadt.stg::reactives::0.39.0
//> using dep de.tu-darmstadt.stg::channels::0.39.0def mvnDeps = Seq(
mvn"de.tu-darmstadt.stg::rdts::0.39.0",
mvn"de.tu-darmstadt.stg::reactives::0.39.0",
mvn"de.tu-darmstadt.stg::channels::0.39.0"
)Working with the repository
Bismuth is a single sbt build with many modules. You rarely need all of them, so compile and test only the module you work on.
Install sbt
Follow the official install instructions. You also need Java 21 or newer. Compile everything once to check that it works.
sbt compileCompile and test
Prefix a command with the module name, and use
projectsto list all modules. The JVM variant has no suffix, the others end inJSorNative.sbt 'rdts/compile' sbt 'reactivesJS/test'Tests of Scala.js modules need npm packages. Run
npm installonce in the project root.
The Justfile collects further commands, for example to run the web demos.
IDE setup
Both IntelliJ and Metals generally work well with the project. Start sbt once from the command line before importing.
IntelliJ with the Scala plugin
Open the root folder and use the normal sbt import. Alternatively, choose BSP so IntelliJ compiles and tests through sbt. The BSP importer drops some dependencies of shared test sources (SCL-23703). To fix that, close the project after each import and run:
just intellij-bsp-import-fixMetals language server
Works with VS Code and many other editors. Metals can also use sbt as BSP server, but the default import is usually fine.
Repository layout
build.sbtThe sbt build with all modules.JustfileCommon commands.project/sbt plugins and shared build settings.Modules/One folder per module.RDTs/ Reactives/ Channels/The libraries described above.Lore/LoRe, invariant-based reasoning about where local-first applications need coordination.loreloreJSLoRe Compiler Plugin/Verifies LoRe code embedded in Scala by compiling it to Dafny.loreCompilerPluginExamples/Case studies and benchmarks, one package per example, prefixed with the year it was started. Packages marked JS are browser demos.examplesexamplesJSbenchmarks/JMH benchmarks for reactives, incremental collections, encrypted RDTs, lattices, crypto primitives, BFT, Merkle search trees, and more.ex2014basic/Early event-based examples, such as an elevator simulation.ex2014reswingexamples/Swing applications built with reactives: an RSS reader, a text editor, the mill game, and the ReShapes drawing tool.ex2014swing/Small Swing animations, each written in several styles (imperative, observer, events, signals).ex2016programmingdemo/A step-by-step tutorial series of animated Swing demos, from a circling circle to a multi-ball racket game.ex2016universe/A predator–prey simulation of animals and plants, used as a reactive benchmark.ex2017jfx/Minimal example of binding reactives to JavaFX properties.ex2019todo/ (JS)The TodoMVC-based collaborative todo list.ex2021encfxtodo/A JavaFX todo list synchronized via encrypted CRDTs.ex2022reform/ (JS)Reform, management of student assistant contracts in the browser.ex2023conversion/ (JS)A unit converter built with scalatags.ex2024bft/Byzantine fault tolerant RDTs and their benchmark.ex2024calendar/ (JS)The shared appointment calendar.ex2024dare/Sketch of a replicated access control list.ex2024DTN/Delay-tolerant networking: routers that disseminate RDT deltas, with monitoring and simulation clients.ex2024ot/An operational transformation algorithm over causal broadcast, for comparison with RDTs.ex2024socialMedia/ (JS)A small social network of posts with likes, dislikes, and comments.ex2024textRDT/ (JS)Fugue-based collaborative text editing: shared tree implementations, a JVM benchmark, and the browser editor.ex2025blockchain/Proof-of-work and proof-of-stake blockchains built on RDTs.ex2025recipebook/A replicated recipe book with evaluations of MV-register and OR-map designs.ex2025ribltbft/BFT synchronization of hash DAGs using rateless invertible Bloom lookup tables (RIBLT).ex2025tabular/ (JS)Tabular, the collaborative spreadsheet.ex2026accessControl/A JavaFX travel planner with access control, invitations, and permission trees.ex2026darelecture/Lecture examples on lattices: products, sums, voting, and a mini social network.ex2026keyHierarchies/Key hierarchies for encrypting parts of deltas with derived keys.ex2026keyValuePrdtBench/A key-value store replicated by consensus protocols built from protocol RDTs, benchmarked against etcd (YCSB adapters, CLI, clients).ex2026minisocial/ (JS)The tiny replicated social feed.ex2026merklesearchtree/A Merkle search tree.ex2026overlaydemo/ (JS)The overlay network visualization, with a JVM signaling server.
scripts/Repository maintenance commands, such as selecting the default reactives scheduler and fixing the IntelliJ BSP import.scripts
Research Artifacts/Evaluation scripts, results, and notebooks of published papers.Website/This website, including the manuals (a scitzen project in Website/documentation/) and the web pages of the demos.
Questions?
Join our matrix channel if you run into problems. You can use the TUDa matrix server with your TU-ID if you want.