Skip to content

Example single-workspace project with a rust webserver (warp) serving a rust frontend (yew) as wasm included in the webserver binary

License

Notifications You must be signed in to change notification settings

inanna-malick/rust_frontend_and_backend_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library designed to allow for embedding static content generated by building rust wasm code in native rust workspaces. This allows for projects with some properties that I think are neat:

  • wasm and native code in the same workspace, sharing common code including types
  • embedding wasm build output in native binaries, allowing for easily-distributable apps serving dynamic frontends
  • for example, a process info visualizer that renders process info using SVG and uses onclick handlers to provide for rich interactivity.

If you want to clone something so you can get started prototyping, here's an example project with a rust webserver (warp) serving a rust frontend (yew).

NOTE: this crate currently requires rust nightly due to a bug fix for a stable regression - no experimental features are used.

TODO:

  • support wasm build methods other than cargo-web (doesn't seem to be under active development)
  • FIXED: use phf instead of lazy_static after rust-lang/rust#70584 is resolved
  • mark as non-nightly after the fix to that issue hits stable

About

Example single-workspace project with a rust webserver (warp) serving a rust frontend (yew) as wasm included in the webserver binary

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages