theduke / quickjs-rs

Rust wrapper for the quickjs Javascript engine.
MIT License
570 stars 48 forks source link

Serde support #127

Open indietyp opened 1 year ago

indietyp commented 1 year ago

This PR enables serde support for any value value serializable by serde. Without the intermediary from quick_js::JsValue values will be directly serialized into libquickjs_sys::JsValue through the context.

Tests have been provided to ensure that no memory leaks take place as well as to ensure proper serialization.

Verified with valgrind, no memory leaks were found.