trustfall icon indicating copy to clipboard operation
trustfall copied to clipboard

Feature request: ability to query own crates in the Web Playground

Open Walther opened this issue 1 year ago • 1 comments

First: the Trustfall Web Playground is incredibly cool - thank you for making it!

After looking at a couple of the provided example crates and making some example queries, it is a fairly logical step to think about running queries against your own codebase(s).

It would be really nice if it was possible to somehow load a local directory into the locally-running Playground instance for querying.

There are probably a bunch of different possible implementations, e.g.

  • Browser filesystem API, give permission to read a directory?
  • Telling people to run a cargo doc command and use a file upload dialog for the output?
  • Something else?

I think this could be a nice additional step for testing out Trustfall for new users, before "committing" to the effort of installing the tool(s) locally.

Walther avatar Oct 19 '23 19:10 Walther

Asking people to drag-and-drop the JSON output of a suitable cargo doc command (which we could give them to copy-paste) into the page and letting them query it should be totally doable. I'm not well-versed in frontend work but I'd love to get some help from someone more capable in that regard — very happy to mentor!

obi1kenobi avatar Oct 19 '23 19:10 obi1kenobi