Releases: KWARC/rust-libxml
MacOS build fix
Minor release for better cross-platform crate builds. See #48 for details
Minor, added Node::null
Added
Node::nullplaceholder that avoids the tricky memory management ofNode::mockthat can lead to memory leaks. Really a poor substitute for the betterOption<Node>type with aNonevalue, which is recommended instead.
Multi-document workflow patches
Now using weaker references for an object's owner Document. See #42 for details
Minor release, Node::findnodes
Improve XPath API, with minor internal refactor. See #41 for details.
Expose libxml2 pointer getters to public API
- Expose the underlying libxml2 data structures in the public crate interface, to enable a first libxslt crate proof of concept.
Full libxml2 coverage via bindgen
[0.2.1] 2018-23-07
Added
Node::set_node_rc_guardwhich allows customizing the reference-count mutability threshold for Nodes.- serialization tests for
Document - (crate internal) full set of libxml2 bindings as produced via
bindgen(see #39) - (crate internal) using libxml2's type language in the wrapper Rust modules
- (crate internal) setup bindings for reuse in higher-level crates, such as libxslt
Changed
NodeType::from_c_intrenamed toNodeType::from_int, now accepting au32argument
Removed
- Removed dependence on custom C code; also removed gcc from build dependencies
Safe API via Rc<RefCell<T>
This release adds fundamental breaking changes to the API. The API continues to be considered unstable until the 1.0.0 release.
Added
dupanddup_frommethods for deeply duplicating a libxml2 documentis_unlinkedfor quick check if aNodehas been unlinked from a parent
Changed
- safe API for
Nodes andDocuments, with automatic pointer bookkeeping and memory deallocation, by @triptecNodes are now bookkept by their owning document- libxml2 low-level memory deallocation is postponed until the
Documentis dropped, with the exception of unlinked nodes, who are deallocated on drop. Document::get_root_elementnow has an option type, and returnsNonefor an empty DocumentNode::mocknow takes ownerDocumentas argument- proofed tests with
valgrindand removed all obvious memory leaks
- All node operations that modify a
Nodenow both require a&mut Nodeargument and return aResulttype.- Full list of changed signatures in Node:
remove_attribute,remove_property,set_name,set_content,set_property,set_property_ns,set_attribute,set_attribute_ns,remove_attribute,set_namespace,recursively_remove_namespaces,append_text
- Full list of changed signatures in Node:
- Tree transforming operations that use operate on
&mut self, and no longer return a Node if the return value is identical to the argument.- Changed signatures:
add_child,add_prev_sibling,add_next_sibling
- Changed signatures:
Resulttypes should always be checked for errors, as mutability conflicts are reported during runtime.
Removed
globalmodule, which attempted to manage global libxml state for threaded workflows. May be readed after the API stabilizes
Less leaky, more control
This is a minor enhancement release allowing for better control over freeing nodes and namespaces, and avoiding some leaky strings.
We welcome Andreas to the crate's core developer team!
The repository is now en route to a new approach for the core data structures which will allow us to auto-free the various data structures on Drop - we expect that to land as a 0.2 release.
First public-facing release
Pushing up release to a 0.1.0, as contributor interest is starting to pick up, and the 0.0. versions were getting a bit silly/wrong.
We have a basic working setup for several existing libxml workflows now (which have been ported to Rust), and a logical next step would be to grow the coverage and test suite of this wrapper to a more general-purpose state.
That will continue as has in the past - proportional to community interest - so feel free to step up and offer help/suggestions!
Minor stability and xpath improvements
[0.0.5] 2016-07-01
Thanks to @grray for most of these improvements!
Changed
- Switched to using the more permissive MIT license, consistent with libxml2 licensing
- Fixed segfault issues with xpath contexts
Added
- Can now evaluate
string(/foo//@bar)type XPath expressions, and use their result via.to_string()