-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support WASM #16
Comments
I have no problem with no_std support. But doesn't the wasm32 target contain |
Wasm32 supports many things in std (like alloc::collections and core:f32), but not everything. The biggest thing it is missing is file IO.
From: Jonathan Chan Kwan ***@***.***>
Sent: Sunday, July 9, 2023 7:11 PM
To: ***@***.***>
Cc: Carl ***@***.***>; ***@***.***>
Subject: Re: [SOF3/include-flate] Support WASM (Issue #16)
I have no problem with no_std support. But doesn't the wasm32 target contain std? Or am I missing something?
—
Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABR65P7ISB4Q3XBLT3N7T4LXPNQD3ANCNFSM6AAAAAA2DZTF7A>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I mean the wasm32-unknown-unknown target already supports std (even though many are unimplemented), and it doesn't seem to require no_std to build a normal .wasm binary. |
I didn’t know that. Thanks! Include-flate seems to be working for me, now.
* Carl
From: Jonathan Chan Kwan ***@***.***>
Sent: Sunday, July 9, 2023 8:08 PM
To: ***@***.***>
Cc: Carl ***@***.***>; ***@***.***>
Subject: Re: [SOF3/include-flate] Support WASM (Issue #16)
I mean the wasm32-unknown-unknown target already supports std (even though many are unimplemented), and it doesn't seem to require no_std to build a normal wasm32 binary.
—
Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABR65P75THW5YZVR2MCPVJLXPNWZXANCNFSM6AAAAAA2DZTF7A>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
include-flate
crate is great and would be super useful for WASM apps and libraries. It would be a way to include data files that WASM couldn't otherwise upload.It's possible that you can make it compatible just by changing some
::std
's to::alloc
's.When I expand the
flate!
macro on my I get code like this (noticed the::std
's)This works if I manually change the
::std
's to::alloc
's. You use lazy_static which says that it is 'no_std' compatible, so it should be able to work with WASM.Thanks for considering adding this capability.
p.s. I recently converted one of my non-macro crates to WASM and no_std compatibility and wrote a blog post about the process that you might find interesting. Thanks again for creating this crate. It did just want I needed.
The text was updated successfully, but these errors were encountered: