# atlas-framework-core

> The small Rust crate every Atlas app uses, with app identity, the settings file, journal logging, os-release and a safe append helper, and no Qt or async runtime.

`atlas-framework-core` is what every Atlas app shares at the Rust level. It has no Qt and no async runtime, so a light app pays for nothing it does not use.

An app rarely adds it by hand. [atlas-framework-ui](https://atlasos.eterneon.net/framework/atlas-framework-ui.md) depends on it and re-exports it as `atlas_framework_ui::atlas_framework_core` (and `AppInfo` directly), so a GUI app gets it through that crate. Add it directly only for a command-line tool or a service that has no GUI.

## Add it

```toml
atlas-framework-core = { git = "https://github.com/EternalCoder454/atlas-framework", rev = "7a114a112bd1fff4fe3d6facc81b0a81e5d2db30" }
```

The commit is the one tagged `v1.4.0`. Pin apps to a commit or a release tag, and build with `cargo build --locked`.

## Features

None. Its dependencies are `serde`, `libc` and `log`.

## Pages

| Page | What it covers |
|---|---|
| [AppInfo and app_info!](https://atlasos.eterneon.net/framework/atlas-framework-core/app-info.md) | Who the running app is: name, ID, version, repository |
| [settings](https://atlasos.eterneon.net/framework/atlas-framework-core/settings.md) | The app's own `atlas-<app>rc` file in KConfig format |
| [log](https://atlasos.eterneon.net/framework/atlas-framework-core/log.md) | The `log` macros sent to the systemd journal |
| [osrelease](https://atlasos.eterneon.net/framework/atlas-framework-core/osrelease.md) | The OS name, version and logo from os-release |
| [fsutil](https://atlasos.eterneon.net/framework/atlas-framework-core/fsutil.md) | Appending to shared log files safely |

## Crate root

| Name | Kind | Description |
|---|---|---|
| `AppInfo` | struct | Re-exported from the `app` module |
| `app_info!` | macro | Builds an `AppInfo` with the calling crate's version |
| `app`, `fsutil`, `log`, `osrelease`, `settings` | modules | All public |


## Pages

- [AppInfo and app\_info!](https://atlasos.eterneon.net/framework/atlas-framework-core/app-info.md): The value that names the running app, from which its settings file, journal identifier, crash reports and links are derived.
- [settings](https://atlasos.eterneon.net/framework/atlas-framework-core/settings.md): An app's own settings file in ~/.config, in KConfig INI format, written atomically under a lock shared with Atlas.Ui's AtlasSettings.
- [log](https://atlasos.eterneon.net/framework/atlas-framework-core/log.md): The log crate's macros sent straight to the systemd journal with a priority and the app's identifier, falling back to stderr.
- [osrelease](https://atlasos.eterneon.net/framework/atlas-framework-core/osrelease.md): The OS name, version and logo from os-release\(5\), for About pages and reports.
- [fsutil](https://atlasos.eterneon.net/framework/atlas-framework-core/fsutil.md): Helpers for appending to shared log files without following symlinks, and for reading lines that may be torn.
