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

Implement for wasm #38

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Implement for wasm #38

merged 2 commits into from
Jun 29, 2022

Conversation

Kijewski
Copy link
Collaborator

Intl.DateTimeFormat() makes the timezone of the browser or node instance queryable, and is available in all browsers that support WASM.

@Kijewski Kijewski force-pushed the pr-wasm branch 2 times, most recently from 8672c11 to 60e7b44 Compare June 29, 2022 12:58
<code>[Intl.DateTimeFormat()]</code> makes the timezone of the browser
or node instance queryable, and [is available] in all browsers that
support WASM.

[Intl.DateTimeFormat()]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
[is available]: https://caniuse.com/mdn-javascript_builtins_intl_datetimeformat_resolvedoptions
@astraw astraw merged commit c24b5b4 into strawlab:main Jun 29, 2022
@astraw
Copy link
Member

astraw commented Jun 29, 2022

Nice. thanks. Released as 0.1.34.

@Kijewski Kijewski deleted the pr-wasm branch June 29, 2022 13:29
Kijewski added a commit to Kijewski/iana-time-zone that referenced this pull request Jul 21, 2022
PR strawlab#38 did not properly separate WebAssembly for the use in a
browser/nodejs, or standalone run in e.g. wasmtime. This PR make the
compilation fail if the target-os is WASI.

Also I deduplicated the imports by using `#[cfg_attr(…, path = …)]`
instead of importing and aliassing in two steps.
@Kijewski Kijewski mentioned this pull request Jul 21, 2022
djc added a commit to djc/iana-time-zone that referenced this pull request Sep 12, 2022
WebAssembly support was added in strawlab#38 targeting the current versions
versions of wasm-bindgen and js-sys at the time, which is
reasonable. Unfortunately the whoami crate, in trying to support
older Rust versions, has reduced the upper version of wasm-bindgen
that it supports, see ardaku/whoami#43.

This PR thus reduces the minimum version required for wasm-bindgen.
I used `cargo +nightly update -Z minimal-versions` with
`cargo build --target wasm32-unknown-unknown` to find the earliest
version that compiles. We could theoretically set up checks in
CI to verify this on an ongoing basis, but this might be overkill
for now.
Kijewski pushed a commit that referenced this pull request Sep 12, 2022
WebAssembly support was added in #38 targeting the current versions
versions of wasm-bindgen and js-sys at the time, which is
reasonable. Unfortunately the whoami crate, in trying to support
older Rust versions, has reduced the upper version of wasm-bindgen
that it supports, see ardaku/whoami#43.

This PR thus reduces the minimum version required for wasm-bindgen.
I used `cargo +nightly update -Z minimal-versions` with
`cargo build --target wasm32-unknown-unknown` to find the earliest
version that compiles. We could theoretically set up checks in
CI to verify this on an ongoing basis, but this might be overkill
for now.
@lopopolo lopopolo added the Tier-2 Rust Tier-2 platform label Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tier-2 Rust Tier-2 platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants