Configuration — infr.toml
Infr uses TOML for project configuration. Create an infr.toml in your project root, or run infr init to generate one.
Full reference
infr.toml
[project]
name = "my-analysis"
r_version = "4.3" # Target R version for output
[check]
strictness = "moderate" # relaxed | moderate | strict
warn_implicit_any = true # Warn when a type can't be inferred
warn_unused_const = true # Warn on const bindings that are never read
[output]
dir = "R/" # Where to write transpiled .R files
preserve_comments = true # Keep comments in emitted R
[declarations]
include = [ # Additional .d.infr files
"types/dplyr.d.infr",
"types/ggplot2.d.infr"
]
Sections
[project]
| Key | Type | Default | Description |
|---|---|---|---|
name | string | — | Project name |
r_version | string | — | Target R version |
[check]
| Key | Type | Default | Description |
|---|---|---|---|
strictness | string | "relaxed" | One of relaxed, moderate, strict |
warn_implicit_any | bool | false | Warn when types can't be inferred |
warn_unused_const | bool | false | Warn on unused const bindings |
[output]
| Key | Type | Default | Description |
|---|---|---|---|
dir | string | "." | Output directory for transpiled .R files |
preserve_comments | bool | true | Preserve comments in output |
[declarations]
| Key | Type | Default | Description |
|---|---|---|---|
include | array | [] | Additional .d.infr declaration files to load |