https://github.com/mllif/mllif-project
MLLIF is a MLIR based Language to Language Interoperability Flyover - with a goal to integrate API of all programming languages.
https://github.com/mllif/mllif-project
clang clang-frontend clang-plugin clangir interop interoperability llvm llvm-clang mlir
Last synced: 7 months ago
JSON representation
MLLIF is a MLIR based Language to Language Interoperability Flyover - with a goal to integrate API of all programming languages.
- Host: GitHub
- URL: https://github.com/mllif/mllif-project
- Owner: mllif
- License: apache-2.0
- Created: 2024-04-25T12:45:25.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T14:10:42.000Z (12 months ago)
- Last Synced: 2025-04-13T05:05:24.981Z (11 months ago)
- Topics: clang, clang-frontend, clang-plugin, clangir, interop, interoperability, llvm, llvm-clang, mlir
- Language: C++
- Homepage: http://mllif.sharp0802.com/
- Size: 964 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎉 Welcome to MLLIF!
***MLLIF*** is a MLIR-based Language-to-Language Interoperability Flyover -
with a goal to integrate API of all programming languages.
For details, See [docs](https://mllif.sharp0802.com)!
## 📈 Currently...
| | Frontend | Backend |
|:---:|:--------:|:-------:|
| C | ⚗️ | 📌 |
| C++ | ⚗️ | ⚗️ |
| C# | ⚗️ | ⚗️ |
- ✅ : Implemented, tested enough
- ⚗️ : Implemented, but in experimental state
- 🦺 : Working in progress
- 📌 : Planned
## 📦 Dependencies
| | Origin | Tested on |
|:--------------------:|:---------------------------------:|:----------------:|
| LLVM/Clang (ClangIR) | https://github.com/llvm/clangir | git (2025-01-18) |
| RapidXML | https://rapidxml.sourceforge.net/ | 1.13 |
* **Tested on *git*** means it tested with submodule or local-clone of master branch of it
## 🧐 Briefly, How does this work?
> [!WARNING]
> Currently, CMake script supports clang-based languages only
> because this method depends on `mllif-cir`.
> For details, See [docs](https://mllif.sharp0802.com).
You can use CMake function `add_mllif_library` in `cmake/UseMLLIF.cmake`:
```cmake
add_mllif_library( ...)
```
as:
```cmake
add_mllif_library(my-project CXX main.cxx foo.cxx)
```
> [!NOTE]
> language should be language identifier in CMake
It generates platform-dependent shared-object file with MSM file
(MLLIF-symbol-model; it's just XML :P).
Let's assume target created with this command uses language ***'A'***.
Bridge from host-language (***B***) to servant-language (***A***) involves from this MSM file.
Then, with FFI in each language, runtime of ***B*** calls bridge between ***A*** and ***B***.
And that bridge calls runtime of ***A*** (created shared-object).
By this approach, Each language can call each other in single process,
without any additional communication technics (such as TCP, Unix socket, shared memory, etc...).
For details, See [docs](https://mllif.sharp0802.com)!