Compiles an OCaml program to a standalone ANSI C file. Here's a spinny cube program running on a calculator. Its OCaml source is here.
- ✅ Garbage collector
- ✅ Random selections of the stdlib
- ❌ Floats
- ❌ Exceptions
- ❌ Objects
First install OCaml through opam. Then use opam to install the deps for this repo.
To build an OCaml program for pc:
git clone https://github.com/nathanfarlow/c-of-ocaml
cd c-of-ocaml
dune build example
cat _build/default/example/main.c
To build for ti 84 ce:
- Set up the ti 84 ce toolchain
git clone https://github.com/nathanfarlow/c-of-ocaml
cd c-of-ocaml
dune build calc/hello_world
- Copy
_build/default/calc/hello_world/CAMLHI.8xp
to calculator