realworldocaml / mdx

Execute code blocks inside your documentation
ISC License
269 stars 45 forks source link

Isolating Unix Dependency in mdx #383

Open SaySayo opened 2 years ago

SaySayo commented 2 years ago

Mdx has only one library at the moment which uses unix for some parts of its processes. We'd like to isolate the part of mdx that uses unix from the parts that don't. Essentially, what I'm suggesting is to have 2 libraries for mdx, one that contains unix and one that doesn't. I'm currently working on integrating ocaml notebooks into vscode and need to use mdx in executing the cell output but do not need to use the unix dependency as I won't be having access to the file system because I am compiling to javascript.

What would be helpful is to find a way of isolating the unix dependent part from the independent part and refactoring the code to suit our purposes. We could probably try figuring it out but it would be super helpful if you have any guidelines or suggestions for us to achieve this. Of course, that's if you have the time.

cc @tmattio