Skip to content
Ramsey Nasser edited this page Oct 23, 2020 · 1 revision

MAGIC is a Clojure complier written in Clojure targeting the Common Language Runtime, also known as .NET. For historical and pragmatic reasons, the MAGIC project consists of a number of different repositories.

magic

https://github.com/nasser/magic

The main repository for the compiler itself. This includes the Clojure source code of all of MAGIC'S analysis, optimization, and code generation passes. It depends on the tools.analyzer and mage libraries, and includes the Magic.Runtime and Magic.IL2CPP libraries as subprojects.

This repository also includes a copy of the Clojure standard library with important patches that MAGIC depends on.

Magic.Runtime

https://github.com/nasser/magic/tree/master/Magic.Runtime

The C# implementation of runtime support data structures and functionality that MAGIC depends on. This includes method binders and dynamic dispatch. It is designed to target either legacy .NET Framework or .NET Standard. When targeting .NET Standard it has Lokad.ILPack as a dependency for on-disk emission.

Magic.IL2CPP

https://github.com/nasser/magic/tree/master/Magic.IL2CPP

A C# library and command line tool that provides post-processing functionality for binaries generated by MAGIC to conform to the limitations of Unity's IL2CPP backend.

tools.analyzer

https://github.com/clojure/tools.analyzer

MAGIC's own analyzer is based on tools.analyzer. MAGIC pulls this dependency directly from Maven.

mage

https://github.com/nasser/mage

MAGIC uses MAGE as its bytecode emission framework.

Clojure.Runtime

https://github.com/nasser/Clojure.Runtime

The C# implementation of the Clojure persistent data structures and runtime functionality. This project was forked from the original ClojureCLR, which included the original compiler.

Nostrand

https://github.com/nasser/nostrand

The stand-alone REPL for Clojure on the C# platform. Used to develop ClojureCLR libraries outside of Unity/Arcadia and bootstrap MAGIC itself. Historically designed for ClojureCLR and Mono, Nostrand now supports MAGIC and .NET Core.