-
Notifications
You must be signed in to change notification settings - Fork 568
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
wasm support #128
Comments
You probably want to start with #30, as it has been working at some point. The piet-common layer should be selecting the web backend automatically with the wasm32 target. |
After an uneventful rebase, this branch seems to compile and run in the browser. Numbers and clearing seem to work, but there's what looks like a width calculation problem, so I can't try arithmetic operations because they're clipped. Going to look into that |
investigation shows this was related to DPI - specifically that canvas defaults to 96dpi. I'm going to try and enable a high-dpi canvas with this technique, but setting dpr to 1 makes it render correctly at lower dpi. |
Hi Raph,
I thought i'd have a go at making druid work with wasm, since piet appears to support it (although curiously with the
web
feature rather than selecting by target architecture?).druid-shell brings up 8 errors when i try and do it there. my gut feeling is that this is probably not the place to make the change, since the errors are for
Window
,WindowBuilder
etc.Trying to make the changes in in druid itself is definitely less good, with rustc giving up after 200 errors.
I know you've said it's probably a bit early to be worrying about too many backends, but given the logistical differences with this one, i thought it would be a good test of druid's design.
I'm willing to continue with the work as i'm able, but i think i'm going to need some guidance on the best way to go about it to get any further.
The text was updated successfully, but these errors were encountered: