6 ms·
PyO3 works great. I've written an example repository for a hello world app for this if anyone's interested: https://github.com/russnes/rust_python_package_examp
by russnes 4y ago
PyO3 works great. I've written an example repository for a hello world app for this if anyone's interested:
https://github.com/russnes/rust_python_package_example https://github.com/russnes/rust_python_package_example
- masklinn 4y agoFor a somewhat more "productive" hello world (as in a very simple application which does useful things), there's nh3 (https://github.com/messense/nh3 https://github.com/messense/nh3) which is a relatively small wrapper around ammonia (https://github.com/rust-ammonia/ammonia https://github.com/rust-ammonia/ammonia), an HTML sanitisation library. The lib.rs is all of 125 SLOC (and about half of that is owing to the handling of `attribute_filter` which is pretty demanding on the glue layer: https://github.com/messense/nh3/commit/72be3e6728b7ceb9185e7431bfea39add15b5bdb https://github.com/messense/nh3/commit/72be3e6728b7ceb9185e7...).