A unified build system for cross-compiling multiple languages.
Find a file
2026-06-02 20:04:24 -04:00
src some structure I guess 2026-06-02 20:04:24 -04:00
.gitignore Initial commit 2026-02-12 16:38:19 -06:00
Cargo.lock Initial commit 2026-02-12 16:38:19 -06:00
Cargo.toml some structure I guess 2026-06-02 20:04:24 -04:00
LICENSE.md some structure I guess 2026-06-02 20:04:24 -04:00
README.md Initial commit 2026-02-12 16:38:19 -06:00

amalgam

A unified build system for cross-compiling multiple languages. Also creates Foreign Function Interface (FFI) bindings using the C ABI automatically for cross-language functionality.

Intended Features

Phase 1

  • Compiler support for the following languages:
    • C/C++ (provided by gcc)
    • Rust
    • Scala Native
  • Automatic header / FFI creation between languages for exposed C ABI bindings
  • Unified build and dependency management across supported languages
    • Libraries built from source tree (i.e. git submodules)
      • Auto-build using supported build systems (GNU Make, CMake, Meson, Cargo, SBT)
    • Native C/C++ Libraries via pkgconfig
    • Rust libraries via Cargo crates
    • Scala Native libraries via Maven artifacts

Phase 2

  • Compiler support for the following languages:
    • C/C++ (additionally provided by musl, MSVC)
    • Go
    • Haskell (provided by ghc)
  • Intelligent header / FFI creation between languages
    • Unified data structure definition language with support for macros / code generation (i.e. Rust macros, Scala traits)
    • Automatic equivalence / conversion between language types (i.e. integers, strings, collections i.e. arrays/lists, optional/result types)
  • Unified build and dependency management across supported languages
    • Libraries built from source tree (i.e. git submodules)
      • Auto-build using supported build systems (Visual Studio, Go, Cabal, Stack)
    • Go packages
    • Haskell packages via Hackage

Phase 3 (if I feel like it)

  • Optimizations and improvements to existing codegen
  • Dynamic library compile target
    • Projects can be compiled as a dynamic library for use elsewhere
    • Bindings can be included for the following languages:
      • C/C++ (headers)
      • Lua
      • Python
      • Java/Scala/Kotlin (using JNI)
      • Other languages...
  • Intelligent native binding creation between languages
    • Add another layer between the FFI and the language that translates function call/results into functions that are more idiomatic for the target language
  • Automatic memory safety checks for languages with less memory safety, mainly across FFI bindings