Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.89 KB

File metadata and controls

55 lines (37 loc) · 1.89 KB

The Manifest Format

The Whisk manifest is heavily inspired by the Cargo manifest

The whisk.toml file for each package is called its manifest file. It is written
in the TOML format. It contains metadata that is needed to compile the package.

Every manifest file consists of the following sections:

  • [package] ~ Defines a package.
    • name The name of the package. (and output binary / lib)
    • lang The language this package uses. (c / c++)
    • type The type of this package. (exe / lib)
    • ...target All target fields are also available in the [package].
  • [target.*] ~ Compiler settings and build configuration.

The [package] section

The first section in a whisk.toml is the [package].

[package]
name = "hello"  # the name of the package   (and binary)
lang = "c"      # language of the package   ("c" or "c++")
type = "exe"    # type of the package       ("exe" or "lib") 

The only field required by Whisk is name.

The name field

The package name is an identifier used to refer to the package. It is used
for the name of the binary or archive.

The name must use only alphanumeric characters, or -, or _, and cannot be empty.

The lang field

The package language is used to tell the compiler how to interpret your source and header files.
It can only be one of three options :

  • c for C projects.
  • c++ for C++ projects.
  • auto for mixed projects. (not recommended)

The type field

The package type dictates what the compiler output should be. It can only be one of two options :

  • exe for executables (programs)
  • lib for libraries (static / dynamic)