Skip to content

Readme example does not simply compile #611

@kornelski

Description

@kornelski

My first impression of async-std was not positive. I've added it to the project, copy'n'pasted the first example, and I've got:

  1. a compilation error

    2 | #[async_std::main]
      |              ^^^^ could not find `main` in `async_std`
    
  2. and then noticed the explanation that the code used in the readme would be slow to compile. That makes it feel like it's not the best thing to use, and yet it's in the README.

It would be nicer if the first example in the README compiled with default crate features, without need to enable anything first. It's also worse by the fact that the prose just links to documentation that explains features. If the TOML markup enabling the required feature was inline in the README I'd have noticed it. But I didn't read the prose on purpose, since I wanted to jump straight to the code, and ended up disappointed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions