Skip to content
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

Allow removing Unicode tables from produced binaries #2411

Open
MaxDesiatov opened this issue Jan 3, 2021 · 4 comments
Open

Allow removing Unicode tables from produced binaries #2411

MaxDesiatov opened this issue Jan 3, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@MaxDesiatov
Copy link

This should reduce our binary size and partially resolve #7

@n8gray
Copy link

n8gray commented Jun 9, 2022

From WWDC 2022 "What's new in Swift" at 5:04:
"To make the standard library smaller for standalone, statically linked binaries, we dropped the dependency on an external Unicode support library, replacing it with a faster native implementation."

Is that going to help resolve this issue?

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Jun 9, 2022

Formally, ICU dependency is removed from the standard library, but in terms of binary size this makes things even worse for people linking with Foundation, because the latter still depends on ICU. In this case binaries have two versions of Unicode tables embedded in them: new ICU replacement in stdlib, and ICU itself from Foundation.

When not linking with Foundation, I don't think you'll see a substantial difference. The Unicode tables are still there, they're just coming from a different source.

I'll rename the issue to mention Unicode tables explicitly to avoid the confusion. In that sense the issue is still not resolved.

@MaxDesiatov MaxDesiatov changed the title Remove ICU dependency Allow removing Unicode tables from produced binaries Jun 9, 2022
@n8gray
Copy link

n8gray commented Jun 13, 2022

Oh good lord. I was so excited! 😢 It would be nice if there was a way to delegate that to the platform somehow. Seems like wasm as a concept takes a hit if every module that needs to deal with unicode correctly has to ship its own tables.

@MaxDesiatov
Copy link
Author

Yeah, if there was a nice way to customize the source of Unicode tables, we could rely on Intl.Segmenter API in the browser. At least that's what Swift String API is using Unicode tables for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants