Install Dependencies

Like Cargo does, Poac installs dependencies at build time. Poac currently supports Git and system dependencies. You can specify dependencies like:


"ToruNiina/toml11" = { git = "", rev = "846abd9a49082fe51440aa07005c360f13a67bbf" }

You can use either rev, branch, or tag to specify the revision. If you do not specify any of them, Poac will use the latest revision of the default branch.

After editing poac.toml, executing the build command will install the package and its dependencies.

you:~/hello_world$ poac build
Downloaded ToruNiina/toml11 846abd9a49082fe51440aa07005c360f13a67bbf
 Compiling src/
   Linking hello_world
  Finished debug target(s) in 0.70s

To use system dependencies, use system = true:


libgit2 = { version = "1.1.0", system = true }

The dependency name should be acceptable by pkg-config. The version requirement syntax is specified in src/VersionReq.hpp (opens in a new tab).

[!WARNING] Poac currently supports building a project with header-only dependencies. Building with build-required dependencies will be soon supported.