Rust daily 20191010 async enters the stage of improvement

Time:2021-11-26

Async foundation update: it’s time to start improving!

Blog update from rust official blog: you may have heard of it recently  async-await  The function is logged in  Rust beta  Branch. This is a milestone in the availability of rust async. However, there is still a lot of work to be done. As we mentioned in our main post, the recent focus of async foundations WG (async infrastructure Working Group) will be to improve, improve and (more) improve!

In particular, we want to check the to-do list for strange diagnosis, poor performance and occasional type failure. This is a change: in the past, we could focus on what really hinders stability, but now we have a lot of mistakes and often have no clear priorities. This requires us to change the way async foundations WG operates.

This is something worthy of our attention. For details, please see the original text:https://blog.rust-lang.org/inside-rust/201…

Webassembly.sh Online

Webassembly.sh is an online webassembly terminal that can run Wasi module directly on the browser.

Following last week’s announcement  Wasmer-JS, we announced back-to-back that webassembly.sh is also online.

Rust daily 20191010 async enters the stage of improvement

Webassembly.sh currently provides the following functions:

  • Webassembly.sh is a sandboxed method that can quickly test or try to compile programs to Wasi without installing binaries on the local machine.
  • Developers who write WASI modules can use WebAssembly.sh to debug and test them in the browser.
  • People who want to have some fun can run Python rustpython and even output color pictures of kittens or a cow!
  • There are more to explore

Original address:https://medium.com/wasmer/webassembly-sh-4…

Reddit Click to learn more

Alpha release of reqwest

reqwest  Is based on  hyper  High level HTTP client. Now support  async/await  Alpha version of the property.

at presentreqwestThe characteristics worth explaining are as follows:

  • New pair  std::future::Future  Support.
  • New experimental wasm support.
  • Change the default client API to  async  Migrate the previous synchronization API to  reqwest::blocking
  • More features are designed as optional forms, which can reduce unnecessary dependencies (for example:blockingcookiesgzipjson

For more information, see:https://t.co/qDcL5N2ng0?amp=1

This error: a convenient derived (error)

This library is a standard library  std::error:: error  Trait provides a convenient derived macro.

Use example:

use thiserror::Error;

#[derive(Error, Debug)]
pub enum DataStoreError {
    #[error("data store disconnected")]
    Disconnect(#[source] io::Error),
    #[error("the data for key `{0}` is not available")]
    Redaction(String),
    #[error("invalid header (expected {expected:?}, found {found:?})")]
    InvalidHeader {
        expected: String,
        found: String,
    },
    #[error("unknown data store error")]
    Unknown,
}

For more information, see GitHub warehouse:https://github.com/dtolnay/thiserror

To participate in reddit discussion, please click

Original text:https://rust.cc/article?id=45d61b8e-e828-4…

This work adoptsCC agreement, reprint must indicate the author and the link to this article