summaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: f1fce9f9b2c236880f9748880050064266232651 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_std::io::WriteExt as _;

async fn async_main() -> anyhow::Result<()> {
    async_std::io::stdout().write_all(b"hello world\n").await?;
    Ok(())
}

fn main() {
    match async_std::task::block_on(async_main()) {
        Ok(_) => (),
        Err(e) => {
            eprintln!("nbsh: {}", e);
            std::process::exit(1);
        }
    };
}