Skip to content

Allow importing PyPI packages on wasm #2442

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

Merged
merged 16 commits into from
Mar 14, 2021
Merged

Allow importing PyPI packages on wasm #2442

merged 16 commits into from
Mar 14, 2021

Conversation

coolreader18
Copy link
Member

@birkenfeld
Copy link

That's nifty! For my purposes the package doesn't come from PyPI though, since it needs to reflect the current master branch.

@coolreader18
Copy link
Member Author

Ah, it looked like in demo.js it was downloading from pypi. Regardless, this can be extended to fetch any wheel, so as long as a Pygments.whl is built for the master branch this can work with that easily.

@coolreader18 coolreader18 force-pushed the wasm-wheels branch 12 times, most recently from fc55f3e to 0a9da8c Compare February 18, 2021 23:06
@jhoobergs
Copy link
Contributor

How far would this feature eventually reach? Would it for example be possible to load numpy?

@coolreader18
Copy link
Member Author

@jhoobergs maybe, but we can't load numpy at all at the moment, so it would be dependent on how extension modules eventually work. The _numpy module might have to be pre-packaged into the binary, especially for something like wasm which doesn't have dynamically-loaded modules yet.

@coolreader18 coolreader18 force-pushed the wasm-wheels branch 4 times, most recently from 30ddb60 to d39e743 Compare March 3, 2021 17:22
Comment on lines 143 to 144
#[cfg(not(feature = "zlib"))]
Self::Standard { header } => Compress::new(level, header),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this one doesn't share condition with the others, is this needed to be placed between feature = "zlib"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it above the feature = "zlib" branches.

@coolreader18 coolreader18 merged commit 5d2d87c into master Mar 14, 2021
@coolreader18 coolreader18 deleted the wasm-wheels branch March 14, 2021 19:35
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.

4 participants