25 releases

0.2.0 Jan 11, 2021
0.1.10 Jan 10, 2021
0.1.8 Dec 26, 2020
0.1.6 Nov 28, 2020
0.0.10 Oct 22, 2020

#2122 in Development tools

Download history 53/week @ 2024-07-01 144/week @ 2024-07-29

144 downloads per month

GPL-3.0 license

500KB
14K SLoC

yang 陽

Build Status

Yang is a rudimentary, experimental code generator. Yang is both used by, and depends on, Yin for code generation. See yin.md for an in-depth description of its internals.

This crate is named zamm_yang for consistency with zamm_yin. However, the name for this tool is just yang for all intents and purposes within the ZAMM universe.

Usage

First, add yin and yang as build dependencies. Then, define your build.rs for concept generation, and your main.rs to use the generated concepts (examples linked). Make sure to initialize the newly generated concepts on KB startup.

Literate programming

You can use ZAMM to automatically use Yang to generate code out of READMEs.

Semver

Semver "backwards compatibility" will be interpreted to mean any changes that do not break Yin and Yang's release builds. For example, there may be many changes in the public API in between Yang versions 0.x.0 and 0.x.y. But so long as the Yin and Yang releases that depend on 0.x.0 do not break, and the releases that depend on the most recent 0.x.y version also do not break, this will be considered "backwards compatible" for all practical purposes.

Note that this means Yang version 0.x.0 will itself be exempt from this check, since Yang 0.x.0 will depend on Yang 0.x-1.y, and that dependency will of course be a breaking change.

Development

Note that due to Yang using its autogeneration capabilities on itself, it requires a pre-existing binary of itself in order to build its current version. The build.rs script will attempt to download one from Bintray if it isn't found locally. If none of the versions of Bintray are available for your platform, you can bootstrap Yang by building each version consecutively and setting the YANG_BINARY environment variable to the location of the newly built yang executable.

Dependencies

~4–16MB
~166K SLoC