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

Embed static ressources into the ppl-utils binary. #2

Open
jyaif opened this issue Nov 21, 2020 · 6 comments
Open

Embed static ressources into the ppl-utils binary. #2

jyaif opened this issue Nov 21, 2020 · 6 comments

Comments

@jyaif
Copy link
Member

jyaif commented Nov 21, 2020

The ppl-utils binary and the static files (pewpewlive-wasm.js, pewpewlive-wasm.wasm, pewpew.html) need to stay in sync.
To prevent user error it would be nice if the static files were stored in the binary.

Packr seems like it would do the job: https://github.com/gobuffalo/packr
[edit: Go 1.16 will support this natively! No need to use Packr]

@ModEngineer
Copy link
Member

ModEngineer commented Jan 30, 2021

I prefer to compile my own binaries, so how would this affect me? Keeping static files externally would mean that I wouldn't have to recompile the binary all that often. This could be implemented in a way where the releases(i.e. prebuilt binaries) or a separate branch use this system without touching the main branch.

@ModEngineer
Copy link
Member

As a side note in relation to my previous comment, using something like Git or GitHub Desktop allows you to sync all files automatically, thus making it easier to update the entire local clone of the repository.

@jyaif
Copy link
Member Author

jyaif commented Jan 30, 2021

This change would impact you negatively. Note however that compiling ppl-utils should be trivial.

@ModEngineer
Copy link
Member

It is trivial to compile ppl-utils, which is why I'm not necessarily in favor of this change, though I understand the convenience of it.

@jyaif
Copy link
Member Author

jyaif commented Jan 30, 2021

I really prefer the simplicity of having a single binary.
I suppose that one solution to your problem would be for ppl-utils to serve the built-in webasm files by default, but offer the possibility to override the served files.
Overriding the served files could for instance be done via arguments on the command line.

@ModEngineer
Copy link
Member

I understand. It's annoying for most people to have to redownload the entire repository and release each time a small update is made to the Webassembly.

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