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

Static library files #181

Open
kuviman opened this issue Mar 23, 2019 · 4 comments
Open

Static library files #181

kuviman opened this issue Mar 23, 2019 · 4 comments

Comments

@kuviman
Copy link
Contributor

kuviman commented Mar 23, 2019

It would be cool if it was possible for libraries to provide static files, not only the final app crate.

Currently it's only possible to embed files into libraries with include_bytes!/include_str!, but this is not good if the file is large.

@Pauan
Copy link
Contributor

Pauan commented Mar 23, 2019

but this is not good if the file is large.

Why isn't it good?

@kuviman
Copy link
Contributor Author

kuviman commented Mar 23, 2019

I've had some problems with loading images when they are embedded like this (which requires using image crate, and causing browser to hang, not sure why), while loading images with browser native APIs is much lighter, makes the wasm file smaller, which is useful if I'm downloading the image in background

@Pauan
Copy link
Contributor

Pauan commented Mar 24, 2019

Ah, okay, so you're saying you want it to include the files in the directory, but keep them separate (i.e. not bundle them)?

@kuviman
Copy link
Contributor Author

kuviman commented Mar 24, 2019

I want the behavior of static files, but for library crates.

So that the static folders of all the crates in the dependency tree get merged when deploying the app.

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