Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact usecase: requirements for rewriting artifact's web-ui from elm to rust #103

Closed
vitiral opened this issue Jan 12, 2018 · 3 comments

Comments

@vitiral
Copy link
Contributor

vitiral commented Jan 12, 2018

I make the artifact application, which uses Elm as the frontend. I'm currently doing a redesign+rewrite of pretty much the whole library, of which there are 4 stages. I have completed the first stage, and rewriting the web-ui will be the final stage (so a rewrite is a little ways off)

I was wondering if yew could meet my use case. Artifact feels like it would be a good candidate for a "real world implementation" as it is tiny, and almost 100% elm.

Okay, so here are my use cases:

  • Static Site Generation: artifact currently "compiles" the web-app as both a static site and a single-page-server-backed application. (hack ahead: it then injects the user's artifacts as json by replacing the "ARTIFACTS_HERE" string in the static-binary 🤕 ). Static site generation is basically a necessary requirement -- although I think I could maintain both the elm-ui AND the yew-ui for a period of time (using elm for static site generation only).
  • Embedding C and/or javascript: I'm not sure what the webassembly story here is, but I assume yew can call out to javascript and use the result. In particular, I need libraries for markdown and graphviz rendering. That's about it. (note: graphviz is written in C, so being able to compile it into webassembly and use FFI bindings would be absolutely awesome if that were possible).
  • Near feature compatibility with Elm: I use a lot of the "elm architecture" for my application, it would be nice to have a 1to1 corespondence as much as possible to make migrating easier.

Thanks! This library is super exciting to me -- keep it up!

@koute
Copy link
Contributor

koute commented Jan 12, 2018

Static Site Generation

Although I don't know what your exact requirements are this will be supported by the cargo-web in the near future, so once that happens you'll be able to to compile yew-using apps into an easily deployable package.

Embedding C and/or javascript

You can easily call out to the JavaScript using stdweb. As for calling out into C, well, you'd probably need to do it through Emscripten somehow.

@vitiral
Copy link
Contributor Author

vitiral commented Jan 12, 2018

I forgot to state another benefit of artifact+yew -- artifact's backend/etc is already written in rust!

| Although I don't know what your exact requirements are

I just need to be able to:

  • compile a static binary (that can be served from something that "just serves an index.html")
  • be able to inject data into that binary somehow. What would be best is if there were some way that the library expected "I can find what I need to be in CWD/data.json".

Cool, the graphviz library I currently use is just a hacked javascript project compiled from C -- so feature parity is perfect to get started.

Thanks for the input. I look forward to "rewriting it in rust"!

@vitiral vitiral closed this as completed Jan 12, 2018
@vitiral
Copy link
Contributor Author

vitiral commented Jan 12, 2018

(Feel free to reopen if you find these usecases useful to keep on the tracker, buf I consider the questions resolved).

teymour-aldridge referenced this issue in teymour-aldridge/yew Jul 8, 2020
* Added period to description

* Fixed the spelling of " Arguabley" to "Arguably"

* Update README.md

* Added period to description

* Added period to description

* Grammar and spelling correction

added period to description, fixed spelling of "encouter" to "encounter"

* Added period to description

* Added period to description

* Grammar and spelling

Added period to description, fixed spelling of "accross" to "across"

* Added period to description

* Added period to description

* Fixed spelling of "aggresive" to "aggressive"

* Removed period from description

* Update optimizations.md

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
jstarry added a commit to jstarry/yew that referenced this issue Jul 10, 2020
* Added period to description

* Fixed the spelling of " Arguabley" to "Arguably"

* Update README.md

* Added period to description

* Added period to description

* Grammar and spelling correction

added period to description, fixed spelling of "encouter" to "encounter"

* Added period to description

* Added period to description

* Grammar and spelling

Added period to description, fixed spelling of "accross" to "across"

* Added period to description

* Added period to description

* Fixed spelling of "aggresive" to "aggressive"

* Removed period from description

* Update optimizations.md

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
jstarry added a commit that referenced this issue Jul 10, 2020
* GitBook: [master] 2 pages modified

* Added code examples for the router docs. (#67)

* GitBook: [master] 3 pages modified

* GitBook: [master] one page modified

* Update the sample doc app to use wasm-pack (#75)

* Update the sample doc app to use wasm-pack

According to the rest of the documentation, wasm-pack and web-sys are
the recommended tool to use. However, the sample app documents the usage
of cargo-web and stdweb.

The command lines are taken from the example folder of yew.

* Some grammar fixes

* Use cargo miniserve instead of python to server the files

* Add wasm-bindgen dependency

* Fixed bad link to build script for wasm-bindgen/cargo-web (#81)

* Fixed bad link to build script for wasm-bindgen/cargo-web

* yewstack/docs#81 Updated link for cargo-web

* Update miniserve cargo install command (#88)

* create as lib right away (#93)

* updated (#92)

* GitBook: [master] 29 pages modified

* update the docs to specify that local agents do not incur serialization overhead (#89)

* Add a note telling how to bypass the recursion limit of the html! macro. (#94)

* Add a note telling how to bypass the recursion limit of the html! macro.

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Justin Starry <[email protected]>

* Add latest Stack Overflow survey results (#95)

* Mention prop_or macro (#97)

* Mention prop_or macro

* Fix the prop_or vs prop_or_else mixup

* Update src/concepts/components/properties.md

Co-authored-by: Justin Starry <[email protected]>

* Fix a typo. (#102)

* Point to master branch for examples (#98)

* Point to master branch for examples

* Update src/getting-started/examples.md

Co-authored-by: Teymour Aldridge <[email protected]>

* Apply suggestions from code review

Co-authored-by: Teymour Aldridge <[email protected]>

* Update src/getting-started/examples.md

Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Justin Starry <[email protected]>

* Add code of conduct to documentation as well. (#104)

* Added "" for the version at line 25 (#107)

* Added "" for the version at line 25

* Update src/getting-started/starter-templates.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>

* Removed periods and fixed spelling mistakes (#103)

* Added period to description

* Fixed the spelling of " Arguabley" to "Arguably"

* Update README.md

* Added period to description

* Added period to description

* Grammar and spelling correction

added period to description, fixed spelling of "encouter" to "encounter"

* Added period to description

* Added period to description

* Grammar and spelling

Added period to description, fixed spelling of "accross" to "across"

* Added period to description

* Added period to description

* Fixed spelling of "aggresive" to "aggressive"

* Removed period from description

* Update optimizations.md

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>

* Shorten line lengths. (#106)

* Shortens line lengths (to ~100 characters max per line).
 * A few stylistic improvements
 * Corrects a couple of typos
 * Fixes a few grammar errors

Co-authored-by: Justin Starry <[email protected]>

* bumping up the yew version in Cargo.toml (#107) (#109)

* bumping up the yew version in Cargo.toml (#107)

* bumping up the yew version for stdweb

* bumping up the yew version of ConsoleService link

* bumping up the yew version

* Update src/more/debugging.md

Co-authored-by: Justin Starry <[email protected]>

* Add #[derive(Clone)] in examples (#111)

* Add #[derive(Clone)] in examples

Closes #110

* Add backticks to rust elements

Co-authored-by: Teymour Aldridge <[email protected]>

* Another backtics

Co-authored-by: Teymour Aldridge <[email protected]>

* Fix typo (#112)

* GitBook: [master] 29 pages modified

* Fix spellcheck

* Remove duplicate code of conduct

Co-authored-by: Teymour Aldridge <[email protected]>
Co-authored-by: Franck Royer <[email protected]>
Co-authored-by: Eamon Caton <[email protected]>
Co-authored-by: David Poggi <[email protected]>
Co-authored-by: Stephan Dilly <[email protected]>
Co-authored-by: 洪慈吟 <[email protected]>
Co-authored-by: Michal Kawalec <[email protected]>
Co-authored-by: codec-abc <[email protected]>
Co-authored-by: Anthony Morris <[email protected]>
Co-authored-by: Günter Zöchbauer <[email protected]>
Co-authored-by: Darren Meehan <[email protected]>
Co-authored-by: Nougator <[email protected]>
Co-authored-by: Dirk Puge <[email protected]>
Co-authored-by: hituzi no sippo <[email protected]>
Co-authored-by: Mingun <[email protected]>
Co-authored-by: FIGBERT <[email protected]>
jstarry added a commit that referenced this issue Jul 10, 2020
* Added period to description

* Fixed the spelling of " Arguabley" to "Arguably"

* Update README.md

* Added period to description

* Added period to description

* Grammar and spelling correction

added period to description, fixed spelling of "encouter" to "encounter"

* Added period to description

* Added period to description

* Grammar and spelling

Added period to description, fixed spelling of "accross" to "across"

* Added period to description

* Added period to description

* Fixed spelling of "aggresive" to "aggressive"

* Removed period from description

* Update optimizations.md

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
jstarry added a commit that referenced this issue Aug 16, 2020
* Added period to description

* Fixed the spelling of " Arguabley" to "Arguably"

* Update README.md

* Added period to description

* Added period to description

* Grammar and spelling correction

added period to description, fixed spelling of "encouter" to "encounter"

* Added period to description

* Added period to description

* Grammar and spelling

Added period to description, fixed spelling of "accross" to "across"

* Added period to description

* Added period to description

* Fixed spelling of "aggresive" to "aggressive"

* Removed period from description

* Update optimizations.md

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Removed period from description

* Update src/concepts/html/README.md

Co-authored-by: Teymour Aldridge <[email protected]>

Co-authored-by: Justin Starry <[email protected]>
Co-authored-by: Teymour Aldridge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants