mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Consider alternative playpen backends for remote code execution

Open budziq opened this issue 7 years ago • 5 comments

Currently the support for https://play.rust-lang.org/ is hardcoded into book.js. We might be interested to support alternative ones like

Like:

  • https://play.integer32.com/ for rust
  • https://rust.godbolt.org/ - compiler explorer is not a playpen pe se but it's immensely useful. (Also for other languages)

Also take into consideration support for other languages:

  • https://play.golang.org/
  • https://code.sololearn.com/#cpp

See https://fiddles.io/ for extended list

budziq avatar Jun 23 '17 13:06 budziq

+1 for godbolt. I would like to present wandbox as common denominator here as well.

agauniyal avatar Sep 10 '17 12:09 agauniyal

There's an easy workaround here: mdbook init --theme

and edit book.js to point to your custom playpen/playground (Rust only, mind you)

CjS77 avatar Sep 18 '18 07:09 CjS77

I'm really interested in getting this feature going - Mdbook is great but it'd be nice if we could hook into other playground code editors (like purescript, haskell, etc). I don't mind trying to implement this myself, does anyone have any suggestions as a good starting point?

vanceism7 avatar Feb 24 '22 19:02 vanceism7

@vanceism7 Haskell folks have created a public API for executing code:

  • https://play.haskell.org
  • https://github.com/haskell/play-haskell#api

julianfortune avatar Apr 06 '23 19:04 julianfortune

Indeed, and we're also looking into integrating the Haskell playground into mdBook. :)

Kleidukos avatar Apr 16 '23 10:04 Kleidukos