Crates.io | cumin |
lib.rs | cumin |
version | 0.9.13 |
source | src |
created_at | 2021-02-12 09:24:23.681639 |
updated_at | 2021-07-03 14:58:08.616277 |
description | Cumin, Configuration Language |
homepage | https://github.com/cympfh/cumin |
repository | |
max_upload_size | |
id | 354095 |
size | 121,750 |
Cumin is a Structured, Typed and Mini-Programmable Configuration Language.
struct UserRecord {
id: Int,
name: Option<String> = None,
region: Region = Region::Unknown,
}
enum Region {
Unknown,
East,
West,
}
[
UserRecord(1, "cympfh", Region::East),
UserRecord { id = 2, name = "Alan", region = Region::West, },
UserRecord { id = 3, name = "Bob" },
UserRecord { id = 4, region = Region::East },
]
Cumin Compiler cuminc
converts to JSON from Cumin.
$ cuminc ./examples/names.cumin
[
{
"id": 1,
"name": "cympfh",
"region": "East"
},
{
"id": 2,
"name": "Alan",
"region": "West"
},
{
"id": 3,
"name": "Bob",
"region": "Unknown"
},
{
"id": 4,
"name": null,
"region": "East"
}
]
Plugin 'rust-lang/rust.vim'
au BufRead,BufNewFile *.cumin set filetype=cumin
au FileType cumin set syntax=rust