Open Geal opened 7 years ago
I think I will try to do it^^
great! You can start by playing around with the rust->webasm toolchain, and see how you can expose an API and Rust types to JS
Yep.
How do you see this crate? As a complete clone of momentJS? Like a MomentRS?
start small, with just a way to recognize some dates, then we'll see if a new time library would be interesting
BTW the wasm target is now enabled on stable: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1200-2017-08-31
Maybe this could compile to be used in wasm? https://github.com/chronotope/chrono
I'll let you find a nice crate name :)
Description
(original idea from @jtanguy)
This is a library, written in Rust, compiled to webasm (so it can be called from Javascript code), that can parse ISO8601 dates (strings that have this format: "1977-04-22T01:00:00-05:00") and handle recurrence.
Why is it a nice idea?
This could be a good example of what you could do with Rust code compiled to Web Assembly. Personally, I'd love to see something like Moment.js done in Rust!
Skills you'll learn
Resources to get started
Here is an existing ISO8601 parser in nom that could be extended, and the associated blogpost. For webasm, see all the work done by @badboy. You can now use webasm from stable Rust.
Mentor(s)