https://github.com/antonako1/atrc
ATRC – A powerful INI-style configuration library for C, C++, C#, and Lua
https://github.com/antonako1/atrc
configuration-files library resource-file
Last synced: about 2 months ago
JSON representation
ATRC – A powerful INI-style configuration library for C, C++, C#, and Lua
- Host: GitHub
- URL: https://github.com/antonako1/atrc
- Owner: Antonako1
- License: bsd-2-clause
- Created: 2024-05-12T14:23:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-31T15:46:37.000Z (10 months ago)
- Last Synced: 2025-08-31T17:34:53.475Z (10 months ago)
- Topics: configuration-files, library, resource-file
- Language: C++
- Homepage: https://github.com/Antonako1/ATRC/tree/main/docs
- Size: 3.99 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ATRC - Advanced Tagged Resource Configuration Library
ATRC is a high-performance, extensible configuration library for **C**, with official wrappers for **C++**, **C#**, and **Lua**. Inspired by INI syntax but packed with advanced features, ATRC is ideal for game engines, embedded tools, and modular applications.
**[Documentation](https://github.com/Antonako1/ATRC/blob/main/docs/)** | [VSCode Extension](https://github.com/Antonako1/ATRC-VSCode)
---
## Features
- **Preprocessor Engine**: Conditional logic, includes, raw strings, and logging
- **Variable System**: Global, private, and injected variables
- **Cross-Platform**: Windows and Linux support with architecture flags
- **Lightweight & Fast**: Written in C with minimal dependencies
---
## Language Wrappers
- **C++**: [Wrapper](https://github.com/Antonako1/ATRC/tree/main/Wrappers/C%2B%2B) included in prebuilt packages as `ATRC.hpp`
- **C#**: [Wrapper](https://github.com/Antonako1/ATRC/tree/main/Wrappers/C%23) · [NuGet](https://www.nuget.org/packages/ATRC/)
- **Lua**: [Wrapper](https://github.com/Antonako1/ATRC/tree/main/Wrappers/Lua) · [Releases](https://github.com/Antonako1/ATRC/releases)
---
## Installation
Get prebuilt binaries for Windows (x64/x86) and Linux (x64) from the [Releases](https://github.com/Antonako1/ATRC/releases) page.
Or build from source:
```bash
mkdir build && cd build
cmake ..
cmake --build .
```
To built the release packages, you need to use a Windows computer. See .\scripts\ for more information
---
## CMake Integration
```cmake
cmake_minimum_required(VERSION 3.8)
project(MyProject LANGUAGES C)
add_executable(MyProject main.c)
set(ATRC_DIR "path/to/ATRC-2.4_{BUILD}/cmake")
find_package(ATRC REQUIRED)
target_link_libraries(MyProject PRIVATE ATRC::ATRC)
```
---
## Usage Example
```c
#include
#include
int main() {
ATRC_FD* fd = Create_ATRC_FD("config.atrc", ATRC_READ_ONLY);
const char* platform = ReadKey("ServerConfig", "Platform");
const char* env = ReadKey("ServerConfig", "Environment");
printf("Running %s on %s\n", platform, env);
Destroy_ATRC_FD(fd);
return 0;
}
```
**ATRC Config File:**
```ini
#!ATRC
%env%=production
[ServerConfig]
#.IF WINDOWS
Platform=Windows
#.ELSE
Platform=Unix
#.ENDIF
Environment=%env%
```
---
## License
Licensed under the [BSD-2-Clause license](LICENSE.txt).
Created by [Antonako1](https://github.com/Antonako1)