/news/2018/09/08.md
https://github.com/RustStudy/rust_daily_news · Markdown · 78 lines · 46 code · 32 blank · 0 comment · 0 complexity · b344050f61cafcacfd556bf21521761a MD5 · raw file
- ### Ripgrep 0.10.0 发布
- [原文](https://github.com/BurntSushi/ripgrep/releases/tag/0.10.0)
- ---
- ### wasm实现的rustfmt
- 运行于网页
- [rustfmt-wasm](https://alexcrichton.github.io/rustfmt-wasm/)
- ---
- ### Tower Web: 扩展中间件堆栈
- tower-web 0.2.2发布。基于tower stack构建的HTTP Web框架。 这篇文章主要介绍tower-web的中间件。
- ```rust
- pub trait Middleware<S> {
- /// The wrapped service request type
- type Request;
- /// The wrapped service response type
- type Response;
- /// The wrapped service's error type
- type Error;
- /// The wrapped service
- type Service: Service<Request = Self::Request,
- Response = Self::Response,
- Error = Self::Error>;
- /// Wrap the given service with the middleware, returning a new service
- /// that has been decorated with the middleware.
- fn wrap(&self, inner: S) -> Self::Service;
- }
- ```
- 如果要实现一个记录日志的中间件,需要:
- - 实现LogService,处理日志记录,实现Service trait
- - 实现LogMiddleware,将日志记录添加到中间件堆栈中, 实现Middleware trait
- - ResponseFuture ,如果中间件需要响应请求时可以采取的操作。
- tower-web的中间件计划提供标准化的服务。接下来会把中间件提取出独立的库,然后考虑tower-web和wrap合并的计划。
- [log示例]( https://github.com/carllerche/tower-web/tree/master/src/middleware/log)
- [原文](https://medium.com/@carllerche/tower-web-expanding-the-middleware-stack-f9bf55bfa109)
- ---
- ### 一个简单的时间序列数据库实现
- [sonnerie](https://github.com/njaard/sonnerie)
- ---
- ### 「德国」VMRay正在招聘Rust开发人员!
- 该公司业务是自动化恶意软件分析。 需要使用Rust来重构现有软件性能敏感的部分。可惜不接受远程。
- [原文](https://www.reddit.com/r/rust/comments/9dmc35/job_offer_rust_developer_at_vmray/)
- ---
- ### Hadoop Streaming 和 MapReduce的Rust绑定
- [efflux](https://github.com/whitfin/efflux)
- ---
- - ( 每日新闻[备份地址](https://github.com/RustStudy/rust_daily_news) )
- - [Telgram Channel : https://t.me/rust_daily_news ](https://t.me/rust_daily_news )