{"id":13800836,"url":"https://github.com/scalapb/ScalaPB","last_synced_at":"2025-05-13T10:30:30.292Z","repository":{"id":21383999,"uuid":"24701619","full_name":"scalapb/ScalaPB","owner":"scalapb","description":"Protocol buffer compiler for Scala.","archived":false,"fork":false,"pushed_at":"2024-11-15T21:01:08.000Z","size":10294,"stargazers_count":1308,"open_issues_count":38,"forks_count":284,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-11-15T22:17:50.630Z","etag":null,"topics":["protocol-buffers","scala","scalapb"],"latest_commit_sha":null,"homepage":"https://scalapb.github.io/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalapb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-02T01:11:41.000Z","updated_at":"2024-11-15T21:01:12.000Z","dependencies_parsed_at":"2023-09-29T03:23:09.478Z","dependency_job_id":"84be7751-fc55-4284-b405-8509c052e661","html_url":"https://github.com/scalapb/ScalaPB","commit_stats":{"total_commits":2430,"total_committers":131,"mean_commits":"18.549618320610687","dds":0.4024691358024691,"last_synced_commit":"bef9b1f930b0801f4d5c4281b5c917ffb62ae605"},"previous_names":["trueaccord/scalapb"],"tags_count":185,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalapb%2FScalaPB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalapb%2FScalaPB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalapb%2FScalaPB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalapb%2FScalaPB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalapb","download_url":"https://codeload.github.com/scalapb/ScalaPB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225198932,"owners_count":17437001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["protocol-buffers","scala","scalapb"],"created_at":"2024-08-04T00:01:16.780Z","updated_at":"2025-05-13T10:30:30.286Z","avatar_url":"https://github.com/scalapb.png","language":"Scala","readme":"# ScalaPB\n\n[![ScalaPB runtime version support](https://index.scala-lang.org/scalapb/scalapb/scalapb-runtime/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/scalapb/scalapb/scalapb-runtime)\n\n[![Join the chat at https://gitter.im/ScalaPB/community](https://badges.gitter.im/ScalaPB/community.svg)](https://gitter.im/ScalaPB/community)\n\n[![Build Status](https://github.com/scalapb/ScalaPB/workflows/CI/badge.svg)](https://github.com/scalapb/ScalaPB/actions?query=workflow%3ACI)\n\nScalaPB is a protocol buffer compiler (`protoc`) plugin for Scala. It will\ngenerate Scala case classes, parsers and serializers for your protocol\nbuffers.\n\nScalaPB generates case classes that can co-exist in the same project alongside\nthe Java-generated code for ProtocolBuffer. This makes it easy to gradually\nmigrate an existing project from the Java version of protocol buffers to\nScala. This is achieved by having the ScalaPB generated code use the proto\nfile as part of the package name (in contrast to Java which uses the file name\nin CamelCase as an outer class)\n\nEach top-level message and enum is written to a separate Scala file. This\nresults in a significant improvement in incremental compilations.\n\nAnother cool feature of ScalaPB is that it can optionally generate methods\nthat convert a Java protocol buffer to a Scala protocol buffer and vice versa.\nThis is useful if you are gradually migrating a large code base from Java\nprotocol buffers to Scala. The optional Java conversion is required if you\nwant to use `fromAscii` (parsing ASCII representation of a protocol buffer).\nThe current implementation delegates to the Java version.\n\n# Highlights\n\n- Supports proto2 and proto3\n\n- Easily update nested structure in functional way using lenses\n\n- Scala.js integration\n\n- GRPC integration\n\n- Compatible with SparkSQL (through a helper library)\n\n- Conversion to and from JSON\n\n- Support user-defined options (since 0.5.29)\n\n- Support extensions (since 0.6.0)\n\n# Versions\n\n| Version | Description                                    |\n| ------- | ---------------------------------------------- |\n| 0.6.x   | Stable. Supports Protobuf 2.6.x to 3.5.x       |\n| 0.5.x   | Supports Protobuf 2.6.x and Protobuf 3.1.x.    |\n| 0.4.x   | Stable, unsupported. Works with Protobuf 2.6.x |\n\n# Installing\n\nTo automatically generate Scala case classes for your messages add ScalaPB's\nsbt plugin to your project. Create a file named `project/protoc.sbt`\ncontaining the following line:\n\n    addSbtPlugin(\"com.thesamet\" % \"sbt-protoc\" % \"1.0.6\")\n\n    libraryDependencies += \"com.thesamet.scalapb\" %% \"compilerplugin\" % \"0.11.3\"\n\nAdd the following line to your `build.sbt`:\n\n    Compile / PB.targets := Seq(\n      scalapb.gen() -\u003e (Compile / sourceManaged).value / \"scalapb\"\n    )\n\nFor additional configuration options, see [ScalaPB SBT Settings](https://scalapb.github.io/docs/sbt-settings) documentation\n\n# Using ScalaPB\n\nDocumentation is available at [ScalaPB website](https://scalapb.github.io/).\n\n# Questions?\n\nSee [contacting us](https://scalapb.github.io/docs/contact).\n\n# Testing\n\nScalaPB uses ScalaCheck to aggressively test the generated code. The test\ngenerates many different sets of proto files. The sets are growing in\ncomplexity: number of files, references to messages from other protos, message\nnesting and so on. Then, test data is generated to populate this protocol\nschema, then we check that the ScalaPB generated code behaves exactly like\nthe reference implementation in Java.\n\nRunning the tests:\n\n    $ sbt test\n\nThe tests take a few minutes to run. There is a smaller test suite called\n`e2e` that uses the sbt plugin to compile the protos and runs a series of\nScalaChecks on the outputs. To run it:\n\n    $ ./e2e.sh\n\n# Sponsors\n\nWe are very thankful to our sponsors:\n\n- [Pentech Ltd](https://github.com/PentechLtd)\n- [Evgeny Rubtsov (bikaras)](https://github.com/bikaras)\n- [Andrew Selvia](https://github.com/andrew-selvia)\n- [Ahmad Ragab](https://github.com/ASRagab)\n","funding_links":[],"categories":["Table of Contents","File Formats and Parsers"],"sub_categories":["Serialization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalapb%2FScalaPB","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalapb%2FScalaPB","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalapb%2FScalaPB/lists"}