Bindings to MLIR using the full C++ API

Overview

Mithril Oxide

Mithril MLIR is hard to rust but we did it anyway.

Rust bindings to MLIR via the C++ API.

Project structure

  • mithril-oxide: Our Rusty bindings.
  • mithril-oxide-sys: Raw unsafe bindings to the C++ API.
  • mithril-oxide-sys-codegen: Automated binding generation (actual type checking and code generation).
  • mithril-oxide-sys-proc: Automated binding generation (via proc macros).

Note: The actual code generation needs to be a separate process because Clang's LLVM would otherwise collide with Rust's LLVM making the compiler crash.

Compilation instructions

There'll have to be some environment variables set; in particular:

# Path to llvm with MLIR.
export MLIR_SYS_160_PREFIX=/usr/lib/llvm-16

# To execute, the library loader will need to find `libLLVM.so` and `libMLIR.so`.
export LD_LIBRARY_PATH=/usr/lib/llvm-16/lib

The commands to build the project are as follow:

# The code generation binary must be available to build the project.
cargo build -p mithril-oxide-sys-codegen

# Build the project.
cargo build

# Run an example (or not).
cargo run --example hello

Stuff to do

  • Design the Rusty API.

  • Remove hardcoded paths.

  • Improve development experience.

  • Proper error handling for the code generation.

  • Autodetect Clone, Copy and Pin requirements.

  • Implement Debug for the generated types.

You might also like...
Python bindings for rage (age in Rust)

pyrage Python bindings for the Rust implementation of age. Index Installation Usage Development Licensing Installation You can install pyrage with pip

OpenAI's tiktoken but with node bindings

⏳ tiktoken-node tiktoken is a fast BPE tokeniser for use with OpenAI's models. const tiktoken = require('tiktoken-node') let enc = tiktoken.getEncodin

Rust bindings for Solidity's AST and visitors

solc-ast solc-ast provides rust bindings for the solidity AST and visitors. The visitors were built to be 1-1 compatible with the visitors from solc.

A node API for the dprint TypeScript and JavaScript code formatter

dprint-node A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed. Usage Pass a file path an

binance API client

bian-rs 币安API Rust async SDK 完成情况 接口 现货 U本位合约 币本位合约 欧式期权 http 🚧 开发中 🆗 🚧 开发中 未开始 websocket 🚧 开发中 🆗 🚧 开发中 未开始 使用 在 Cargo.toml 中添加依赖 [dependencies]

Rust API guidelines

Rust API guidelines This is a set of recommendations on how to design and present APIs for the Rust programming language. They are authored largely by

Rust NACL Wrapper API

Rust NACL Wrapper API NaCl (pronounced "salt") is a new easy-to-use high-speed software library for network communication, encryption, decryption, sig

Rest API to check if a password is in a data breach

easypwned (haveibeenpwned / HIBP) Rest API to check if a password is in a data breach. Works offline - everything stays on your machine! Database is i

OGC API & STAC - Proof of Concept

OAPI - POC Proof of concept (POC) to ingest geospatial datasets from MeteoSuisse into a SpatioTemporal Asset Catalog (STAC), expose as OGC API Feature

Owner
Lambdaclass
A venture studio and a engineering powerhouse at the same time
Lambdaclass
Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

DappForce 74 Nov 24, 2022
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend 👁️🦀

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

The Witnet Project 155 Nov 21, 2022
Parser and test runner for testing compatable common Ethereum full node tests against Polygon Zero's EVM.

EVM Test Parses and runs compatible common Ethereum tests from ethereum/tests against Polygon Zero's EVM. Note: This repo is currently very early in d

Mir Protocol 3 Nov 4, 2022
An EVM low-level language that gives full control over the control flow of the smart contract.

Meplang - An EVM low-level language Meplang is a low-level programming language that produces EVM bytecode. It is designed for developers who need ful

MEP 19 Jan 31, 2023
Bindings for the etherscan API and other block explorers.

foundry-block-explorers Bindings for the etherscan.io web API and other block explorers. Examples use ethers_core::types::Chain; use foundry_block_exp

Foundry 7 Nov 3, 2023
Sodium Oxide: Fast cryptographic library for Rust (bindings to libsodium)

sodiumoxide |Crate|Documentation|Gitter| |:---:|:-----------:|:--------:|:-----:|:------:|:----:| |||| NaCl (pronounced "salt") is a new easy-to-use h

sodiumoxide 642 Dec 17, 2022
rust-native-tls — Bindings for native TLS libraries

rust-native-tls Documentation An abstraction over platform-specific TLS implementations. Specifically, this crate uses SChannel on Windows (via the sc

Steven Fackler 371 Jan 8, 2023
OpenSSL bindings for Rust

rust-openssl OpenSSL bindings for the Rust programming language. Documentation. Release Support The current supported release of openssl is 0.10 and o

Steven Fackler 1k Jan 7, 2023
Bindings to the macOS Security.framework

macOS/iOS Security framework for Rust Documentation Bindings to the Apple's Security.framework. Allows use of TLS and Keychain from Rust. License Lice

Kornel 172 Dec 24, 2022
Rust FFI bindings for StarkWare's crypto-cpp library

starkware-crypto-rs Rust FFI bindings for StarkWare's crypto-cpp library Note that currently target x86_64-pc-windows-msvc is not supported. If you're

Jonathan LEI 11 Aug 22, 2022