Rust Datalog

Open-source Rust projects categorized as Datalog

Top 8 Rust Datalog Projects

  • cozo

    A transactional, relational-graph-vector database that uses Datalog for query. The hippocampus for AI!

  • Project mention: Transactional, relational-graph-vector database that uses Datalog for query | news.ycombinator.com | 2024-03-31
  • percival

    📝 Web-based, reactive Datalog notebooks for data analysis and visualization

  • Project mention: Learn Datalog Today | news.ycombinator.com | 2024-01-21

    Souffle and Cozo mentioned below already implement the whole of "traditional" datalog.

    Percival (https://github.com/ekzhang/percival) has some very nice examples showing how you can interactively write and test rules on top of a datalog interpreter.

    Bud (http://bloom-lang.net/bud/) is Hellerstein's proof of concept playground. It has bit-rotted in the past few years, but the examples are readable even if you can't easily get it working.

    The complexity can be quite good. You can syntactically determine when you've written linear recursion (equivalent to a for loop) vs not. Otherwise, the complexity is what you'd expect from incremental view maintenance in a normal SQL database. Which is to say O(n^k) with k being the number of relations joined, but usually much, much less with appropriate indexes and skew in the data. All the usual tricks concerning data normalization and indexes from databases apply.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • crepe

    Datalog compiler embedded in Rust as a procedural macro

  • Project mention: Datalog in 100 lines of JavaScript (2022) | news.ycombinator.com | 2024-01-22
  • ascent

    logic programming in Rust

  • Project mention: Datalog in 100 lines of JavaScript (2022) | news.ycombinator.com | 2024-01-22
  • modus

    A language for building Docker/OCI container images

  • treeedb

    Generate Soufflé Datalog types, relations, and facts that represent ASTs from a variety of programming languages.

  • Project mention: GDlog: A GPU-Accelerated Deductive Engine | news.ycombinator.com | 2023-12-03

    https://github.com/topics/datalog?l=rust ... Cozo, Crepe

    Crepe: https://github.com/ekzhang/crepe :

    > Crepe is a library that allows you to write declarative logic programs in Rust, with a Datalog-like syntax. It provides a procedural macro that generates efficient, safe code and interoperates seamlessly with Rust programs.

    Looks like there's not yet a Python grammar for the treeedb tree-sitter: https://github.com/langston-barrett/treeedb :

    > Generate Soufflé Datalog types, relations, and facts that represent ASTs from a variety of programming languages.

    Looks like roxi supports n3, which adds `=>` "implies" to the Turtle lightweight RDF representation: https://github.com/pbonte/roxi

    FWIW rdflib/owl-rl: https://owl-rl.readthedocs.io/en/latest/owlrl.html :

    > simple forward chaining rules are used to extend (recursively) the incoming graph with all triples that the rule sets permit (ie, the “deductive closure” of the graph is computed).

    ForwardChainingStore and BackwardChainingStore implementations w/ rdflib in Python: https://github.com/RDFLib/FuXi/issues/15

    Fast CUDA hashmaps

    Gdlog is built on CuCollections.

    GPU HashMap libs to benchmark: Warpcore, CuCollections,

    https://github.com/NVIDIA/cuCollections

    https://github.com/NVIDIA/cccl

    https://github.com/sleeepyjack/warpcore

    /? Rocm HashMap

    DeMoriarty/DOKsparse:

  • roxi

    Reactive Reasoning

  • Project mention: GDlog: A GPU-Accelerated Deductive Engine | news.ycombinator.com | 2023-12-03

    https://github.com/topics/datalog?l=rust ... Cozo, Crepe

    Crepe: https://github.com/ekzhang/crepe :

    > Crepe is a library that allows you to write declarative logic programs in Rust, with a Datalog-like syntax. It provides a procedural macro that generates efficient, safe code and interoperates seamlessly with Rust programs.

    Looks like there's not yet a Python grammar for the treeedb tree-sitter: https://github.com/langston-barrett/treeedb :

    > Generate Soufflé Datalog types, relations, and facts that represent ASTs from a variety of programming languages.

    Looks like roxi supports n3, which adds `=>` "implies" to the Turtle lightweight RDF representation: https://github.com/pbonte/roxi

    FWIW rdflib/owl-rl: https://owl-rl.readthedocs.io/en/latest/owlrl.html :

    > simple forward chaining rules are used to extend (recursively) the incoming graph with all triples that the rule sets permit (ie, the “deductive closure” of the graph is computed).

    ForwardChainingStore and BackwardChainingStore implementations w/ rdflib in Python: https://github.com/RDFLib/FuXi/issues/15

    Fast CUDA hashmaps

    Gdlog is built on CuCollections.

    GPU HashMap libs to benchmark: Warpcore, CuCollections,

    https://github.com/NVIDIA/cuCollections

    https://github.com/NVIDIA/cccl

    https://github.com/sleeepyjack/warpcore

    /? Rocm HashMap

    DeMoriarty/DOKsparse:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • road-trip-planner

    A national park road trip planner via Datalog

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2024-03-31.

Rust Datalog related posts

Index

What are some of the best open-source Datalog projects in Rust? This list will help you:

Project Stars
1 cozo 3,081
2 percival 571
3 crepe 442
4 ascent 367
5 modus 278
6 treeedb 47
7 roxi 33
8 road-trip-planner 2
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com