Skip to content

Create .proto files and convert them to case classes using ScalaPB

License

Notifications You must be signed in to change notification settings

mtbbiker/scala-protobuf-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo that shows how to convert scala case classes to a *.proto file

Precondition

Clone and deploy the following sbt-plugin => https://github.com/bakenezumi/scala2protobuf

Objective: Generate a .proto file and then use that file in other Projects to serialize/deserialize protobuf messages

  1. Run sbt scala2protobuf to convert the case classes to a .proto file (See target/scala-2.13/resourced_managed directory)
  2. Copy the .proto file to the src/main/protobuf directory.
  3. Edit the file (to change/effect the namespaces in the Classes generated)
  4. Run sbt protocGenerate to Create the Protobuf required classes to use the protobuf in your project

About

Create .proto files and convert them to case classes using ScalaPB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages