rwf2 / Rocket

A web framework for Rust.
https://rocket.rs
Other
24.49k stars 1.57k forks source link

Allow "expanding" and "running" code examples in guide. #1274

Open zohaad opened 4 years ago

zohaad commented 4 years ago

Suggestion: make code examples on rocket.rs compilable like in the "expandable view" for the rust book code examples.

jebrosen commented 4 years ago

This needs a bit more thought before anything could be implemented. There are a few major differences from the rust book:

The need to duplicate and/or extend functionality from the playground looks like the biggest issue: it's significantly more difficult to maintain than rocket.rs is, unless there are existing code playpens besides play.rust-lang.org that we could integrate somehow.

chinoto commented 2 years ago

It would probably be too demanding, but I wonder if something in browser could be accomplished like WordPress is doing. Supposedly miri would be easier to compile to wasm that rustc: https://github.com/rust-lang/miri/issues/722