Vavr adds persistent collections, functional error handling and pattern matching to Java 8+ with no dependencies
vʌvr (formerly called Javaslang) is a non-commercial, non-profit object-functional library that runs with Java 8+. It aims to reduce the lines of code and increase code quality.
At a glance
- What is it?
- Vavr, formerly Javaslang, is an object-functional library for Java. It bundles immutable collections, functional error handling and pattern matching in one jar, and its docs live outside the repository.
- Who is it for?
- Adopt Vavr in a Java codebase that already wants immutable collections and explicit error values, and where one extra jar with no transitive dependencies is acceptable. Skip it if your team reads Option and Try as noise, since the library works by changing how code is written, not by tidying around it.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- vavr-io/vavr6,182 ★ · +2
| Repository | 2026-10-08 | 2026-11-25 |
|---|---|---|
| vavr-io/vavr | 6.2k | 6.2k |
2 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One jar with no dependencies beyond the JVM
Vavr describes itself as an object-functional extension for Java that makes defensive programming easy by leaning on immutability and functional control structures. The practical hook is packaging: the README states that Vavr has no dependencies beyond the JVM, so you can add it as a standalone .jar to your classpath. A build that dislikes transitive dependencies has nothing to resolve.
The repository description gives the Java floor as Java 8+. It also gives the library's former name, Javaslang, which matters if you are reading older blog posts or answers that still use it. Material written under the Javaslang name predates the rename.
The license is Apache-2.0, and the description calls the project non-commercial and non-profit. The stated aim is to reduce the lines of code and increase code quality. That is a goal, not a measured result, and the repository gives no numbers for it, so judge it on your own code.
Three feature groups, one of them left open-ended
The README lists what Vavr provides in four bullets: persistent collections, functional abstractions for error handling and concurrent programming, pattern matching, and a fourth line that is simply an ellipsis, "...and more", so the README does not enumerate the rest.
Persistent collections are immutable collections where an update gives you a new value and leaves the old one intact. That is the part that supports the defensive programming claim, because a collection handed to another method cannot be changed underneath you.
The README names the error handling abstractions without describing any type by name, and it carries no code examples. If you need to see how Try wraps a failing call, the place to go is the User Guide at docs.vavr.io, since the repository README is a landing page and not a tutorial.
Where to get the dependency, and which version the README shows
Maven and Gradle coordinates are given in the README. For Maven:
<dependency>
<groupId>io.vavr</groupId>
<artifactId>vavr</artifactId>
<version>1.0.1</version>
</dependency>For Gradle:
implementation 'io.vavr:vavr:1.0.1'Both snippets pin 1.0.1, and the Javadoc badge also points at 1.0.1. The newest release is v1.1.0, published on 10 October 2026, after v1.0.1 on 1 March 2026 and v1.0.0 on 9 February 2026. So the version in the copy-paste snippet is one minor release behind. The README does not say what changed in 1.1.0, so read the release notes on GitHub before bumping.
A Maven Central badge in the README links to the artifact's version list under io.vavr, which is the quickest way to confirm what is current. The group is `io.vavr` and the artifact is `vavr`, and the README lists no separate modules.
The README sends you elsewhere for every real usage question
Under Using Vavr, the README has exactly one instruction: see the User Guide at docs.vavr.io and the Javadoc at javadoc.io. There is no quick start, no sample class and no migration guide in the repository text. A reader who wants to know whether Vavr's collections interoperate with java.util types, or how Try composes with streams, will not find the answer there.
The cost is a split between two places. The repository holds the code and build files, the User Guide holds the explanations, and the Javadoc holds the signatures. If a doc page describes behaviour from a different version than the one you depend on, nothing in the README helps you tell. Check that the Javadoc version in the URL matches the artifact version in your build file.
The homepage listed for the project is https://vavr.io. The README names the project's lead and maintainer as @pivovarit, which is useful to know when you want to see who answers issues.
Building Vavr from source, including the Maven goals the project lists
The repository root has `pom.xml`, `mvnw`, `mvnw.cmd` and a `.mvn/` folder, plus a `vavr/` subdirectory, so the Maven wrapper is available and you do not need a global Maven install. The README lists a handful of useful Maven goals:
mvn clean test
mvn javadoc:javadoc
mvn -P ci clean test jacoco:report
mvn javadoc:jar
mvn source:jarThe first runs the tests. The second executes doclint through Javadoc generation. The third activates the `ci` profile and produces a JaCoCo code coverage report. The last two create the `-javadoc.jar` and `-source.jar` artifacts.
The README adds a warning: a small number of users have reported problems building Vavr, and it directs you to the contribution guide, `CONTRIBUTING.md`, for details. It does not say what those problems are, so if your build fails, that file is the first place to read. A CI workflow exists at `.github/workflows/ci.yml`, linked from the build badge at the top of the README.
Two branches, and one of them is read-only history
The contribution section names two significant branches. `main` represents a stream of work leading to the release of a new major version. `version/1.x` holds historical work that went into `1.0.0-alpha-3`, and the README says to treat it as read-only, kept around for cherry-picking.
The naming is confusing at first glance. A branch called `version/1.x` sounds like the current stable line, yet the README describes it as old work that ended at an alpha tag. If you want to submit a fix, target `main` and not the 1.x branch.
The project is not archived. Its last push was on 31 October 2026, and the recent releases are dated 9 February, 1 March and 10 October 2026. Seven months separate v1.0.1 from v1.1.0, and the README gives no support policy for older releases.
What a library like this cannot do for your team
Vavr can only help in code that actually uses its types. A codebase full of null returns and checked exceptions will not change because the jar is on the classpath. Each Try and Option replaces a convention your team already follows, and the README does not discuss how to mix the two styles, so adoption in an existing service is a decision you make module by module.
Immutability has a cost the README does not quantify. Persistent collections give you safety from accidental mutation, and the repository gives no performance numbers to compare them with the standard java.util classes. If a hot path matters, measure it yourself.
Finally, the README says Vavr runs with Java 8+. It does not say whether every feature behaves the same on newer Java versions, so run your own test suite on the JDK you deploy.
Editorial conclusion
Adopt Vavr in a Java codebase that already wants immutable collections and explicit error values, and where one extra jar with no transitive dependencies is acceptable. Skip it if your team reads Option and Try as noise, since the library works by changing how code is written, not by tidying around it. Before pinning a version, compare the 1.0.1 shown in the README snippets with the v1.1.0 release and take the newer number from the releases page.
Frequently asked questions
What is Vavr?
Vavr, formerly called Javaslang, is a non-commercial, non-profit object-functional library that runs with Java 8+. It provides persistent collections, functional error handling and concurrency abstractions, and pattern matching.
Does Vavr have any dependencies?
The README states that Vavr has no dependencies beyond the JVM, so you can add it as a standalone jar to your classpath.
How do I add Vavr to a Maven or Gradle project?
Maven uses groupId io.vavr and artifactId vavr, and Gradle uses implementation 'io.vavr:vavr:1.0.1' as shown in the README. The newest release is v1.1.0, so check the releases page for the current version.
Where is the Vavr documentation?
The README points to the User Guide at docs.vavr.io and to the Javadoc at javadoc.io. The repository README itself carries no code examples.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/vavr-io-vavr)Star history chart for your README
[](https://hysenlabs.com/projects/vavr-io-vavr)Was this useful?