Generated project
elura init all creates a compilable upper application. Elura supplies templates, but the generated files belong to your application and are intended to be edited.
The CLI is optional. See Manual setup to assemble the minimum Gateway and World application from ordinary Rust files.
.
├── Cargo.toml
├── Dockerfile
├── .dockerignore
├── .gitignore
├── .env.example
├── config
│ ├── README.md
│ ├── elura.env.example
│ ├── application.env.example
│ ├── gateway.json
│ ├── world.json
│ ├── distributed.json
│ └── realm-gateways.json
├── deploy
│ ├── README.md
│ ├── docker-compose.yml
│ └── kubernetes
│ ├── README.md
│ ├── kustomization.yaml
│ ├── namespace.yaml
│ ├── secret.example.yaml
│ ├── discovery-config.yaml
│ ├── gateway.yaml
│ ├── world.yaml
│ └── network-policy.yaml
└── src
└── bin
├── gateway.rs
└── world.rsComposition roots
src/bin/gateway.rs and src/bin/world.rs are composition roots. Each one:
- Defines the application-owned
AppConfig. - Loads JSON and environment variables.
- Copies secrets into runtime configuration fields that are skipped by Serde.
- Constructs the chosen discovery or infrastructure adapter.
- Registers business routes and starts the launcher.
Elura deliberately does not load configuration on the application’s behalf. You may replace AppConfig::load() with a configuration service, secret manager, or another file format without changing the runtime.
Generated defaults
The JSON files contain safe, non-secret development values. Serde uses strict deny_unknown_fields behavior for runtime configurations, so misspelled keys fail at startup instead of being silently ignored.
Sensitive values are injected through environment variables:
APP_TICKET_KEYsigns and verifies client authentication tickets.APP_INTERNAL_TOKENauthenticates Gateway-to-World commands.APP_ADMIN_TOKENprotects metrics, debug, and mutation endpoints.
The environment reference lists every variable used by the templates.
Dependencies and features
The generated manifest starts with the adapters feature:
[dependencies]
prost = "0.14"
elura = { version = "0.1.1", features = ["adapters"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "signal"] }Enable only the concrete features the application needs. For example, Redis requires both the facade’s adapter layer and the redis feature:
elura = { version = "0.1.1", features = ["redis"] }See Crates and feature flags for the full matrix.