Skip to content

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

@maruel

Description

@maruel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions