Open NilsIrl opened 4 years ago
It might be nice to perform this using just rust rather than having to go through the JVM and the Configuration API.
It will also reduce the overhead of calling using the JNI though this has to be benchmarked.
This would make it a lot easier. Possible crates to use to parse YAML files:
I would prefer serde-yaml
because it would allow to derive Deserialize
into a struct, allowing to have a struct containing all the settings.
Disadvantage of using this approach:
It seems that a convention of the minecraft community is to have all settings explicitly set in config.yml
This doesn't really work well when there are no default settings.
Introduction Reference
FileConfiguration