rust-playground
rust-playground copied to clipboard
Support wasm-pack backend
This PR aims to solve #374 , which is the backend service for it.
Change of code
- Add new
wasm-pack
POST method which request Rustcode
and response withwasm_js
,wasm_bg
etc. - New directory specific to
wasm-pack
- Add
cargo-pack
which leverage wasm-pack to build the wasm code - Add new
Dockerfile
for new channelrust-wasm-pack
- Add new
Cargo.toml
and dummysrc/lib.rs
for environment setting
Note
- Present supporting wasm library include the following
wasm-bindgen
web-sys
js-sys
wasm-bindgen-futures
yew
seed
- The above dependencies is defined in
compiler/wasm-pack/Cargo.toml
nottop-crates/crate-modifications.toml
, I am not sure which way is better. - I have to cite seed-playground here who greatly influence me.
Demo
rust-playground
https://user-images.githubusercontent.com/12388235/114809686-39eb7e80-9ddd-11eb-96fd-a8b9e221e147.mp4
mdBook
https://user-images.githubusercontent.com/12388235/114810242-3b697680-9dde-11eb-85f3-a6e746aaa0c1.mp4
Any news about this PR?
@shepmaster sorry for the ping but any chance this could be merged?
@lukechu10 and anyone interested in this feature could try my own hosting rust-playground
, and the repository is here.
Note that due to the limited budgets, I host it with the minimal resource (1 CPU and 1 G RAM). Hope that someone could try it and give me some feedback.
I will contine try to merge to original one.
Hey, are there any updates on this from this repo owners? Is there any help needed for getting this forward, or this is supposed to be will-not-merge kind of thing?
@YJDoc2, thank you for your interest. Obviously, the upstream is highly refactored after I submitted this PR. I will take care of the refactoring if exists any chance that could be merged into upsteam
@shepmaster sorry for pinging, but would this project be interested in merging this/equivalent PR? This would be a pretty interesting feature to have in the playground.
Hey @dtolnay @RalfJung sorry for the ping, but pinging you as you seem to also be one of the recent active contributors. It seems that @shepmaster might have missed the ping, or they might be busy with something else. Is there any chance of this getting merged after appropriate changes? Thank you!