Google CP-SAT solver Rust bindings

Overview

Google CP-SAT solver Rust bindings

Rust bindings to the Google CP-SAT constraint programming solver.

To use this library, you need a C++ compiler and an installation of google or-tools library files.

The environment variable ORTOOLS_PREFIX is used to find include files and library files. If not setted, /opt/ortools will be added to the search path (classical search path will also be used).

You might also like...
Multilingual implementation of RAKE algorithm for Rust

RAKE.rs The library provides a multilingual implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm for Rust. How to Use Append rake to

A Rust library for generically joining iterables with a separator

joinery A Rust library for generically joining iterables with a separator. Provides the tragically missing string join functionality to rust. extern c

Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance calculations and string search.

triple_accel Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance cal

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)

rust-bert Rust native Transformer-based models implementation. Port of Hugging Face's Transformers library, using the tch-rs crate and pre-processing

ЁЯСД The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike
ЁЯСД The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike

Table of Contents What does this library do? Why does this library exist? Which languages are supported? How good is it? Why is it better than other l

Snips NLU rust implementation

Snips NLU Rust Installation Add it to your Cargo.toml: [dependencies] snips-nlu-lib = { git = "https://github.com/snipsco/snips-nlu-rs", branch = "mas

A fast, low-resource Natural Language Processing and Text Correction library written in Rust.

nlprule A fast, low-resource Natural Language Processing and Error Correction library written in Rust. nlprule implements a rule- and lookup-based app

A fast implementation of Aho-Corasick in Rust.

aho-corasick A library for finding occurrences of many patterns at once with SIMD acceleration in some cases. This library provides multiple pattern s

Natural Language Processing for Rust

rs-natural Natural language processing library written in Rust. Still very much a work in progress. Basically an experiment, but hey maybe something c

Comments
  • Unable to compile the doc tutorial

    Unable to compile the doc tutorial

    Hi, I'm unable to compile the tutorial from the docs.rs page. I boiled it down to the first line of code.

    fn main() {
        let mut model = CpModelBuilder::default();
    }
    

    The compilation fails with the following compiler-message:

    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "/tmp/rustc0HD3jZ/symbols.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.0.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.1.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.2.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.3.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.4.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.5.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.cp_sat_test.796bff4f-cgu.6.rcgu.o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591.3kovovwyrqc5us51.rcgu.o" "-Wl,--as-needed" "-L" "/home/moostropfen/repos/cp_sat_test/target/release/deps" "-L" "/home/moostropfen/repos/cp_sat_test/target/release/build/cp_sat-f3fc18ec20b15bd6/out" "-L" "/usr/include/ortools/lib" "-L" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/moostropfen/repos/cp_sat_test/target/release/deps/libcp_sat-e9130974727f5382.rlib" "/home/moostropfen/repos/cp_sat_test/target/release/deps/libprost-ec421cb9c57c324e.rlib" "/home/moostropfen/repos/cp_sat_test/target/release/deps/libbytes-041203b2d8753cce.rlib" "/home/moostropfen/repos/cp_sat_test/target/release/deps/liblibc-458b67f93e226fac.rlib" "/home/moostropfen/repos/cp_sat_test/target/release/deps/libsmallvec-5ff24209a016f56a.rlib" "-Wl,--start-group" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5670385a2fe8b60b.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-fd56ba6dbf7aaecc.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-b8acf8e5c2e85baa.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1706edefffdca0a2.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-f483302e0b13708e.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-725b0718fc18e1ed.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-de685fcf2157e6fb.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-f613ac3eda05b9ff.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-3de98a7d049af6a1.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c12183655bdce152.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-0fc7beea925de7e3.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8c34825485bf59dc.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-ba5f7e926e729d81.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-643de0950163a839.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-539ea2f72ef89687.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-871432094bb4c885.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-ef1a8ee61f2e39bf.rlib" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f1646747442c1c7b.rlib" "-Wl,--end-group" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ff283b4bf550fa1c.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lortools" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/moostropfen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/moostropfen/repos/cp_sat_test/target/release/deps/cp_sat_test-4218de00e7218591" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
      = note: /usr/bin/ld: /home/moostropfen/repos/cp_sat_test/target/release/deps/libcp_sat-e9130974727f5382.rlib(cp_sat_wrapper.o): undefined reference to symbol '_ZNK6google8protobuf11MessageLite16SerializeToArrayEPvi'
              /usr/bin/ld: /usr/lib/libprotobuf.so.32: error adding symbols: DSO missing from command line
              collect2: error: ld returned 1 exit status
              
      = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
      = note: use the `-l` flag to specify native libraries to link
      = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
    
    warning: `cp_sat_test` (bin "cp_sat_test") generated 3 warnings
    error: could not compile `cp_sat_test` due to previous error; 3 warnings emitted
    

    My ORTOOLS_PREFIX variable is not defined. I run Archlinux and installed or-tools with paru from the following AUR repository. My Cargo.toml includes cp-sat as a git dependency. Using version 0.3.3 from crates.io does not fix the problem.

    opened by WhatDothLife 2
  • Add interval constraint in the builder, and related constraints

    Add interval constraint in the builder, and related constraints

    We should wait for v10 of or-tools before doing this, as the interface will change.

    see https://github.com/google/or-tools/issues/1024#issuecomment-916340935

    enhancement 
    opened by TeXitoi 0
Owner
Kardinal
Kardinal
Simple NLP in Rust with Python bindings

vtext NLP in Rust with Python bindings This package aims to provide a high performance toolkit for ingesting textual data for machine learning applica

Roman Yurchak 133 Jan 3, 2023
A crate using DeepSpeech bindings to convert mic audio from speech to text

DS-TRANSCRIBER Need an Offline Speech To Text converter? Records your mic, and returns a String containing what was said. Features Begins transcriptio

null 32 Oct 8, 2022
A lightning-fast Sanskrit toolkit. For Python bindings, see `vidyut-py`.

Vidyut рдорд╛ рднреВрджреЗрд╡рдВ рдХреНрд╖рдгрдордкрд┐ рдЪ рддреЗ рд╡рд┐рджреНрдпреБрддрд╛ рд╡рд┐рдкреНрд░рдпреЛрдЧрдГ рее Vidyut is a lightning-fast toolkit for processing Sanskrit text. Vidyut aims to provide standard co

Ambuda 14 Dec 30, 2022
Rust-nlp is a library to use Natural Language Processing algorithm with RUST

nlp Rust-nlp Implemented algorithm Distance Levenshtein (Explanation) Jaro / Jaro-Winkler (Explanation) Phonetics Soundex (Explanation) Metaphone (Exp

Simon Paitrault 34 Dec 20, 2022
Fast suffix arrays for Rust (with Unicode support).

suffix Fast linear time & space suffix arrays for Rust. Supports Unicode! Dual-licensed under MIT or the UNLICENSE. Documentation https://docs.rs/suff

Andrew Gallant 207 Dec 26, 2022
Elastic tabstops for Rust.

tabwriter is a crate that implements elastic tabstops. It provides both a library for wrapping Rust Writers and a small program that exposes the same

Andrew Gallant 212 Dec 16, 2022
An efficient and powerful Rust library for word wrapping text.

Textwrap Textwrap is a library for wrapping and indenting text. It is most often used by command-line programs to format dynamic output nicely so it l

Martin Geisler 322 Dec 26, 2022
тПо тПп тПн A Rust library to easily read forwards, backwards or randomly through the lines of huge files.

EasyReader The main goal of this library is to allow long navigations through the lines of large files, freely moving forwards and backwards or gettin

Michele Federici 81 Dec 6, 2022
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

regex A Rust library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a f

The Rust Programming Language 2.6k Jan 8, 2023
Natural language detection library for Rust. Try demo online: https://www.greyblake.com/whatlang/

Whatlang Natural language detection for Rust with focus on simplicity and performance. Content Features Get started Documentation Supported languages

Sergey Potapov 805 Dec 28, 2022