-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Update steven for emscripten #1
base: master
Are you sure you want to change the base?
Conversation
EMMAKEN_CFLAGS="-s USE_SDL=2" is used to enable the SDL2 port with emscripten, but it fails with a bizarre error: https://gist.github.com/satoshinm/7c5a7971d8c3b2bbf4fa62c9de8d85b2
seems it is trying to generate sdl2.bc multiple times simultaneously and choking on itself? To pregenerate sdl2.bc, try running from emscripten the unit test - this passes: 1.37.9 $ python tests/runner.py browser.test_sdl2_image and then the SDL errors go away, we are left with only OpenSSL missing:
|
Stubbing out OpenSSL calls just to unblock building (port to ring?), starts to run but then quickly panics - thread-related?
|
Enabling RUST_BACKTRACE for a more informative error, it mentions
|
I think this error is trying to say it can't download the needed resources, around this function: https://github.com/Thinkofname/steven/blob/a9cb7654e45757b7219f4da5e6f709d0fa23f42a/src/resources.rs#L345 - unfortunately, not clear how to port this. The web platform cannot download arbitrary URLs cross-origin, yet the resources are mandatory. Setting this aside for now. |
See some notes on challenges of completing this port in Thinkofname#70 (comment), in order of difficulty: sockets, crypto, threads. But even before porting, there is the difficulty of getting Steven up-to-date and functional on my system: Rust nightly is a moving target, what worked before may not work now, there's a bunch of warnings, it is not clear which are real problems, there is graphic corruption on the title screen, any login fails with "Invalid scheme for Http", and I don't know Rust to fix it. |
Invalid scheme for Http is caused by not supporting https when openssl is not used by hyper (http library) |
@satoshinm iceiix/stevenarella#446 is further along using wasm32-unknown-unknown (had difficulties with wasm32-unknown-emscripten: https://users.rust-lang.org/t/what-is-a-known-working-setup-for-using-rust-with-emscripten-wasm32-unknown-emscripten/24312/4?u=iceiix, and the wasm32-unknown-unknown target is more popular / supported), although still a ways from being useful: web.mov |
Compile for emscripten with:
EMMAKEN_CFLAGS="-s USE_SDL=2"
OpenSSL, either build with emscripten or replace- commented-out for now