https://github.com/dentosal/constcodegen
Share constants between languages
https://github.com/dentosal/constcodegen
Last synced: 3 months ago
JSON representation
Share constants between languages
- Host: GitHub
- URL: https://github.com/dentosal/constcodegen
- Owner: Dentosal
- License: mit
- Created: 2019-11-15T04:10:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T22:44:59.000Z (over 4 years ago)
- Last Synced: 2025-08-14T18:54:20.658Z (11 months ago)
- Language: Rust
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ConstCodeGen - Share constants between languages
Features:
* Language agnostic: supports (almost) any language
* Generates header files or replaces placeholders
Planned features:
* Read from JSON in addition to TOML
* Constraints for automatically checking values for validity
* Data format exports, JSON etc.
* Proper, autogenerated documentation
Non-goals:
* Turing complete configuration language
* Sharing code - maybe small pure functions but not more
## Try it!
```bash
cargo run -- --target-dir target/ --options-file examples/options.toml -c examples/constants.toml
cat target/constants.rs
cat target/constants.py
```