1,148 karma · joined October 5, 2010
[ my public key: https://keybase.io/erickt; my proof: https://keybase.io/erickt/sigs/WDhGSPcuMruumbNA5rWKGXcp2m-lOiX4n5YE6-goGMA ]
#[cfg(test)]
Mod tests {
include!("comboluator_tests.rs");
}
Then write your tests there. It allows you to write unit tests against private things, but also allows you to decouple the files to keep things cleaner.Instead, we're layering platform-specific code in external libraries. At the raw C-level bindings, we have libc [2] and winapi [3]. For higher level APIs, we've got Mio [4] which abstracts the system APIs, and now Tokio [5], which uses futures to simplify async operations.
We're just working our way up the stack. All of these are being developed by members of the various Rust teams, so they're as "official" as everything else we're doing.
[1]: https://doc.rust-lang.org/std/net/ [2]: https://crates.io/crates/libc [3]: https://crates.io/crates/winapi [4]: https://github.com/carllerche/mio [5]: https://tokio.rs/
1: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html
If you want to know more about our glorious macros 1.1 future, David Tolnay just have a great meetup talk all about this a few weeks ago:
[1]: https://github.com/rust-community/underhanded.rs/issues/9
[1]: https://github.com/aturon/rfcs/blob/roadmap-2017/text/0000-r...
The idea would be that these types would be put into a library (or just another module) that's used by the rest of the app. There wouldn't be duplication of these structures. It's not ideal, which is why we are working on stabilizing the compiler features to do away from codegen.
[1]: https://blog.rust-lang.org/2014/12/12/1.0-Timeline.html
That's exactly what we want to do. We don't have the domain expertise in many of these areas, but we want to enable those ecosystems to help develop their own platforms. It's one of our goals to make sure any infrastructure we develop for the "Rust Platform" is usable throughout our community.
In a way, Serde itself is all about extracting the metadata of a type and handling validation issues. However this is metadata is currently not exposed to end users. It's something I've thought about doing, but I haven't had a driving use case to help come up with a proper API for it. I don't think it'd be that hard to implement once we actually have a clear idea on what we want.
The code Serde generates though typically optimizes down into nearly the same code as a hand written serializer and deserializer. On my laptop, serde_json [1] serializes a particular micro-benchmark [2] that serializes as fast as a hand rolled serializer (416MB/s vs 414MB/s). In comparison, rapidjson serializes the same structure in 432MB/s. I didn't write a hand written deserializer, but serde_json is comparable to rapidjson (193MB/s vs 182MB/s).
So it may be fast enough that you might be able to just implement whatever you want by just using Serde directly without having to generate parsers.
[1]: https://github.com/serde-rs/json
[2]: https://github.com/serde-rs/json/blob/master/json_tests/benc...
[3]: https://github.com/erickt/rust-serialization-benchmarks/tree...
On the REPL side, we've had a few prototyped out [1] out over the years. We'd love something someday. What do you use for your scientific computing? We are also have some projects that are trying to ease using Rust with other languages ([2], [3]), so knowing what we should priorities would help.
[1]: https://github.com/murarth/rusti
It is fine if people don't consider themselves underrepresented, we just want to be proactive about discovering if people end up self selecting themselves out of our community because they don't feel welcome. Furthermore, we are starting some initiatives to focus growing a diverse group of participants (https://github.com/rust-community/RustBridge), and so we need some baselines to see if we are successful or not.
We did have a number of categories that people could select from. Our plan for next year is to identify groups from the free text for next year. We are tracking our improvement plans here: https://github.com/rust-community/team/issues/28
Yeah that was a mistake. We were trying to cut out redundant questions, but it would have been so easy just to split this into three answers. We might be able to split this out based on secondary information, but we didn't finish that analysis in time for this post. Maybe we can get it into a future post if we trust our result.
This survey question allowed for people to describe themselves as they decided, and so people could select multiple choices if they wanted, as well as enter in free text. The percentages John used in this writeup should just be compared to the total number of people that replied, rather than across each of these demographics.
Sean Griffin, on Diesel, a safe and extensible ORM [2]
Alan Jeffery, on Parsell, a streaming parser written for WebAssembly [3]
[1]: http://www.meetup.com/Rust-Bay-Area/events/219697075/
[2]: http://diesel.rs