chrono missing wasmbind feature — Calendar panics on WASM #82
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
chronois declared in the workspaceCargo.tomlwithfeatures = ["std", "clock"]and nowasmbind. Onwasm32-unknown-unknown,chrono::Local::now()/Utc::now()then falls back tostd::time::SystemTime::now()— which WASM doesn't support — and panics:The Calendar archipelago hits this immediately on mount (
archipelago.rsreadsLocal::now()to pick the initial date). Any future archipelago using chrono's clock APIs will hit it too.Fix
Add
"wasmbind"to chrono's workspace-level feature list inCargo.toml. Withwasmbind, chrono usesjs_sys::Date::now()on WASM instead ofSystemTime.js-sysis already a direct workspace dep so no new bloat.Scope
hero_archipelagos/Cargo.toml— add"wasmbind"to the chrono workspace entry.hero_archipelagos/archipelagos/calendar/Cargo.toml— switch from its local override tochrono.workspace = trueso it inherits the feature automatically.