coco help [command]
help command prints the commands and options, when [command] is passed, the help for specific command is printed.
version command prints the current version of the Cocolang installation.
suppress the cocolang figlet banner
coco nut init <module_name>
nut command manages
coco.nut file, the manifest file for a module of
.coco source file(s). Currently, the only subcommand is `ìnit`, that creates a new
coco.nut file in the current folder, with the following contents:
[coco] version = "0.3.0" [module] name = "Module" version = "0.0.1" license = "" repository = "" authors = "" [target] os = "MOI" arch = "PISA" [target.moi] format = "YAML" output = "module" [target.pisa] format = "BIN"
While all fields in the
coco.nut file are mandatory, the only currently supported target is MOI Manifests (os = “MOI”) for the PISA runtime (arch = “PISA”), so only [target.moi] and [target.pisa] parameter values affect compilation. Allowed values for these parameters are:
[target.moi] // output format, the output file extension will be // .yaml, .json or .polo, respectively format = "YAML", "JSON" or "POLO" // output file name (without extension) - by default, it's lowercase module name output = "module" [target.pisa] // format of executable code in PISA manifest // "ASM" and "HEX" supported from Coco compiler release v0.3.1 format = "BIN", "ASM" or "HEX"
coco compile [path_to_coco.nut]
compile command compiles a
.coco source(s) of a module into a target artifact as defined in the
coco.nut file. When called without specified path to a
coco.nut file, the file in the current folder is used and the target artifact is created in the current folder. When path is specified, the artifact is created in the same folder, as
.coco files can have any file names, but only the ones with
coco <module_name> that matches
module.name in the
coco.nut file are used for compilation. Multiple source files for a single module are supported from v0.3.2.
print disassembled PISA binary to standard output for all functions in the module
coco labtest <module_name>
labtest command compiles and runs the module as a Logic with the LogicLab utility for MOI. When test cases are written into file (see logiclab testing for more), it compares the output with the expected results and reports success/failure. The
<module_name> can be written with or without .coco extension (as with the
compile command), but if it’s completely omitted, tests will be run for all .coco files in the current folder
any valid filepath