Developers Club geek daily blog

Architecture of Servo

1 year, 3 months ago
From the translator. Allow to submit on court of a habrasoobshchestvo transfer parts of documentation on the browser Servo engine. This engine is developed by community Mozilla in the Rust language, and is, perhaps, the biggest active project in this language. In this document it is told about architecture of the engine as developers use Rust together with C ++ and what difficulties they faced when developing. The original is available in project wiki on github.

It is very surface overview of architecture Servo. Servo remains a prototype, and some parts of architecture are not presented in the code form yet. Some important aspects of system were not in detail considered yet.

Overview and purposes



Read more »


Rust in 2016

1 year, 3 months ago
2015 was considerable year for Rust: we released version 1.0, stabilized the majority of elements of language and a heap of libraries, considerably grew up as community, and also release 1.0), but it will be super-important year for Rust in which there will be many fascinating things. In this article I will tell that as I think, has to occur. It is not an official position and not the promise of the Rust developers.

2015


Before we talk about the future, here several digits for last year:

In 2015 by forces of community Rust:

  • 331 suggestions for improvement of language (RFC) are created
    • from which 161 were accepted and poured in the main repository
    • only 120 people gave RFC, from them 6 people created 10 and more, Alex Crichton created 23 RFC
  • 559 tasks of improvement of RFC are created
  • It is sent and poured in a repository of Rust 4630 of Pull-requests
    • which authors are 831 persons, from them 91 created more than 10 requests, 446 people created only one, and Steve Klabnik was the author of 551 pull-requests
  • 4710 tasks are created
    • from which 1611 are still open
    • which authors are 1319 people from whom 79 created more than 10, and Alex Crichton opened only 159 tasks
  • Six stable releases of Rust (1.0 - 1.5) are let out
  • Stability of Rust – 96% of packets which were compiled on 1.0 is maintained, are still compiled with use of version 1.5

Read more »


Creation of function on Rust which returns String or &str;

1 year, 3 months ago

From the translator


КДПВ It is the last article from a cycle about work with lines and memory in Rust from Herman Radtke which I transport. Me it seemed to the most useful, and initially I wanted to begin transfer with it, but then it seemed to me that other articles in a series are necessary too, for creation of a context and introduction to simpler, but very important, the language moments without which this article loses the usefulness.


We learned how to create function which accepts String or &str; (English) as argument. Now I want to show you how to create function which returns String or &str;. Still I want to discuss why it can be necessary for us.

Read more »


String and &str; in the Rust functions

1 year, 3 months ago
КДПВ
This post is devoted to all those who is confused by need to use to_string(), to force programs to be compiled. And I hope to shed a little light on a question of why in Rust two line types String and &str;.

Read more »


Creation of function on Rust which accepts String or &str;

1 year, 3 months ago

From the translator


КДПВArticle — one of a series of the posts telling about use of some useful library types and the related idioms of Rust on the example of line data types. Information undoubtedly useful both for the beginning programmers on Rust, and for those that already managed to try a little this language, but yet not absolutely accustomed with rich library of types. The original post contains several inaccuracies and typographical errors in a code which I tried to correct in translation process, however in general the described approaches and motivation correct, suitable under concept "the best the practician", and therefore deserve attention.


In my last post we spoke about use much &str; as preferable type for the functions accepting line arguments. Closer to the end of a post we discussed when it is better to use String, and when &str; in structures (struct). Though I think that in general council is good, but in certain cases use &str; instead of String not optimum. For such cases we need other strategy.

Read more »


Framework for procedural macroes in Rust

1 year, 3 months ago

From the translator


Procedural macroes — one of the most expected Rust features. At the moment it is possible to write procedural macroes only under the unstable version of the compiler though there are several containers, like syntex, allowing to do a limited kodogeneration within the stable compiler. However it especially does not facilitate a situation as the interface to AST remains unstable, and though authors of syntex try to go in step with night assemblies, sometimes there are feyla because of changes in structure of AST.
In it the blog a post one of participants of core team — Nick Cameron — shared the vision of the future of procedural macroes. Though the post is complete of technical details on compiler interiors, it seemed to me that to a habrasoobshchestvo can be interesting to glance a little behind the scenes of development of Rust.

Framework for procedural macroes


In this post I will tell how, in my opinion, procedural macroes have to look. I already told about syntax in other post and when we publish API for procedural macroes, I will write a post and about it. I already described a number of changes in system of macroes so here I in something will repeat (partly contradicting last post), but I will disclose more details.

Read more »


We compare swift and rust

1 year, 4 months ago

The publication of the source code of the swift language became a reason for writing of article — it became interesting to me to get acquainted with it closer. At once similarity of syntax with other young programming language under the name rust was evident, besides behind similar syntactic constructions also the similar scope of these languages was browsed. Both languages have strong static typification with a local output of types, both are compiled directly in machine code. Both those and other languages absorbed in themselves many acceptances from the world of functional programming. And swift and rust have means for start of the code written on C that allows to write without effort wrappers over a huge number of libraries. Both languages are considered as replacement to the existing system C, C languages ++, ObjectiveC. So in them the general and what differs?

Read more »


We begin to use Rust

1 year, 5 months ago


Hi everyone!
Since recent time I began to learn the fine Rust language. For myself I see practical application of this language in embedding to places of a code, critical on performance (at least, until "ripening" and an obrastaniye by libraries and frameworks).

For fixing of theoretical skills I decided to make the small project which essence is as follows: the dynamic library on Rust implements the simplified option of Algorithm of shingl and by means of FFI allows to connect its (library). To all whom interestingly I ask under kat.

Read more »


Error handling in Rust

1 year, 5 months ago
As well as many programming languages, Rust urges the developer to process by a certain method errors. In general, there are two general approaches of error handling: by means of exceptions and through returned values. And Rust prefers returned values.

In this article we intend to state in detail work with errors in Rust. Moreover, we will try to plunge over and over again into error handling from the different parties so in the end you will have a sure practical idea of how all this meets together.

In naive implementation error handling in Rust can look verbose and irritating. We will consider the main stumbling blocks, and also we will show how to make error handling laconic and convenient, using standard library.

Read more »


We create REST service on Rust. Part 5: processors, refactoring, and macroes

1 year, 5 months ago

Read more »