otoml: gate OTime::now() for wasm32 (hero_rpc#117) #144
No reviewers
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_lib!144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-117-otoml-wasm"
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?
Part of hero_rpc#117 — unifies the codegen's SDK-side OTime newtype with the canonical
herolib_otoml::OTime.SystemTime::now()is unavailable onwasm32-unknown-unknown, which blocks SDK consumers from depending on herolib_otoml from WASM builds. Gate just the one method behind#[cfg(not(target_arch = "wasm32"))]— the rest ofOTime(from_epoch/from_components/parse/ serde /Display) is pure math and remains WASM-safe.Test plan
cargo check --target wasm32-unknown-unknown -p herolib_otomlpassescargo check -p herolib_otoml --testspassescargo test -p herolib_otoml --lib— 108 tests pass