Scrooge is a thrift code generator written in Scala, which currently generates code for Scala, Java, Cocoa, Android, and Lua. It’s meant to be a replacement for the Apache thrift code generator and generates conforming, binary-compatible 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.

Features

  • Generates native Scala thrift codecs
  • Generated code is templated using a mustache variant, making it easy to edit
  • Documentation available
  • Finagle client/server adaptors can be optionally generated at the same time
  • Has a pluggable backend providing a dynamic way to add more generator targets
  • Examples available

Project Samples

Project Activity

See All Activity >

Categories

Code Generators

License

Apache License V2.0

Follow Scrooge

Scrooge Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Scrooge!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Scala

Related Categories

Scala Code Generators

Registered

2024-07-22