Skip to content

Implement PHP library inclusion #161

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 1 commit into from
Feb 19, 2025
Merged

Conversation

PeteBishwhip
Copy link
Member

Closes NativePHP/laravel#460

  • Implements a new txt file to specify included libraries
  • Updates build to include the libraries

@PeteBishwhip PeteBishwhip requested a review from a team February 19, 2025 10:27
@PeteBishwhip PeteBishwhip self-assigned this Feb 19, 2025
Copy link
Member

@SRWieZ SRWieZ left a comment

Choose a reason for hiding this comment

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

Great idea!

For reference, it's possible to include all libs with --with-suggested-libs.
https://static-php.dev/en/guide/deps-map.html

I'm okay with this approach that would help us keep the binaries small by maintaining the included libs ourselves.

I hope Imagick will be supported on Windows soon because it's so much better than GD.

@PeteBishwhip
Copy link
Member Author

For reference, it's possible to include all libs with --with-suggested-libs. https://static-php.dev/en/guide/deps-map.html

I'm okay with this approach that would help us keep the binaries small by maintaining the included libs ourselves.

Yeah, I should've made it clear that this was my thinking. I much prefer explicitly defining what we want as opposed to something "guessing" what we'd like, based on suggestions.

Totally happy with either approach but this was just a personal preference. Thanks for the input :D

@gwleuverink
Copy link

gwleuverink commented Feb 19, 2025

Perfect. Thanks Pete!

keep the binaries small by maintaining the included libs ourselves

Just a question, maybe for another PR. If binary size is important we might want to compress them.

Spc has this built-in but it is only supported on windows & Linux.

From the docs:

--with-upx-pack: Use UPX to reduce the size of the binary file after compilation (you need to use bin/spc install-pkg upx to install upx first)

@SRWieZ
Copy link
Member

SRWieZ commented Feb 19, 2025

Simon only included functionalities that are supported on all platforms.

So I think it's a no-go.

And I'm not sure, but in our context, it may slow down every request.

@SRWieZ SRWieZ merged commit a9de439 into main Feb 19, 2025
@PeteBishwhip PeteBishwhip deleted the feature/460-add-library-support branch February 19, 2025 11:57
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.

No JPEG support in build
3 participants