I want to start the crystal repl in a project. I am trying to require all the file but I am getting stuck with markd
. It seems like you should just be able to require "compiler/crystal/interpreter/repl"
.
This may be related to the issue you’re running into - I’ve run into similar trying to use the compiler or parts of it in a project
Even if you fix those issues there are some missing api in the repl if you want to use it as a library.
I have an initial tool that wrap the repl (without the vendored libraries since it’s outside the compiler) and publish it as an http server via a socket.
If something like this sounds useful to you I am happy to share what I have up to now.
For the curious the repl http server can be found at GitHub - bcardiff/crystal-repl-server .
This is very very early. At this stage don’t expect stability But you can see the vendor less requires and the monkey patch to use the repl / interpreter in a more library fashion.
Thanks I will have to check this out.