.. _compiler: ========== Compiler ========== .. program:: compiler Synopsis ======== :samp:`compiler {[OPTIONS]} -m {MECHANISM} -l {LANGUAGE} -o {OUTPUT-DIRECTORY} {INPUT-FILE}*` Description =========== The |project| compiler produces :term:`data-holder` classes and (de)serialization code for :samp:`{MECHANISM}` for :samp:`{LANGUAGE}` from data definitions and mapping descriptions :samp:`{INPUT-FILE}`. Output is written to files which are placed in :samp:`{OUTPUT-DIRECTORY}`. The :ref:`usual commandline options ` are accepted. Specialized commandline options: .. option:: --output-directory DIRECTORY, -o DIRECTORY Write generated output files to :samp:`{DIRECTORY}`. .. option:: --mechanism MECHANISM, -m MECHANISM Generate (de)serialization code for :samp:`{MECHANISM}`. .. option:: --language LANGUAGE, -l LANGUAGE Generate code for :samp:`{LANGUAGE}`. .. option:: --keep-going, -k Like in GNU make. Try to continue after encountering errors. Causes a summary of warnings and errors to be displayed after processing has finished. Examples ======== * .. code-block:: sh $ rosetta-compiler -m bottle/data-holder \ -l C++ \ -o my-project/generated-code/ \ my-idls/my-type.proto Generate a ``C++`` data-holder class and serialization code for the ``bottle/data-holder`` mechanism from the description in ``my-idls/my-type.proto`` and output the generated code into the ``my-project/generated-code`` directory. .. code-block:: sh $ ls my-project/generated-code/ MyType.h MyType_Bottle.h