/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

  1. ### Ripgrep 0.10.0 发布
  2. [原文](https://github.com/BurntSushi/ripgrep/releases/tag/0.10.0)
  3. ---
  4. ### wasm实现的rustfmt
  5. 运行于网页
  6. [rustfmt-wasm](https://alexcrichton.github.io/rustfmt-wasm/)
  7. ---
  8. ### Tower Web 扩展中间件堆栈
  9. tower-web 0.2.2发布基于tower stack构建的HTTP Web框架 这篇文章主要介绍tower-web的中间件
  10. ```rust
  11. pub trait Middleware<S> {
  12. /// The wrapped service request type
  13. type Request;
  14. /// The wrapped service response type
  15. type Response;
  16. /// The wrapped service's error type
  17. type Error;
  18. /// The wrapped service
  19. type Service: Service<Request = Self::Request,
  20. Response = Self::Response,
  21. Error = Self::Error>;
  22. /// Wrap the given service with the middleware, returning a new service
  23. /// that has been decorated with the middleware.
  24. fn wrap(&self, inner: S) -> Self::Service;
  25. }
  26. ```
  27. 如果要实现一个记录日志的中间件需要
  28. - 实现LogService处理日志记录实现Service trait
  29. - 实现LogMiddleware将日志记录添加到中间件堆栈中 实现Middleware trait
  30. - ResponseFuture 如果中间件需要响应请求时可以采取的操作
  31. tower-web的中间件计划提供标准化的服务接下来会把中间件提取出独立的库然后考虑tower-web和wrap合并的计划
  32. [log示例]( https://github.com/carllerche/tower-web/tree/master/src/middleware/log)
  33. [原文](https://medium.com/@carllerche/tower-web-expanding-the-middleware-stack-f9bf55bfa109)
  34. ---
  35. ### 一个简单的时间序列数据库实现
  36. [sonnerie](https://github.com/njaard/sonnerie)
  37. ---
  38. ### 德国VMRay正在招聘Rust开发人员
  39. 该公司业务是自动化恶意软件分析 需要使用Rust来重构现有软件性能敏感的部分可惜不接受远程
  40. [原文](https://www.reddit.com/r/rust/comments/9dmc35/job_offer_rust_developer_at_vmray/)
  41. ---
  42. ### Hadoop Streaming MapReduce的Rust绑定
  43. [efflux](https://github.com/whitfin/efflux)
  44. ---
  45. - ( 每日新闻[备份地址](https://github.com/RustStudy/rust_daily_news) )
  46. - [Telgram Channel https://t.me/rust_daily_news ](https://t.me/rust_daily_news )