Skip to content
/ mprotc Public

An mprot compiler to translate schema definitions into source code.

License

Notifications You must be signed in to change notification settings

mprot/mprotc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mprotc

mprotc is a compiler for mprot to translate schema definitions into source code.

Usage

Synopsis:
  mprotc <language> [options] [schema-file ...]
  mprotc help <language>

Description:
  The mprotc tool compiles schema definition files into source code of the specified programming language.

  The following options are available:
    --root <path>
        Specify the root path for the schema files. The given schema files are interpreted relative to this
        directory. The default is the current directory.
    --out <path>
        Specify the output path for the generated code. The default is the current directory.
    --deprecated
        Include the deprecated fields in the generated code.
    --dryrun
        Print the names of generated files only instead of writing the files.

Supported Languages

mprotc go [options] [schema-file ...]

Additional Options:
  --import-root
      Import root path for all schema imports. The default is the path specified by the output directory.
  --scoped-enums
      Scope the enumerators of the generated enums, i.e. prefix the enumerator names with the enum name.
      The default is false.
  --unwrap-union
      Unwrap the union types of the generated struct fields, i.e. use an empty interface as the field type.
      The default is false.
mprotc js [options] [schema-file ...]

Additional Options:
  --typedecls
      Generate type declarations in a separate .d.ts file. This flag should be used to generate TypeScript
      instead of JavaScript. The default is false.

About

An mprot compiler to translate schema definitions into source code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published