Skip to content

A pure Scheme implementation of Protocol Buffers, including parsing and code generation.

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

ft/r6rs-protobuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protocol Buffers for R6RS Scheme

What is it?

This project provides a pure Scheme implementation of Protocol Buffers, including parsing and code generation. Visit the Protocol Buffers project page for information about the Protocol Buffers description language and the Protocol Buffers wire protocol.

Latest Updates

https://gitlab.com/joolean/r6rs-protobuf/blob/master/CHANGELOG.txt

Discussion

Visit the discussion group.

Documentation

Read the documentation.

Quick Example

You write a .proto file like this

package protobuf.person;

message Person {
  required int32 id = 1;
  required string name = 2;
  optional string email = 3;
}

and compile it like this

(import (protobuf compile))
(define proto (protoc:read-proto (open-input-file "Person.proto")))
(protoc:generate-libraries proto)

to produce an R6RS library form like this

(library (protobuf person)
  (export make-Person-builder     
          Person-builder?
          Person-builder-build
      
          Person-builder-id
          set-Person-builder-id!
          has-Person-builder-id?
          clear-Person-builder-id!

          Person-builder-name
          set-Person-builder-name!
          has-Person-builder-name?
          clear-Person-builder-name!

          Person-builder-email
          set-Person-builder-email!
          has-Person-builder-email?
          clear-Person-builder-email!

          Person-builder-extension
          set-Person-builder-extension!
          has-Person-builder-extension?
          clear-Person-builder-extension!

          Person?
          Person-id
          Person-name
          Person-email
          has-Person-email?

          has-Person-extension?
          Person-extension

          Person-read
          Person-write)

  (import (rnrs base)
          (rnrs enums)
          (rnrs records syntactic)
          (protobuf private))

  ...
)

About

A pure Scheme implementation of Protocol Buffers, including parsing and code generation.

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages