Code Monkey home page Code Monkey logo

m4ri-rust's Introduction

Rust bindings for M4RI

M4RI is a C library that provides efficient implementations of binary matrix operations. This crate aims to expose those functions to Rust and provides a nice wrapper around matrices, vectors and operations on both.

References

Martin Albrecht and Gregory Bard. The M4RI Library. https://malb.bitbucket.io/m4ri

See also the references section of the M4RI docs here.

This was written in the context of:

Thom Wiggers. Solving LPN using Large Covering Codes. Master's Thesis Radboud University, 2018.

See also https://thomwiggers.nl/research/msc-thesis/

Optional features

  • serde: Enable serialization
  • M4RI options:
    • m4rm_mul: Use m4rm as multiplication algorithm
    • naive_mul: Use the naive strategy
    • strassen_mul: Use the Strassen algorithm

Windows support

You may currently experience issues trying to build this on Windows. Help would be welcome (See issue #6).

Releases

Releases are available with DOI:

DOI

m4ri-rust's People

Contributors

renovate-bot avatar thomwiggers avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

m4ri-rust's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

Implement missing inline functions

There are a lot of inline functions in mzd.h especially. Because those are not visible in the FFI of the module, we need to re-implement those in Rust.

build process depends on autoreconf

Hello there!
I have encountered an issue while trying to use this crate.
Adding the line m4ri-rust = "0.4.0" to Cargo.toml causes the build process to fail with this error:

    Updating crates.io index
   Compiling proc-macro2 v1.0.47
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.103
   Compiling thiserror v1.0.37
   Compiling libc v0.2.137
   Compiling ucd-trie v0.1.5
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling serde_derive v1.0.147
   Compiling serde v1.0.147
   Compiling ppv-lite86 v0.2.17
   Compiling m4ri-sys v0.3.3
   Compiling num-traits v0.2.15
error: failed to run custom build command for `m4ri-sys v0.3.3`

Caused by:
  process didn't exit successfully: `/tmp/m4ri-rust-test/target/debug/build/m4ri-sys-672ccd27306a35aa/build-script-build` (exit status: 101)
  --- stdout
  Making M4RI
  PWD: "/home/arian/.cargo/registry/src/github.com-1ecc6299db9ec823/m4ri-sys-0.3.3"
  OUT_DIR = "/tmp/m4ri-rust-test/target/debug/build/m4ri-sys-51a36dd4858866fa/out/m4ri"
  cargo:info=Building m4ri lib
  Configuring build!

  --- stderr
  thread 'main' panicked at 'Failed to execute autoreconf: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/arian/.cargo/registry/src/github.com-1ecc6299db9ec823/m4ri-sys-0.3.3/build.rs:37:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

The issue is reproducible by creating an empty new project using cargo init, adding the line to Cargo.toml and running cargo r. It was tested on Debian 11 and Fedora 36.

It can be fixed by manually installing the dh-autoreconf package using apt.
sudo apt install dh-autoreconf
Is this the intended way to use this crate?

Thanks in advance!

BitVec is annoying

It's hard to interface with BitVecs as they don't implement some quite elementary operations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.