ZeroMQ is a language-independent messaging solution. It's not a full-fledged system such as for example RabbitMQ, basically it's just a transport layer. From the programmer's perspective working with it doesn't differ much from ordinary sockets, but there's a lot of power hidden underneath. The zeromq crate is a native Rust implementation and while still lacking a lot of features, it is already usable today.Continue reading »
A few days ago the Rust subreddit got excited about the rebirth of rusti - an interactive shell for Rust. Such interpreters (sometimes called REPLs - read-eval-print loop) are the bread and butter of dynamic languages like Lisp, Python or Ruby. But that is not a requirement - as Haskell demonstrates with its GHCi, you can have a REPL for a statically typed, compiled language too.
rusti is an attempt to build such an interpreter for Rust.
Today I'm revisiting the topic of database access in Rust. I mentioned PostgreSQL client library a week ago. This time we'll move from SQL to NoSQL land. Our focus for today will be Redis - a data structure server. The redis crate is a client library to access Redis from Rust.Continue reading »
In Rust there is no concept of a constructor as a language feature, like for example in C++. However there is a strong convention (and mentioned in the guidelines) to use a static method called
new as the constructor. This works well, but you can have only one function called
new in the
impl - there is no method overloading. So are we out of luck if we want to have different constructors? No! But arguably different purposes should imply different method names, so another convention is to prefix extra constructors with
with_ (such as Vec::with_capacity) or
from_, if the constructor does some kind of a conversion.
We finished part 1 with a working FUSE filesystem representing an empty directory. Today we will continue the story and finally add some files to the mix.Continue reading »