WebAssembly / WebAssembly/WASI
WASI interface for accessing timezone offsets?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
A little while back I started work on implementing the new TC39 Temporal standard in AssemblyScript. The non-timezone aware parts of this API were relatively easy to implement (see assemblyscript-temporal), however, the more interesting timezone-aware parts of the API are more challenging!
My initial attempt has been to store the IANA timezone database a part of the module, but this results in a sizeable binary, and decoding the IANA timezone files isn't much fun (see assemblyscript-temporal-tz).
Most environments where WebAssembly will be run will already have this timezone information available as part of the OS, so rather than include it within the wasm module, it makes sense access this information from the host, via WASI (calling it, for example, wasi-tz)
The WASI information that supports this would be very simple, the Temporal API can be implemented based on a single method offsetForTimezone(tz: string, epochMillis: i64): i32 . Although wasi-tz would probably need methods that allow you to enumerate supported timezones also.
What does this community think of this idea? Is there value in wasi-tz?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the issue's linked assemblyscript-temporal and assemblyscript-temporal-tz projects, especially the offsetForTimezone method, and compare their needs with existing WASI interfaces. Done would be a decided, concrete wasi-tz proposal covering timezone offset lookup and whether supported-timezone enumeration belongs in the interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- api, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100