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

Interest in a semi-working wasm build? #74

Open
gfodor opened this issue Nov 13, 2023 · 2 comments
Open

Interest in a semi-working wasm build? #74

gfodor opened this issue Nov 13, 2023 · 2 comments

Comments

@gfodor
Copy link

gfodor commented Nov 13, 2023

Hello, I have a partially working wasm build of LibreSprite working but don't have the bandwidth to really get it into a fully feature complete state. The program runs, can be used, files can be saved and loaded from within the browser using native file picker. The bits that I don't have working are foreground windows that have return values, like alerts, because emscripten requires that everything be relocated into a central loop. It would also be nice to get preferences saving to local storage and some kind of scripting support from the native javascript context. Foreground windows that don't return values work fine - I've refactored a subset of these but the rest would need to be refactored to use my new callback based approach to meet the emscripten control flow needs.

I didn't want to open a PR because it might imply I have the bandwidth to keep working on this but right now I do not. The code is here: https://github.com/gfodor/LibreSprite/tree/popup-wasm

@gfodor
Copy link
Author

gfodor commented Nov 13, 2023

One note to save some time, to build this you first need to compile it natively (I have done so on mac) simply because you need a working bin/gen for the wasm build to run. From there, once bin/gen exists, nuke CMakeCache.txt and run emcmake cmake -DEMSCRIPTEN=TRUE -G Ninja .. ; ninja libresprite with the latest emscripten SDK activated.

@gfodor
Copy link
Author

gfodor commented Nov 15, 2023

I actually started working on the scripting now, it is starting to work. Progress is on the js-script branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant