Welcome to another issue of This Week in Rust. This week introduces raw
string literals, the removal of the rust
tool, feature gating, and the
privacy overhaul.
What's cooking on master?
Only 51 PRs were merged this week, though the ones that were were fairly large.
Breaking changes
- Visibility and privacy have been defined, and the new semantics are slightly incompatible with the old. The details are here.
- Feature gating has been added to the compiler. This allows us to mask language features that we don't want to commit to for 1.0. The compiler will tell you when you are using an "experimental" feature. The current experimentals are glob imports, macro definitions, and struct-like variants in enums. This is an important step forward for 1.0 which, apparently, is right around the corner.
- The
rust
tool has been removed. Option
's API has been massively simplified, and changed to be composable.- Strings are no longer allowed to be modified in safe
code. Things like
let s = ~"abcdefg"; s[4] = 0x99;
are now rejected. This is because it allows one to create invalid (non-UTF8) string values. extra::rc
has graduated tostd::rc
.extra::tempfile::mkdtemp
has been replaced with an RAII wrapper.std::rand
has been improved, but changes the public API of Rng a bit.IntConvertible
has been removed in favor ofToPrimitive
andFromPrimitive
, which can be derived for enums, making interacting with C APIs substantially more DRY.
Other changes
- Raw strings are now supported.
The basic syntax is
r"Foo"
, but alsor###"Foo"###
, for arbitrary nesting of raw strings. - rustpkg's remote fetching is fixed, but other problems prevent it from being fully usable right now.
- debuginfo namespace handling has been unified, and marks the ability to build all of Rust (libstd, libextra, compiler and tools) with debuginfo, which is very awesome.
- Small structs are immediate.
- When there are unbalanced delimiters, the opening delimiters leading up to it are printed, avoiding the "Expected a }, saw EOF at line 9001" problem.
- libuv and jemalloc are only built once, rather than once per stage.
- Macros now take attributes and, in turn, can be documented.
- In the opposite direction, macros can now expand to items with attributes.
- There were some minor logging changes, the biggest result of which is that inlined functions won't be logged by the modules they're inlined into.
std::rt::io::native
has been implemented. The idea of this is to live instd::io::native
and to use the OS's native APIs rather than libuv, and also to not require the scheduler or any other runtime support.- rustpkg marks checked out repos as read-only, to prevent modifications.
Weekly Meeting
The weekly
meeting
discussed some administrative things, the removal of crypto code, the removal
of the rust
tool, and functions.
Announcements etc
- rust-fuse - a FUSE userspace library in Rust. This is pure Rust, not using libfuse.
- ears - a simple library for playing sounds.
- rustic - another operating system project.
- Refactoring the milestones on the issue tracker.
- Fn Types in Rust, Take 3 - another attempt at tackling the problems with closures.
- mcpherrin in
#rust
says "Hello, everyone!"