chyh1990 / yaml-rust

A pure rust YAML implementation.
Apache License 2.0
605 stars 140 forks source link

unsafe-libyaml looks... unsafe? #193

Open Gnurou opened 1 year ago

Gnurou commented 1 year ago

Hi and thanks for this very useful crate.

I am considering using this crate to use YAML instead of pure JSON for the configuration files of one of my projects, but am not sure what to think about the use of unsafe-libyaml... Safety is a big concern for us and this effectively introduces a bunch of unsafe code responsible for parsing arbitrary input.

Looking at the history I see that yaml-rust was used previously, but seems to have been abandoned in favor of unsafe-libyaml due to lack of maintenance. That's unfortunate but the decision is understandable.

Are there other alternatives that could be used to parse YAML? Or are my concerns about unsafe-libyaml unwarranted?

davvid commented 8 months ago

In case you're still interested, my fork https://github.com/davvid/yaml-rust/ is actively maintained.