Skip to content

Consider implementing wasm-bindgen conversion traits for various time structs #754

@demhadais

Description

@demhadais

Hello!
Just wanna start by saying I love the crate. I would like to improve the support for the structs in this crate by implementing FromWasmAbi and friends for structs in this crate, converting them to js_sys::Date. Maybe I could also implement support for converting structs in this crate to Temporal API objects behind some unstable feature flag and/or compilation options. This would enable users to do things like:

use wasm_bindgen::prelude::*;
use time::UtcDateTime;

#[wasm_bindgen]
struct MyStruct {
    pub time: UtcDateTime
}

I'd be happy to submit a PR with these changes if it sounds good!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-third-partyArea: implementations of traits from other cratesC-feature-requestCategory: a new feature (not already implemented)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions