Rust in Action early access progress report - the Mental Health Edition

August/September 2018 progress report for Rust in Action, a book on the Rust programming language for intermediate programmers that teaches Rust via systems programming examples. It’s currently available as an early release text from Manning.

This update describes the two chapters that have been recently released, as well as a number of personal struggles that have hindered progress.

Rust in Action early access progress report - the Mental Health Edition

August/September 2018 progress report for Rust in Action, a book on the Rust programming language for intermediate programmers that teaches Rust via systems programming examples. It’s currently available as an early release text from Manning.

This update describes the two chapters that have been recently released, as well as a number of personal struggles that have hindered progress.

CloudFlare for RSS? Please don't use aggressive settings!

For those using CloudFlare to host RSS feeds (like Rust Herald), please don’t set the protection too aggressively. CloudFlare uses ProjectHoneyPot to get a ‘reputation’ score for an IP address, and I’ve been all week trying to resolve what appears to be a false positive against my server IP address from ProjectHoneyPot, most probably (from the tiny amount of information available) due to someone spamming links to my website, although even that much is unclear. The symptoms are the RSS feeds getting blocked with a CAPTCHA. Neither CloudFlare support/community nor ProjectHoneyPot have really helped. People have only suggested various workarounds, like get a new IP address. It was CloudFlare support that suggested getting site owners to change their settings. The experience has been more than a little Kafkaesque.

Pointers Are Complicated, or: What's in a Byte?

This summer, I will again work (amongst other things) on a “memory model” for Rust/MIR. However, before I can talk about the ideas I have for this year, I have to finally take the time and dispel the myth that “pointers are simple: they are just integers”. Both parts of this statement are false, at least in languages with unsafe features like Rust or C: Pointers are neither simple nor (just) integers.

I also want to define a piece of the memory model that has to be fixed before we can even talk about some of the more complex parts: Just what is the data that is stored in memory? It is organized in bytes, the minimal addressable unit and the smallest piece that can be accessed (at least on most platforms), but what are the possible values of a byte? Again, it turns out “it’s just an 8-bit integer” does not actually work as the answer.

I hope that by the end of this post, you will agree with me on both of these statements. :)

https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html

Thoughts on Compile-Time Function Evaluation and Type Systems

For some time now (since the 1.26 release, to be precise), Rust has a very powerful machinery for CTFE, or compile-time function evaluation. Since then, there have been various discussions about which operations should be allowed during CTFE, which checks the compiler should do, how this all relates to promotion and which kinds of guarantees we should be able to expect around CTFE. This post is my take on those topics, and it should not be surprising that I am going to take a very type-system centric view. Expect something like a structured brain dump, so there are some unanswered questions towards the end as well.

https://www.ralfj.de/blog/2018/07/19/const.html

rpds: Rust Persistent Data Structures v0.5.0 - Now with fast mutable methods

rpds: Rust Persistent Data Structures v0.5.0 - Now with fast mutable methods

Safe Intrusive Collections with Pinning

In my last post, I talked about the new “pinned references” which guarantee that the data at the memory it points to will not, ever, be moved elsewhere. I explained how they enable giving a safe API to code that could previously only be exposed with unsafe, and how one could go about proving such a thing. This post is about another application of pinned references—-another API whose safety relies on the pinning guarantees: Intrusive collections. It turns out that pinned references can almost be used for this, but not quite. However, this can be fixed by extending the guarantees provided by pinned references, as suggested by @cramertj.

https://www.ralfj.de/blog/2018/04/10/safe-intrusive-collections-with-pinning.html

A Formal Look at Pinning

Recently, a new API for “pinned references” has landed as a new unstable feature in the standard library. The purpose of these references is to express that the data at the memory it points to will not, ever, be moved elsewhere. Others have written about why this is important in the context of async IO. The purpose of this post is to take a closer, more formal look at that API: We are going to take a stab at extending the RustBelt model of types with support for pinning.

https://www.ralfj.de/blog/2018/04/05/a-formal-look-at-pinning.html

Rust-webapp-starter : Rust single page webapp written in actix-web with vuejs.

Rust-webapp-starter : Rust single page webapp written in actix-web with vuejs.

https://github.com/OUISRC/Rust-webapp-starter

  • Async stable Actix-web framework

  • diesel, postgresql r2d2

  • SPA CORS JWT

  • Vuejs Parcel-bundler

actix-web framework is cool tool for rust web tthings !

rpds: persistent data structures in rust v0.4.0

Rust persistent data structures v0.4.0 https://github.com/orium/rpds

Sharing for a Lifetime

An in-depth look at shared references and interior mutability: https://www.ralfj.de/blog/2018/01/31/sharing-for-a-lifetime.html

LDN Talks: January 2018

Join us next Monday for your monthly installment of Rust related talks. https://www.meetup.com/Rust-London-User-Group/events/246637221/ #rustlang #ldn

Telegram Resources for Rustaceans

Channel: https://t.me/rustLangUnofficial Chat: https://t.me/rustLangChat

Spherical Cow v0.1

If you need to pack a whole heap of spheres into arbitrary geometry, spherical-cow has you covered.

In vacuum even

RustBelt conference talk

Last week, I was in Los Angeles at POPL 2018 to present our RustBelt paper. The talk has been recorded, so if you want to get a 20-minute summary of the paper, go watch it on YouTube.

This is how you make your rust application available to FreeBSD users

https://medium.com/@andoriyu/this-is-how-you-can-port-your-rust-application-to-freebsd-7d3e9f1bc3df

Ammonia 1.0.0 final

The Rust HTML sanitizer, based on html5ever, is now stable, with an API that allows extensions and performance tuning in the future.

https://github.com/notriddle/ammonia/releases/tag/v1.0.0

RustBelt: Securing the Foundations of the Rust Programming Language [final version]

The final version of the RustBelt paper is ready. It is 4 pages longer than the submitted one we shared earlier this year, containing much more details about the type system :)

https://plv.mpi-sws.org/rustbelt/popl18/

Dev diary. Tips for working with C from Rust

I’ve written an article that answers questions I’ve been asking when I was working with C library from Rust.

https://medium.com/@andoriyu/forbidden-diaries-of-pandemonium-part-1-tips-for-calling-c-from-rust-3b9667f07398

[first real crate] Rust bindings to libnv

Hey, so I’m working lib rust library that can manipulate FreeBSD’s jails, but in order to do so I have to interact with ZFS and in order to do so I must be able to construct Name/Value lists. Turns out it was a good library to learn about FFI wrappers.

https://github.com/Inner-Heaven/libnv-rs Comments very welcome.