Vulcan

Vulcan

  • API Docs
  • Documentation
  • GitHub

›Documentation

Documentation

  • Overview
  • Codecs
  • Modules

Overview

Vulcan provides Avro schemas, encoders, and decoders between Scala types and types used by the official Apache Avro library. The aims are reduced boilerplate code and improved type safety, compared to when directly using the Apache Avro library. In particular, the following features are supported.

  • Schemas, encoders, and decoders for many standard library types.

  • Ability to easily create schemas, encoders, and decoders for custom types.

  • Derivation of schemas, encoders, and decoders for case classes and sealed traits.

Documentation is kept up-to-date, currently documenting v1.12.0 on Scala 2.13.

Getting Started

To get started with sbt, simply add the following line to your build.sbt file.

libraryDependencies += "com.github.fd4s" %% "vulcan" % "1.12.0"

Published for Scala 2.12, 2.13 and 3.3. For changes, refer to the release notes.

For Scala 2.12, enable partial unification by adding the following line to build.sbt.

scalacOptions += "-Ypartial-unification"

Modules

Following are additional provided modules.

Enumeratum

For enumeratum support, add the following line to your build.sbt file.

libraryDependencies += "com.github.fd4s" %% "vulcan-enumeratum" % "1.12.0"

Generic

For generic derivation support, add the following line to your build.sbt file.

libraryDependencies += "com.github.fd4s" %% "vulcan-generic" % "1.12.0"

Refined

For refined support, add the following line to your build.sbt file.

libraryDependencies += "com.github.fd4s" %% "vulcan-refined" % "1.12.0"

External Modules

Following is an incomplete list of third-party integrations.

  • fs2-kafka-vulcan

Signatures

Stable release artifacts are signed with the 7AD5 92B5 B105 24E3 key.

Compatibility

Backwards binary-compatibility for the library is guaranteed between minor and patch versions.
Version 1.a.b is backwards binary-compatible with 1.c.d for any a > c or a = c and b > d.

Please note binary-compatibility is not guaranteed between milestone releases.

Snapshot Releases

To use the latest snapshot release, add the following lines to your build.sbt file.

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies += "com.github.fd4s" %% "vulcan" % "1.12.0+1-f2287e63-SNAPSHOT"

Dependencies

Refer to the table below for dependencies and version support across modules.

ModuleDependenciesScala
vulcanApache Avro 1.11.4, Cats 2.12.0Scala 2.12, 2.13 and 3.3
vulcan-enumeratumEnumeratum 1.7.6Scala 2.12 and 2.13
vulcan-genericMagnolia 0.17.0, Shapeless 2.3.13Scala 2.12, 2.13 and 3.3
vulcan-refinedRefined 0.11.3Scala 2.12, 2.13 and 3.3

Inspiration

Library is heavily inspired by ideas from avro4s.

License

Licensed under the Apache License 2.0. Refer to the license file.

Codecs →
  • Getting Started
    • Modules
    • Signatures
    • Compatibility
    • Snapshot Releases
  • Dependencies
  • Inspiration
  • License

Copyright © 2019-2025 OVO Energy Limited.
Icon designed by Kiranshastry from Flaticon.