-
Notifications
You must be signed in to change notification settings - Fork 357
[PHP.wasm] ImageMagick extension #2834
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
base: trunk
Are you sure you want to change the base?
Conversation
|
Test failures seem unrelated. I would still like to get to the bottom of them. All imagick tests pass! |
|
Now there are some related failures again. I'm debugging. |
…be randomly suffixed
|
Oki, I think we're good! These are the last two failures. cURL one is a timeout, which seems like a flaky test. I don't believe the XDebug one is related in any capacity other than perhaps different alignment of memory in the new build. |
|
I've restarted the tests and now the memory out of bounds and timeout are reversed and also related to different PHP versions: @brandonpayton any ideas? |
Motivation for the change, related issues
Adds ImageMagick PHP extension to Node.js PHP.wasm builds.
.wasmbundles grow by ~4.39MB each on average.As a follow-up item, we might consider shipping Imagick in the browser.
Implementation details
--with-namespace-prefix=PHPWasm_Magick_flag used to build imagick deserves a note. When the library is built, every public MagickCore symbol is wrapped through thePrependMagickMethodmacro chain. By default, this means appending a random-ish number to their name, e.g.ReadImage_48252. This makes asyncify instrumentation effectively impossible since we need to explicitly list all the final method names. Therefore, we set--with-namespace-prefix=PHPWasm_Magick_to use a stable, well-known prefix. This results in method names such asPHPWasm_Magick_ReadImage.Testing Instructions (or ideally a Blueprint)
CI – this PR ships new tests for Imagick.