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

Packaging for JavaScript #1175

Open
2 of 5 tasks
sffc opened this issue Oct 15, 2021 · 4 comments
Open
2 of 5 tasks

Packaging for JavaScript #1175

sffc opened this issue Oct 15, 2021 · 4 comments
Assignees
Labels
A-design Area: Architecture or design A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole help wanted Issue needs an assignee S-epic Size: Major project (create smaller child issues) T-core Type: Required functionality

Comments

@sffc
Copy link
Member

sffc commented Oct 15, 2021

This issue tracks tasks that need to be completed for ICU4X to be easily included by JavaScript clients.

For people landing on this thread for the first time: Long story short, ICU4X is a new modular i18n library written in Rust. In order to deploy it on the Web (and possibly in Node.js), we have invested time in WebAssembly bindings that enable JavaScript clients to use ICU4X as if it were a native JavaScript library. The next step, where we would like to start engaging more with folks like you, is how to package up all the work we've done into a polished, modular package that can be easily integrated into all types of JavaScript apps.

Some open questions include:

  1. How do WebAssembly libraries integrate into popular JS serving frameworks like Webpack?
  2. Are there examples of other WASM-as-a-library packages that we can reference?
  3. Can we perform tree-shaking, i.e., by taking the WASM APIs that are reachable from JS code and pruning out unreachable WASM code?

Additional sub-tasks:

  • Figure out object lifetime and memory growth beyond the finalization registry
  • Test on frontend and integration with Webpack, etc.
  • Consider adding an Intl object for easy polyfills
  • Consider supporting Temporal APIs (Support Temporal #1174)
  • Publish on npm (note: I reserved the icu4x package name and org)
@sffc sffc added T-core Type: Required functionality A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole A-design Area: Architecture or design S-epic Size: Major project (create smaller child issues) labels Oct 15, 2021
@sffc sffc added this to the ICU4X 1.0 milestone Nov 5, 2021
@sffc sffc added the help wanted Issue needs an assignee label Nov 5, 2021
@sapriyag sapriyag added the discuss-priority Discuss at the next ICU4X meeting label May 25, 2022
@sffc

This comment was marked as outdated.

@sffc
Copy link
Member Author

sffc commented May 27, 2022

Discussion:

  • @robertbastian - Not sure if we have time to make a fully polished npm release; maybe we can release a 0.9 on npm when we release Rust 1.0?
  • @dminor - I like that solution. We should do some work to facilitate JS users, but we don't have the expertise in our team to make it polished. It should not detract from the Rust release.
  • @sffc - I like this approach as well; it can help us develop a community of contributors in JS if we publish a "beta" release on npm.
  • @Manishearth - Perhaps we can do some recruiting for an expert in this area.
  • @sffc - We should consult with @devsnek (CC'd above).

@sffc sffc modified the milestones: ICU4X 1.0 Untriaged, ICU4X 1.1 May 27, 2022
@sffc sffc removed the discuss-priority Discuss at the next ICU4X meeting label May 27, 2022
@sffc sffc modified the milestones: ICU4X 1.1, ICU4X 1.0 Untriaged May 27, 2022
@devsnek
Copy link

devsnek commented May 30, 2022

@sffc my interest in icu4x comes from it being a possibility for implementing intl/temporal in engine262, so within the bounds of that (which i haven't touched since november, so i'll need to regain some context there) i can try to give feedback and small fixes but i don't have the bandwidth to spearhead this.

@sffc sffc self-assigned this Jun 9, 2022
@sffc
Copy link
Member Author

sffc commented Jun 27, 2022

As a reminder of the impact of this issue, nearly 2/3 of developers use npm, according to the 2022 Stack Overflow Developer Survey:

https://survey.stackoverflow.co/2022/#section-most-popular-technologies-other-tools

@sffc sffc assigned QnnOkabayashi and unassigned sffc and Manishearth Jul 27, 2022
@sffc sffc modified the milestones: ICU4X 1.0 (Final), ICU4X 1.1 Sep 26, 2022
@sffc sffc removed this from the ICU4X 1.1 milestone Sep 26, 2022
@sffc sffc added this to the 1.0 Post-Release milestone Sep 26, 2022
@sffc sffc mentioned this issue Oct 13, 2022
25 tasks
@robertbastian robertbastian removed their assignment Feb 22, 2023
@robertbastian robertbastian added the discuss Discuss at a future ICU4X-SC meeting label Oct 19, 2023
@sffc sffc removed their assignment Nov 2, 2023
@sffc sffc removed the discuss Discuss at a future ICU4X-SC meeting label Nov 2, 2023
@robertbastian robertbastian self-assigned this Nov 2, 2023
@sffc sffc modified the milestones: 1.5 Blocking ⟨P1⟩, ICU4X 2.0 Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-design Area: Architecture or design A-ffi Area: FFI, WebAssembly, Transpilation C-meta Component: Relating to ICU4X as a whole help wanted Issue needs an assignee S-epic Size: Major project (create smaller child issues) T-core Type: Required functionality
Projects
Status: Unclaimed for sprint
Development

No branches or pull requests

6 participants