#graph #partitioning #matrix #mesh #order

sys metis-sys

Raw FFI to METIS, the serial graph partitioner and fill-reducing matrix orderer

7 releases

0.3.2 Oct 28, 2024
0.3.1 Mar 10, 2024
0.2.1 Jul 24, 2023
0.2.0 Jun 12, 2023
0.1.1 Jul 2, 2021

#1640 in Math

Download history 805/week @ 2024-08-23 1100/week @ 2024-08-30 965/week @ 2024-09-06 1035/week @ 2024-09-13 1639/week @ 2024-09-20 2122/week @ 2024-09-27 2074/week @ 2024-10-04 1257/week @ 2024-10-11 938/week @ 2024-10-18 1127/week @ 2024-10-25 1062/week @ 2024-11-01 1101/week @ 2024-11-08 896/week @ 2024-11-15 871/week @ 2024-11-22 1724/week @ 2024-11-29 1463/week @ 2024-12-06

5,056 downloads per month
Used in 4 crates (via metis)

MIT/Apache

5MB
39K SLoC

C 31K SLoC // 0.2% comments GLSL 7.5K SLoC Rust 441 SLoC // 0.0% comments Perl 36 SLoC // 0.1% comments Shell 28 SLoC // 0.1% comments Batch 8 SLoC

metis-rs

metis-rs is a Rust library providing idiomatic bindings to libmetis, a library for graph and mesh partitioning. It is made to be used with Rust version 1.67.0 or above.

Getting Started

Library released on crates.io. To use it, add the following to your Cargo.toml:

[dependencies]
metis = "0.2"

The list of available versions and a change log are available in the CHANGELOG.md file.

Features

Use of Vendored Feature

The vendored feature enables metis-rs to build METIS from source and link to it statically. If not enabled, metis-rs looks for an existing installation and links to it dynamically.

Use of System-wide Feature

The use-system feature enables metis-rs to use the system-wide installation of METIS. If not enabled, metis-rs will refer to its own version of METIS.

Please note, vendored and use-system features are mutually exclusive.

Guidance for non-standard METIS installations

If you enabled the use-system feature and METIS is installed in a non-standard location, you must set the following environment variables:

export METISDIR=path/to/your/metis/installation
export CPATH="$METISDIR/include"
export RUSTFLAGS="-L$METISDIR/lib"

$METISDIR must point to a directory containing both lib/ and include/ directories with METIS's shared libraries and headers, respectively.

Building the documentation

To build the documentation, especially if METIS is installed in a non-standard location, set the RUSTDOCFLAGS environment variable:

export RUSTDOCFLAGS="-L$METISDIR/lib"

Then the following command will generate and open the documentation:

cargo doc --no-deps --open

License

[!IMPORTANT] Our licensing policy applies only to the rust crate metis-rs, not the original METIS library.

For information about METIS' licensing policy, refer to the original library's repository.

metis-rs is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Refer to LICENSE-APACHE and LICENSE-MIT for more details.

Note on the vendored feature

metis-rs comes with its vendored feature enabled by default. With this feature enabled, the original METIS code is compiled and is installed along metis-rs. Please note that METIS code is always under Apache-2 license.

No runtime deps