| Bond Compiler 0.13.0.0, (C) Microsoft |
| |
| gbc [COMMAND] ... [OPTIONS] |
| Compile Bond schema file(s) and generate specified output. The schema file(s) can be in one of two formats: Bond IDL or JSON representation of the schema abstract syntax tree as produced by `gbc schema`. Multiple schema files can be specified either directly on the command line or by listing them in a text file passed to gbc via @listfile syntax. |
| |
| Common flags: |
| -i | --import-dir=DIR | Add the directory to import search path |
| -o | --output-dir=DIR | Output generated files into the specified directory |
| -j | --jobs[=NUM] | Run NUM jobs simultaneously (or '$ncpus' if no NUM is not given) |
| -? | --help | Display help message |
| -V | --version | Print version information |
| | --numeric-version | Print just the version number |
| |
| gbc c++ [OPTIONS] [FILE] |
| Generate C++ code |
| |
| -u | --using=MAPPING | Custom type alias mapping in the form alias=type |
| -n | --namespace=MAPPING | Custom namespace mapping in the form bond_namespace=language_namespace |
| -h | --header=HEADER | Emit #include HEADER into the generated files |
| -e | --enum-header | Generate enums into a separate header file |
| | --allocator=ALLOCATOR | Generate types using the specified allocator |
| | --apply=PROTOCOL | Generate Apply function overloads for the specified protocol only; supported protocols: compact, fast and simple |
| | --export-attribute=ATTRIBUTE --apply-attribute | Prefix declarations for library export with the specified C++ attribute/declspec. apply-attribute is a deprecated synonym. |
| | --no-banner | Omit the banner at the top of generated files |
| | --core | Generate core serialization definitions (true by default, --core=false to disable) |
| | --alloc-ctors | Generate constructors with allocator argument |
| | --type-aliases | Generate type aliases |
| | --scoped-alloc | Use std::scoped_allocator_adaptor for strings and containers |
| | --enable-service-inheritance | Enable service inheritance syntax in IDL |
| |
| gbc c# [OPTIONS] [FILE] |
| Generate C# code |
| |
| -u | --using=MAPPING | Custom type alias mapping in the form alias=type |
| -n | --namespace=MAPPING | Custom namespace mapping in the form bond_namespace=language_namespace |
| -c | --collection-interfaces | Use interfaces rather than concrete collection types |
| -r | --readonly-properties | Generate private property setters |
| -f | --fields | Generate public fields rather than properties |
| | --no-banner | Omit the banner at the top of generated files |
| | --structs | Generate C# types for Bond structs and enums (true by default, use "--structs=false" to disable) |
| | --enable-service-inheritance | Enable service inheritance syntax in IDL |
| | --preview-constructor-parameters | PREVIEW FEATURE: Generate a constructor that takes all the fields as parameters. Typically used with readonly-properties. |
| |
| gbc java [OPTIONS] [FILE] |
| Generate Java code |
| |
| -u | --using=MAPPING | Currently unimplemented and ignored for Java |
| -n | --namespace=MAPPING | Custom namespace mapping in the form bond_namespace=language_namespace |
| | --no-banner | Omit the banner at the top of generated files |
| |
| gbc schema [OPTIONS] [FILE] |
| Output the JSON representation of the schema |
| |
| -r | --runtime-schema | Generate Simple JSON representation of runtime schema, aka SchemaDef |
| | --enable-service-inheritance | Enable service inheritance syntax in IDL |