Skip to content

Polyglat is cross-language integration system - with a goal that producing bindings across languages.

License

Notifications You must be signed in to change notification settings

mllif/mllif-project

Repository files navigation

🎉 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!

📦 Dependencies

Origin Tested on
LLVM/Clang (ClangIR) https://github.com/llvm/clangir 20.0

🧐 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.

You can use CMake function add_mllif_library in cmake/UseMLLIF.cmake:

add_mllif_library(<target> <language> <sources>...)

as:

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!