Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Thrift parser/generator
Scala HTML Java Thrift Objective-C Shell Other

scrooge: Backwards compatibility for service-per-endpoint


The service-per-endpoint patch introduced the following problems:
1. The internal argument types changed from function$args to Function.Args
2. Collisions between a method and a struct that's the same name.


1. Add aliases to keep function$args and function$result working.
2. Fully qualify service and struct types in generated code.


More backwards-compatible code.

latest commit 1807664022
@nshkrob nshkrob authored jenkins committed
Failed to load latest commit information.
bin Fix Travis CI and add code coverage for Finagle and related projects
demos/scrooge-maven-demo Release CSL Stack
doc/src/sphinx scrooge: Fix scrooge-maven-plugin and bump to 3.18.1
project scrooge: Backwards compatibility for service-per-endpoint
scrooge-benchmark Problem
scrooge-core Problem
scrooge-generator scrooge: Backwards compatibility for service-per-endpoint
scrooge-linter thrift-linter: Less verbose output, include position in the errors
scrooge-maven-plugin Release CSL Stack
scrooge-ostrich Fix target types of 'fake' jar library targets
scrooge-runtime Fix target types of 'fake' jar library targets
scrooge-sbt-plugin scrooge: Add output languge support in Sbt plugin
scrooge-serializer Problem
.gitignore [split] scrooge: Cache mustache resources to improve generation perfo…
.travis.yml Fix Travis CI and add code coverage for Finagle and related projects
CHANGES Release CSL Stack
CONFIG.ini [split] improve SocialGraphUtil exception logging
GROUPS [split] improve SocialGraphUtil exception logging
LICENSE [split] improve SocialGraphUtil exception logging
OWNERS scrooge: Add koliver to OWNERS Fix Travis CI and add code coverage for Finagle and related projects
pushsite.bash [split] improve SocialGraphUtil exception logging
sbt Fix sbt jar retrieval


Build status Coverage status Project status

Scrooge is a thrift code generator written in Scala, which currently generates code for Scala and Java.

It's meant to be a replacement for the apache thrift code generator, and generates conforming, compatible binary codecs by building on top of libthrift.

Since Scala is API-compatible with Java, you can use the apache thrift code generator to generate Java files and use them from within Scala, but the generated code uses Java collections and mutable "bean" classes, causing some annoying boilerplate conversions to be hand-written. This is an attempt to bypass the problem by generating Scala code directly. It also uses Scala syntax so the generated code is much more compact.

There is a fairly comprehensive set of unit tests, which actually generate code, compile it, and execute it to verify expectations.


This project is used in production at Twitter (and many other organizations), and is being actively developed and maintained.


There are a couple of classes needed by the generated code. These have been moved out of scrooge into a separate jar to keep dependencies small. Maven users need to add the following to the pom.xml file:


SBT users need this:

val scroogeCore = "com.twitter" %% "scrooge-core" % "3.3.2"

Building the develop branch locally

You will need the develop branches of util, ostrich, and finagle. Then ./sbt publish-local for each of them.

Full Documentation

Something went wrong with that request. Please try again.