Hey! For some time, I have been trying to implement at the very least some small portion of OCaml - interpreter into a .3dsx app.
So far I have only succeeded in building very primitive apps that do not even use OCaml (eg. from the devtoolsPro, just messing with the demos).
My goal is that the user can type some string, which will be sent to be evaluated by OCaml and it's output printed using printf. OCaml does not have to be the latest, flashiest version (in fact, as of now, the version 5 is not going to be compatible, as it is only for 64 bit systems, 3DS is a 32 bit).
I can use both linux and windows compilers, but so far I have not been successful with compiling the runtime.
I think the closest I've gotten to making it work is running this code (will run in shell as a .sh file):
Unfortunately, this does not compile. It might be possible if I were to rewrite most of the code (eg. rewriting the headers/used functions so they use native 3DS library) but that seemed like too much for a "fun" project.
If this code were to compile, it would generate some libraries, which I could link to the existing 3DS code and be happy.
So far I have only succeeded in building very primitive apps that do not even use OCaml (eg. from the devtoolsPro, just messing with the demos).
My goal is that the user can type some string, which will be sent to be evaluated by OCaml and it's output printed using printf. OCaml does not have to be the latest, flashiest version (in fact, as of now, the version 5 is not going to be compatible, as it is only for 64 bit systems, 3DS is a 32 bit).
I can use both linux and windows compilers, but so far I have not been successful with compiling the runtime.
I think the closest I've gotten to making it work is running this code (will run in shell as a .sh file):
export HOST=arm-none-eabi
export TARGET=arm-none-eabi
export PATH=/mnt/c/devkitPro/devkitARM/bin:$PATH
wget # github link to ocaml - 4.14.0.tar.gz
tar xzf 4.14.0.tar.gz
cd ocaml-4.14.0
./configure --host=$HOST --target=$TARGET
make world
make install
export TARGET=arm-none-eabi
export PATH=/mnt/c/devkitPro/devkitARM/bin:$PATH
wget # github link to ocaml - 4.14.0.tar.gz
tar xzf 4.14.0.tar.gz
cd ocaml-4.14.0
./configure --host=$HOST --target=$TARGET
make world
make install
If this code were to compile, it would generate some libraries, which I could link to the existing 3DS code and be happy.
Last edited by Ventuaer,






