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

Implement versioning for ink! playground

Open achimcc opened this issue 2 years ago • 0 comments

Currently, ink! Playground can interpret and compile only one specific version of ink!. To make the playground useful for tutorials and also to share code snippets in forums, we need to encode the ink! Version as part of the URL of the playground.

Gives a high-level overview on how to implement feature request #427

  • [x] Serve all usages of Cargo.toml and lib.rs of the sample ink! flipper contract by the reference contract in the crates folder. Replace the contract crate by a (sub-) crate which contains sample flipper contracts for all versions of ink!
  • [ ] Support compilation of multiple ink! versions. Two ways here to go: build multiple docker images with compilation cache for each ink! version or mount an external volume into the sysbox runtime which holds the shared compilation cache and which is populated in advance.
  • [ ] Allow the specification of the referenced ink! version as part of the URL, we should save this version in some React context state variable
  • [ ] Allow to manually specifiy the ink! version in the Frontend under settings.
  • [ ] The actix web backend url should receive the ink! version as part of a compilation request and should call the according docker command.
  • [ ] Build the serialized .json dependencies for each version of ink! to be used in Rust Analyzer
  • [ ] The frontend/Rust Analyzer should only lazy load the required serialized json ink! dependencies from the backend and feed them into Rust Analyzer

achimcc avatar Nov 08 '22 09:11 achimcc