
Rust 1.39 - bilalhusain
https://blog.rust-lang.org/2019/11/07/Rust-1.39.0.html
======
est31
An important bugfix in 1.39.0 that wasn't mentioned in the release
announcement is probably: [https://github.com/rust-
lang/rust/pull/63402](https://github.com/rust-lang/rust/pull/63402)

It's important because unless rustfmt is available, bindgen would put
everything onto one line: [https://github.com/rust-lang/rust-
bindgen/issues/1600](https://github.com/rust-lang/rust-bindgen/issues/1600)

Rustc would generate (unrelated) warnings for the generated code but before
the bugfix it'd print the entire line, hitting the maximum log size limit on
CI and causing the build to fail because of that.

~~~
bilalhusain
Another fix (one mentioned in detailed release notes) is where asinh(-0.0)
used to return 0.0

These unexpected behaviours are tough to nail down when one is trying to get
the code/setup working. Really appreciate the time these fixes potentially
save for future users. The complex nature probably also hints at maturity of
Rust codebase.

------
Koshkin
>

    
    
        #[cfg(windows)] slice: &[u16]
    

Am I the only one who finds this syntax ugly - to the point of being
inappropriate for a general-purpose programming language?

~~~
orthecreedence
As someone who uses rust a fair amount, I can say that the syntax looks pretty
normal to me. It's saying "only define this field if we're compiling on
windows." I parsed that out immediately.

Maybe it just takes a bit of familiarity with the language, but everything
does fit together really well after the initial learning phases.

------
ComputerGuru
Discussion here:
[https://news.ycombinator.com/item?id=21473259](https://news.ycombinator.com/item?id=21473259)

~~~
steveklabnik
They're two different things; this post is the general release announcement,
that post is a deep dive on one specific feature.

That said, only one or the other should probably be on HN; it's a tough call
as to which. This post is more general, but people are going to care about
async/await more than anything else...

~~~
bilalhusain
Completely agree. That ways discussion would be at one place and front page
won't be hogged with possible duplicates.

Right now the other post is enjoying more attention and has meaningful
engaging discussion. Requesting @dang to remove this (21473257) from front
page and possibly tag the other one (21473259) with 1.39.0 release.

------
ossworkerrights
Time to give this lang a try. Been wanting to build a web assembly large data
table mechanism for a while, and rust appears to be an idea candidate from
what i read (speed and reliability). Although it could be done using SQLite, i
think could be a nice little project for learning Rust.

~~~
TazeTSchnitzel
It's a pleasant suprise how easy targeting wasm is from Rust. Just pass on the
right `--target` flag to `cargo build` if you have the toolchain installed.

~~~
MaulingMonkey
And installing the right target is typically as simple as:

    
    
        rustup target add wasm32-unknown-unknown
    

Targeting browser APIs is a little more involved, generally requiring either:

    
    
        cargo install cargo-web
        cargo web build [...]
    

for stdweb, or for web-sys:

    
    
        cargo install wasm-pack
        wasm-pack build [...]

