Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

soyuka
Copy link
Owner

@soyuka soyuka commented Oct 16, 2024

Clone this branch, then run:

docker buildx bake
cp build/* ../phpdoc/web-php/js


FROM build_tool as php_src
ARG PHP_BRANCH=PHP-8.3.0
ARG PHP_BRANCH=PHP-8.4.0
Copy link

Choose a reason for hiding this comment

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

Suggested change
ARG PHP_BRANCH=PHP-8.4.0
ARG PHP_BRANCH=PHP-8.4

(It would be even better to use the latest tag).

@dunglas
Copy link

dunglas commented Oct 16, 2024

You could likely reduce the size more by compressing the final file using these tricks: https://rustwasm.github.io/book/reference/code-size.html

@soyuka
Copy link
Owner Author

soyuka commented Oct 16, 2024

actually everything is built-in emcc: https://emscripten.org/docs/optimizing/Optimizing-Code.html#how-to-optimize-code and I found -O2 to be the most optimized when it comes to building PHP. The thing we need to do is serve the .wasm gzipped.

Also emcc already uses wasm-opt.

@drupol
Copy link

drupol commented Dec 10, 2024

I'm interested to build this reproducibly with Nix!

@soyuka
Copy link
Owner Author

soyuka commented Jan 17, 2025

@drupol what's the problem with Nix it should work

derickr added a commit to derickr/php-wasm-builder that referenced this pull request Feb 6, 2025
This is based on soyuka/php-wasm#7

Support for mbstring and the XML extensions will be in the next commit.
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.