rust-playground icon indicating copy to clipboard operation
rust-playground copied to clipboard

Support wasm-pack frontend

Open titaneric opened this issue 4 years ago • 0 comments

This PR aims to solve #374 , which is the frontend service for it.

Change of code

  • Add new Output/PaneWithWasmPack and Output/Container for rendering wasm result
  • Add performCompileToWasmPack function to request backend wasm-pack POST method
  • Add new reducers/output/wasmPack to perform state management

Note

  • This PR is built on top of #706

Demo

rust-playground

https://user-images.githubusercontent.com/12388235/114809686-39eb7e80-9ddd-11eb-96fd-a8b9e221e147.mp4

P.S.

I am newbie of React, every code in this PR is enough to perform the result but may not consider the convention of React or any performance issue. I DO think this implementation is more like prototype than production, feel free to point out any issues involved with code base and rewrite suitably.

titaneric avatar Apr 15 '21 03:04 titaneric