Two public SystemHost types: the core one is always UTC, the host crate's uses the system time zone

Open
#164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
api

Research direction

Start by reading core/src/host.rs around SystemHost and adapters/native/src/system.rs to compare the two public types, then check how Runtime::new() and Runtime::new_with_host_services expose them. The issue suggests renaming the core type while keeping the host crate's SystemHost; trace the public exports and update affected references. Done means the types are unambiguous and the documented host behavior remains accurate.

Written by the indexing model from the issue text.

Description

enhancement

Two public types are named SystemHost and behave differently:

Path Clock Time zone
quickjs_oxide::engine::api::core::SystemHost (re-export of oxide_core::host::SystemHost, core/src/host.rs:84) system always UTC
quickjs_oxide_host::SystemHost (adapters/native/src/system.rs:19) system TZ / /etc/localtime via tz-rs

Runtime::new() uses the first; the README and the docs use the second with Runtime::new_with_host_services. A use quickjs_oxide::engine::api::core::*; plus use quickjs_oxide_host::SystemHost; is a name clash, and importing the wrong one silently gives UTC dates.

Suggestion: rename the core one to what it is (e.g. UtcHost / DefaultHost), keeping SystemHost only in quickjs-oxide-host.

Dominant language
Rust
Stars
61
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pocket-stack/quickjs-oxide

All issues in pocket-stack/quickjs-oxide

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.