Skip to content

Conversation

@nhynes
Copy link

@nhynes nhynes commented Feb 4, 2019

This PR hides the file io behind cfg attributes so that RustPython can compile to a std without file descriptors.

@nhynes nhynes force-pushed the compile-wasm branch 2 times, most recently from 579c61d to 80b470c Compare February 4, 2019 22:01
@shinglyu
Copy link
Contributor

shinglyu commented Feb 4, 2019

LGTM, but I'd love to have a second eye on this. @windelbouwman ?

@coolreader18
Copy link
Member

Oh, I did a quick patch in #267 to allow for testing of a WASM feature, this seems like an improved version of that.

@windelbouwman
Copy link
Contributor

@rmliddle did you already fix this? I believe so, of so, this PR can be closed.

@rmliddle
Copy link
Contributor

rmliddle commented Feb 6, 2019

Yes we can close this PR, the conditional import of the io/os modules that @coolreader18 made in #267 will still be required.

I think hiding the io/os modules (which is what @coolreader18 has done) from the wasm build completely is a much more favourable approach than trying to hide each and every method. At least until we can come up with better semantics for these modules in the browser.

@nhynes
Copy link
Author

nhynes commented Feb 13, 2019

Hey, I like what you all did with the os module. I updated this PR to allow compiling for --target wasm32-unknown-unknown. This PR now is a fairly uncontentious change.

@windelbouwman windelbouwman merged commit 7032de9 into RustPython:master Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants