Skip to content

Conversation

@zhangzqs
Copy link
Contributor

@zhangzqs zhangzqs commented Jul 5, 2024

No description provided.

@zhangzqs zhangzqs mentioned this pull request Jul 5, 2024
Copy link
Owner

@maxwase maxwase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for sharing this unexpected, yet valid usecase for this crate! There are some minor changes that I request and I would love to merge this

@zhangzqs zhangzqs changed the title add wasm example feat: add wasm support Nov 11, 2025
@zhangzqs zhangzqs changed the title feat: add wasm support feat: add wasm support and add example on browser Nov 11, 2025
@zhangzqs zhangzqs requested a review from maxwase November 11, 2025 11:59
♻️ refactor(examples/wasm):更新.gitignore,移除index.js文件,修改index.html结构,添加注释到lib.rs并重构结构体名

✨ feat(examples/wasm): 在Cargo.toml中为button-driver添加wasm特性,简化lib.rs代码并修改Instant实现

✨ feat: 在Cargo.toml中添加js-sys依赖;在src/instant.rs中为js_sys::Date实现InstantProvider trait

✨ feat(.github/workflows/rust.yml):添加Clippy wasm检查、rustup添加wasm32-unknown-unknown目标及wasm示例构建步骤

💡 feat(examples/wasm/src/lib.rs):添加注释说明使用`JsInstant`类型,更新依赖并替换`Date`为`JsInstant`

✨ feat: 在src/instant.rs中添加JsInstant结构体及相关实现,在src/lib.rs中导出JsInstant
💡 docs: 在src/instant.rs中添加JsInstant的注释说明
@maxwase
Copy link
Owner

maxwase commented Nov 16, 2025

Thanks for such an unexpected use-case and contribution! I'll refactor this a bit more and release it soon

@maxwase maxwase merged commit 736ff0e into maxwase:master Nov 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants