Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Adding an example

Matt Coffin edited this page Jun 1, 2015 · 2 revisions

This document explains how to add a new example to the zinc repository.

Adding to the build system

  1. Add the code for your example to the examples folder in the root of the project with the naming scheme app_<example-name>_<platform>.rs.
  2. Add the new example to the root Cargo.toml of zinc by adding an entry to the example array. Note that you will need one of these entries for every single platform for which your example exists.
[[example]]
name = "<example-name>_<platform>"
path = "examples/app_<example-name>_<platform>.rs"

Adding to travis builds

Add the example to the .travis.yml so that it may be built in all travis-ci builds. Simply add the <example-name>_<platform> string to the EXAMPLES var for all desired platforms.