Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upPlatform support for emscripten #856
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm up for trying to write a pull request to fix this, but I wasn't sure whether that would mean readding emscripten to winit or adding the Window stuff in glutin |
This comment has been minimized.
This comment has been minimized.
|
The emscripten stuff should be specific to glutin, at least for now I think. |
This comment has been minimized.
This comment has been minimized.
|
Okay, I'll try to get it working. Just a heads up, it might take a while:
|
This comment has been minimized.
This comment has been minimized.
yurivish
commented
Mar 20, 2017
|
Hi! With the exciting new webassembly developments, I tried to compile a Rust project to the web and ran into this same issue. @cactorium, is there anything I can do to help you get this working? |
This comment has been minimized.
This comment has been minimized.
|
Hello! Since then I've written a pull request that adds emscripten support to glutin: #857 I think it's currently being blocked because it's uncertain whether this particular code of code is better suited for |
This comment has been minimized.
This comment has been minimized.
yurivish
commented
Mar 21, 2017
•
|
Great! Will do. I just spent quite a while getting all of the appropriate Emscripten infrastructure set up and am not quite through yet. I'll report back with results on stable/nightly Rust when I have everything running! For anyone else who wants to try out the custom branch of glutin and is using glium, here's what I added to
|
This comment has been minimized.
This comment has been minimized.
yurivish
commented
Mar 23, 2017
|
After spending a little more time on this, I've gotten to a point where running
|
This comment has been minimized.
This comment has been minimized.
|
Ah, that's because some crate in the chain's using an older version of backtrace, badboy already pushed a change to fix it. The version of backtrace in the crate hasn't been updated yet, so you need something like this to workaround it for now:
It's good to know that that's still an issue though! |
This comment has been minimized.
This comment has been minimized.
yurivish
commented
Mar 25, 2017
•
|
Thanks – it compiled! I can confirm that my project compiles successfully to asmjs on both nightly and stable Rust, and to wasm32 on nightly rust, but not on stable, where I get this error:
Trying beta now... Successfully compiled both wasm32 and asmjs. In all cases when compilation is successful, both the wasm and asmjs versions encounter an error in the browser, which I'll debug later when I'm feeling up to it. wasm32:
asmjs:
Thanks again for your help. I'll post again if I find anything new or get this thing to actually run at some point. :) |
This comment has been minimized.
This comment has been minimized.
GameKyuubi
commented
Aug 29, 2017
|
Any current news on this? I'm trying to build spinning-square for wasm and am running into this issue. |
This comment has been minimized.
This comment has been minimized.
|
I've got a fork that might be working for glutin 0.7 (see the PR referenced above), I've been meaning to work on getting it working for 0.8 but it's been getting stuck on the backburner for like the past 3 months.. Sorry guys |
This comment has been minimized.
This comment has been minimized.
|
Just to keep everyone updated, tomaka recently pushed some changes to winit based on thiolliere's work: rust-windowing/winit#286 Assuming I didn't botch my Cargo.toml changes, currently I'm getting these errors while compiling the latest glutin:
It looks like we're pretty close to having emscripten support here! |
This comment has been minimized.
This comment has been minimized.
|
Glutin needs to be updated for the changes in winit, but I don't know at which point we can consider the breakages in winit to be "good enough" to ship a new major version. |
This comment has been minimized.
This comment has been minimized.
|
Is there anything we can help with? |
francesca64
added
the
platform: Emscripten
label
Jun 2, 2018
ZeGentzy
added
the
To-Close-For-Inactivity
label
Feb 25, 2019
This comment has been minimized.
This comment has been minimized.
|
The emscripten backend now compiles. |
cactorium commentedFeb 11, 2017
•
edited
Hello! glutin doesn't appear to compile for emscripten correctly anymore. It looks like it broke some time between glium 0.15 (glutin 0.6.2) and glium 0.16 (glutin 0.7.4), I don't get errors on 0.15 compiling badboy's triangle code, but on 0.16 it errors out with the message below:
I'm posting this here instead of on winit because it seems like it was intentionally removed from winit: rust-windowing/winit#29