Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPublish the `js-sys` crate #519
Comments
fitzgen
added
Blocking Rust 2018
js-sys
labels
Jul 19, 2018
This comment has been minimized.
This comment has been minimized.
|
I think we should probably reset to 0.1.0 since the whole point of a separate crate is the freedom to publish independently and not be super tied together. |
fitzgen
referenced this issue
Jul 19, 2018
Closed
js-sys: Expose bindings to ALL the global JS things #275
This comment has been minimized.
This comment has been minimized.
|
Assuming that wouldn't have any sort of negative ergonomic effect on people using these crates, resetting to 0.1.0 makes sense to me, especially if they are separate. That said, my opinion is not strongly held by any means, and would defer to y'all's opinions on it :) |
fitzgen
added
the
Rust 2018 Preview 2
label
Jul 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Sounds good to me! (along with 0.1.0) |
This comment has been minimized.
This comment has been minimized.
|
Some things I've noticed working with this crate:
|
This comment has been minimized.
This comment has been minimized.
I think these should always be
I think we should use by-ref to avoid ref-count noise.
I don't think this needs to block publishing 0.1.0, since there are just so many optional arguments to various functions and methods, and it seems we have some design decisions to make about this topic. We have been choosing whether to expose these arguments on a case by case basis and by applying our own judgement. As I see it, we have a few choices:
|
This comment has been minimized.
This comment has been minimized.
|
I'm less certain about using I do agree though we should probably take by-ref everywhere! For optional arguments I think it's fine to basically cut what we have. It's subpar in some places but it can always be worked around locally if necessary or we can have more releases. One last thing I've realized is we probably want to |
This comment has been minimized.
This comment has been minimized.
|
This is quite trivial thing, but can we resolve the inconsistency whether semblance of "C" should be declared or not, which @alexcrichton pointed out before in #422? I am using |
This comment has been minimized.
This comment has been minimized.
|
@toVersus I personally agree we should just switch to using |
This comment has been minimized.
This comment has been minimized.
|
Will publish tomorrow, if anyone has any last minute concerns, now is your time to voice them! |
This comment has been minimized.
This comment has been minimized.
|
Published! https://crates.io/crates/js-sys |
fitzgen commentedJul 19, 2018
•
edited
I think we have enough bindings written that it would be useful to publish now. Especially since it is a separate crate from
wasm-bindgennow.Things we need to do first:
Do a once over of the bindings to double check we aren't returning
Numberobjects and all thatDecide on a version. Do we want to match
wasm-bindgenor start at0.1.0?#[derive(Clone, Debug)]on all the extern typesMake sure we are always passing by-ref
Agree on
&strvs&JsStringarguments