Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periph-play: create an interactive web ui to run adhoc programs #1

Open
maruel opened this issue May 29, 2021 · 0 comments
Open

periph-play: create an interactive web ui to run adhoc programs #1

maruel opened this issue May 29, 2021 · 0 comments

Comments

@maruel
Copy link
Member

maruel commented May 29, 2021

Similar in spirit to https://play.golang.org/ and BoneScript which is on BeagleBone's default image.

The rough idea looks like:

  • Create a template:
    package main
    import (
      "log"
      "periph.io/x/host/v3"
    )
    func main() {
      if _, err := host.Init(); err != nil {
        log.Fata(err)
      }
      {{.UserCode}}
    }
  • Inject the user's code in the template.
  • Run goimports -w, found at https://golang.org/x/tools/cmd/goimports
  • Send the formatted user code back to the Web UI.
  • Report errors. In this case, the formatted code should be sent back with highlighting.
  • Stream results back via websocket.
  • Expose a Stop button that sends SIGTERM to the process.
gsexton pushed a commit to gsexton/cmd that referenced this issue Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant