43 releases

0.4.10 Jun 28, 2024
0.4.7 Mar 27, 2024
0.4.4 Nov 10, 2023
0.3.0 Mar 7, 2023
0.2.16 Jun 9, 2022

#2 in #cheminformatics

Download history 1/week @ 2024-06-16 357/week @ 2024-06-23 57/week @ 2024-06-30 25/week @ 2024-07-07 16/week @ 2024-07-14 46/week @ 2024-07-21 85/week @ 2024-07-28 5/week @ 2024-08-04 14/week @ 2024-08-11 2/week @ 2024-08-18 46/week @ 2024-08-25 2/week @ 2024-09-01 62/week @ 2024-09-15 92/week @ 2024-09-22 56/week @ 2024-09-29

210 downloads per month
Used in 2 crates (via rdkit)

MIT license

48KB
934 lines

RDKit-Sys

Rust code that binds to the C++ rdkit library!

How does it work?

RDKit is a C++ mega-library, full of cheminformatics wisdom. We don't want to rewrite RDKit in Rust, we should instead meet somewhere in the middle and "bridge" Rust to C++ through some wrappers.

The goal is to do 1-1 bindings with the C++ library, exposing all the classes as we need them. The goal is not to create a high-level functionality like the MinimalLib (cffiwrapper). Our goal is to expose the building blocks. If you're looking for idiomatic Rust, check out the rdkit crate.

Prerequisites

On Mac:

brew install rdkit

Also known to work with conda-managed RDKit, be sure to set the dynamic-linking-from-conda feature. Not as tested, please open an issue if you have a hard time.

Testing

Or just run the test suite:

cargo test

TODO

  • figure out how to cargo publish without --no-verify (otherwise it detects changes outside of OUTDIR)
  • specify path to RDKit's cffiwrapper.h and all required search paths for other dependent headers
  • use conditional rebuild logic to make the library build experience more reliable (for now, if you get stuck, try cargo clean and retry with cargo build -vv)

Prior art

Dependencies

~0.5–2.8MB
~47K SLoC