2 releases

0.1.0 Feb 16, 2023
0.1.0-alpha.0 Jan 30, 2023

#28 in #upstream

MIT license

6.5MB
132K SLoC

C++ 100K SLoC // 0.2% comments Python 12K SLoC // 0.3% comments Rust 10K SLoC // 0.0% comments Cython 7K SLoC // 0.6% comments Forge Config 1K SLoC // 0.8% comments Bazel 728 SLoC // 0.1% comments Jupyter Notebooks 722 SLoC // 0.5% comments Perl 504 SLoC // 0.2% comments Shell 332 SLoC // 0.2% comments Assembly 271 SLoC // 0.3% comments JavaScript 135 SLoC Batch 7 SLoC

NetworKit-rs

Crates.io

This is a rust wrapper for NetworKit, a toolkit for large-scale network analysis.

The API is similar to the python API of the upstream package.

This is still a work in progress, hence incomplete. If you need some function that is not available, please open an issue.

Safety issues

The upstream library does not check for out-of-bound array access most of the time and leads to undefined behaviour when out-of-bound indices are given as arguments. This occurs for both the C++ code and the official Python wrapper. For the current rust wrapper, it is simply infeasible to rectify this for all usage (though we did try to patch it up for some usage). So you must ensure that indices are valid in your code, even when calling functions that are not marked unsafe.

In addition, the upstream C++ library may throw exceptions, which are not always handled on the Rust side yet (since there are simply too many exceptions thrown, and currently every one of them must be handled manually). So for some of them, the Rust code will simply panic. If you encounter such problems, open an issue.

Due to the above problems, it is not recommended to use this library for user-facing programs. Using it internally in well-tested environments where every input is validated is probably OK.

Dependencies

~2–4MB
~62K SLoC