-
Notifications
You must be signed in to change notification settings - Fork 176
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
example of deployment with http server/files #53
Comments
You could use rust-embed (or includedir or include_dir), or tar/zip your files in your build script and embed with Then you set up the routing of your web server (e.g. actix-web) to resolve to the embedded files. If using rust-embed you call It's probably only worth doing this for release builds since |
Depending on how many resources you have, you may be able to get away with just inlining them manually. In my case I could just use base64 data URIs and |
Hi,
great library! I am currently creating the front end in Vue JS. Now I am in development and I point the webview to localhost when the Vue JS dev server is on.
But now.. on to production. In the readme it says that local resources only work when using a http server to serve the files. However: how does one embed the files with a rust binary?
And if that is not possible, how can I use include_str! so that I don't get the "Local resource cannot be loaded" errors
Thanks
The text was updated successfully, but these errors were encountered: