Rust is a systems programming language with massive ambitions. It is designed for creating the most reliable software, from the tiniest embedded systems to multi-million line behemoths, and its users need to have confidence that it is fit for purpose. In service of this ambition Rust has an extremely thorough testing regimen, and that is one of the things I am most proud of about Rust. Rust has a
A Practical Intro to Macros in Rust 1.0 One feature of Rust that I'm rather enamoured with is its macro system. Known as "macro by example" (MBE) or sometimes referred to as macro_rules, it provides you with an impressive amount of power whilst not allowing for the sort of evil tricks you can pull in C/C++. The purpose of this article is to go through the process by which I wrote one particular ma
Writing parsers like it is 2017 Pierre Chifflier Agence Nationale de la Sécurité des Systèmes d’Information Geoffroy Couprie Clever Cloud Abstract—Despite being known since a long time, memory violations are still a very important cause of security problems in low-level programming languages containing data parsers. We address this problem by proposing a pragmatic solution to fix not only bugs, b
About This project demonstrates a complete, albeit simple, example of integrating Rust code into a web application. This is accomplished by compiling Rust to asm.js or WebAssembly. The basic design pattern this project explores uses Rust to implement CPU bound portions of an app while using existing web technologies to handle user facing, I/O bound pieces. The guide explores this design pattern in
はじめに Rustには有名なnomというパーサーコンビネーターライブラリがあるが、せっかく高級な型システムと最適化があるのにマクロで何とかしようとするのは勿体無いと思うので、マクロに深く依存しないcombineを使ってみた。 combineの主な特徴 parsec リスペクトのパーサーコンビネーター コンビネーターはマクロではなく、 Parser traitを実装する値で表す バイトストリーム、文字(Unicodeコードポイント)ストリーム、トークンストリームの全てに対応 メモリ上の文字列だけではなく、入力ストリームからの直接のパースにも対応 まだ計測はしていないが、 Box を多用していたりはしないので、速度的に大きく遅れをとるようなことはないのではないかと思う。 以下、parsecについて知っていたほうが読みやすい構成になっているので、必要ならparsecの資料を探して読むといいかもし
Recently I started working on a GitHub bot similar to Bors in my spare time. I decided that I wanted to make the overhead as small as possible and to use futures to harness the power of asynchronous requests. While hyper hasn't fully switched over to this and released yet I decided to experiment with it and get a server that could take in webhook requests from GitHub and serialize it to a generic
The existence of libraries with nice, user-friendly interfaces is one of the most important factors when choosing a programming language. Here are some tips on how to write libraries with nice APIs in Rust. (Many of the points also apply to other languages.) You can also watch my talk at Rustfest 2017 about this! Update 2017-04-27: Since writing that post, @brson of the Rust Libs Team has publishe
Reenix: Implementing a Unix-Like Operating System in Rust Alex Light (alexander light@brown.edu) Advisor: Tom Doeppner Reader: Shriram Krishnamurthi Brown University, Department of Computer Science April 2015 Abstract This paper describes the experience, problems and successes found in implementing a unix-like operating system kernel in rust. Using the basic design and much of the lowest-level sup
Some of the first Rust code I wrote was a struct with a &str field. As you might imagine, the borrow checker didn’t let me do a lot of things, and the API ergonomics were limited. This article aims to demonstrate the issues with having raw &str references in structs, introduce some intermediate APIs that alleviate the ergonomics but aren’t necessarily efficient, and end with an implementation that
Portable SSH client and server library Thrussh is the first Rust SSH library. The only non-Rust part is the crypto backend (handled by https://briansmith.org/rustdoc/ring/). This means that this library will never be subject to buffer overruns, double frees, etc. It is designed to work on any platform, and to work with asynchronous IO. This also allows it to be as fast as others, since less time i
ripgrep is faster than {grep, ag, git grep, ucg, pt, sift} In this article I will introduce a new command line search tool, ripgrep, that combines the usability of The Silver Searcher (an ack clone) with the raw performance of GNU grep. ripgrep is fast, cross platform (with binaries available for Linux, Mac and Windows) and written in Rust. ripgrep is available on Github. We will attempt to do the
Key takeaways The traits in std::convert provide a uniform API for converting values to other types From<T> and Into<U> are for conversions that cannot fail and consume the original value From<T> for U converts a value of type T into one of type U Into<U> for T inverts From<T>’s subject-object relationship Implementing From<T> for U gives us an automatically derived Into<U> for T implementation Tr
Rustlog ⋅ 2016-06-02 23:58 +09:00 Update (2016-10-07): The official FAQ has an entry for this exact problem now. I'll leave this post as more curiously minded people. See also the /r/rust discussion and Hacker News thread at the time of writing. Do you want a quick takeaway? Go to the end of post. Suppose that you are a programmer primarily working with compiled languages. Somehow you’ve gotten ti
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く