#command #command-line-interface #cog #idl #response #json #parser

app cog-idl-bin

Command line interface for parsing Cog IDL files

2 unstable releases

0.2.0 Apr 30, 2019
0.1.0 Apr 30, 2019

#6 in #cog

MIT/Apache

17KB
345 lines

Cog IDL Binary

Command line interface for parsing Cog IDL files.

Usage

The tool listens for commands on stdin, and sends out responses on stdout. Every line in stdin is interpreted as a single command. Commands and responses are in JSON.

To parse a module from a string:

{
    "LoadModuleFromStr": {
        "name": "my_api",
        "idl": "interface foo {\n    fn bar();\n}"
    }
}

To parse an API from a directory:

{
    "LoadApiFromDir": "../some/directory/api"
}

Dependencies

~2.5–3.5MB
~73K SLoC