Inspiration

Scala Native and Dotty(Scala3)

What it does

Compiles Scala code to native binary, using LLVM backend.

How we built it

Via Codex (a.k.a GPT) coding agent. We have given the basis instructions to create an implementation plan, which told the agent to update the implementation plan relatively as it continued, by the questions; "what it does?/why it does?/why did i?/what's next?".

Challenges we ran into

While the original Scala Native compiler is written in JVM Scala and uses the available Dotty AST, Typechecker, Parser, Lexer, TASTy. This compiler is being written completely from scratch, which makes the future of the project remain unforeseen. It is, also, still a contentious problem if the AI agent will be successful to move on with this huge project base.

Accomplishments that we're proud of

Even though most of the language features remain unimplemented(generics, given/implicits), the compiler's pipeline is shaped well, and is able to compile and optimize.

What we learned

We learned how Parser and Lexer works, why Scala uses TASTy and how LLVM is being processed.

What's next for Scala Native Compiler in C++

Next phases for Scala Native Compiler in C++ is creating a real typechecking layout based on the standarts of Scala, and then, extending the optimizer based on a garbage collector, designed specifically for Scala's standarts.

Built With

Share this project:

Updates