We want to integrate Popcorn with ExDoc via extensions: https://hexdocs.pm/ex_doc/readme.html#extensions.
For end user, the process should be as easy as we can do it. We should detect code.popcorn-eval codeblocks and add interactive elements. Popcorn can contain sample module for evaluating code – we could use it in the langtour too. The extend of interactivity is to show result, stdout. We don't need to allow editing codeblocks (which, in the future, could allow us to preprocess snippets and compile them instead of interpreting).
Areas to research:
- we need CORS/COEP headers which may need Hex/ExDoc changes (we should check if building AtomVM without SMP can remove this limitation).
- we need wasm loading – we should check if we need additional plugin code to be executed in ExDoc or if it can just load from package using CDN.
We want to integrate Popcorn with ExDoc via extensions: https://hexdocs.pm/ex_doc/readme.html#extensions.
For end user, the process should be as easy as we can do it. We should detect
code.popcorn-evalcodeblocks and add interactive elements. Popcorn can contain sample module for evaluating code – we could use it in the langtour too. The extend of interactivity is to show result, stdout. We don't need to allow editing codeblocks (which, in the future, could allow us to preprocess snippets and compile them instead of interpreting).Areas to research: