netcorehost 0.20.1

A Rust library for hosting the .NET Core runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use netcorehost::{nethost, pdcstr};

fn main() {
    let hostfxr = nethost::load_hostfxr().unwrap();
    let context = hostfxr
        .initialize_for_dotnet_command_line(pdcstr!(
            "examples/run-app/ExampleProject/bin/Debug/net10.0/ExampleProject.dll"
        ))
        .unwrap();
    context.run_app().as_hosting_exit_code().unwrap();
}