KWARC / rust-libxml

Rust wrapper for libxml2
https://crates.io/crates/libxml
MIT License
76 stars 38 forks source link

Continuation of XSD schema loading and validation wrappers #67

Closed cbarber closed 4 years ago

cbarber commented 4 years ago

This forks and continues the work from #64

The validation error test confirms suspicions that using Vec's as_mut_ptr will result in accessing invalid memory.

The errlog is leaked with transmute and passed as mutable pointer. Calling transmute again on the pointer in the context's drop method results in freeing the memory.

dginev commented 4 years ago

Looks great, thanks for following-up on our discussion in the other PR. I will merge here, see if it needs any minor polish and ship a new release of the crate.

lweberk commented 4 years ago

Excellent. Thank you.

dginev commented 4 years ago

You can now find 0.2.13 live at https://crates.io/crates/libxml/0.2.13

I still haven't had a chance to personally work with the schema functionality, so the contributions were most welcome - thanks again @lweberk and @cbarber !

If you continue to use the crate and find any problems with ergonomics, feel invited to open new PRs and/or issues, the library should certainly continue to evolve to meet dev expectations.