rust-lang / rust-lang/rust-playground

Easily embed interactive code snippets

Open
#199 3 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted question
Dominant language
Rust
Stars
1.4k
Forks
268
Avg merge
3h 2m
Merged PRs (30d)
6

Description

The Rust book and other guides use the playground to execute code snippets and display the results inline. This is an awesome way to increase interactivity, especially when the examples are editable as seen in the Rust by Example book.

With some work it is possible to mimic this effect by yourself, but it would be great if there is an easy way to repeatedly include interactive Rust snippets in a website, blog post or HTML presentation.

I was thinking of an embed button that offers a copyable snippet of code, just like the Travis CI aid for embedding the build badge. A corresponding wiki page could provide instructions how to set things up.

Is this something that people are interested in?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing the requested embed-button workflow and the linked Rust Book, Rust by Example, and Travis CI examples. Define the integration and setup instructions before implementation; done would mean a documented, repeatable way to embed editable Rust snippets and display their results.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.