- Create a basic parser.
Use a library like pest or peg to achieve this.
- Learn how to use Cranelift.
A great way to learn is to look at their jit demo and check out how they did it.
- Implement your own.
Using a lot of match
cases and enums, create your own compiler to turn functions into machine code.