Stremio / stremio-seed-poc

stremio-core + stremio-web CSS + seed
3 stars 4 forks source link

Implement a WASM-friendly build/distribution system #3

Closed Ivshti closed 4 years ago

Ivshti commented 4 years ago

Is your feature request related to a problem? Please describe. Shipping WASM-based applications (specifically wasm-bindgen) has a few issues:

Describe the solution you'd like Implement a system that builds the app to a HTML/JS/CSS/WASM bundle with a single command, using the documentation at https://github.com/Stremio/stremio-web/issues/60, but also runs the wasm-opt step from the README at https://github.com/adexnetwork/adex-explorer

Describe alternatives you've considered Not sure if Webpack can help but because of it's complexity it should be avoided (it often takes us more time to figure out how to configure webpack than to write a script)

Additional context The stremio-web description of the build system should be used, except the "we should show a user friendly message prompting to refresh/restart/reinstall and contact support if it persist" and the ServiceWorker

MartinKavik commented 4 years ago

Simple build pipeline is implemented, see README.md for basic usage.


The most interesting command is cargo make bundle. How it works:


Let's get back to npm run less:compile. How it works:

Possible future work / ideas:

MartinKavik commented 4 years ago

Done.

FYI another interesting library for (not only) React which we can use as the inspiration for Rust CSS system - http://fela.js.org/

Ivshti commented 4 years ago

Great job on the pipeline!

A few comments:

MartinKavik commented 4 years ago

I: "Great job on the pipeline!"

Thanks!

I: "the WASM file is not version-scoped"

I'll fix it.

M: "I want to write a Rust library for Seed that abstracts out CSS" I: "TailwindCSS looks like it plays well with seed though"

I've done some research in the last days and I want to take inspiration from elm-ui, TailwindCSS, HSLuv, iced (and some more probably) for the library. I recommend to watch video about elm-ui (32min, you don't need to know Elm). The library will be a standalone crate and I want to rewrite kavik.cz, RealWorld example and maybe seed-rs.org into it to prove it works. I want to start working on it during next weeks. So I suggest to wait a little bit with the final CSS decision for this PoC because there will be more options in the near future.

Ivshti commented 4 years ago

I already did make it versioned, forgot to write here: https://github.com/Stremio/stremio-seed-poc/commit/c5916e84f0963480a757c7b6130b8dce96fa05f1

Thanks for the materials!

Re waiting: sure

MartinKavik commented 4 years ago

I already did

Nice!

waiting: sure

Closing the issue for now, I'll reopen it or create a new one for better CSS integration.