Function arti::main

source ·
pub fn main()
Expand description

Main program, callable directly from a binary crate’s main

This function behaves the same as main_main(), except:

  • It takes command-line arguments from std::env::args_os rather than from an argument.
  • It exits the process with an appropriate error code on error.

§⚠️ Warning ⚠️

Calling this function, or the related experimental function main_main, is probably a bad idea for your code. It means that you are invoking Arti as if from the command line, but keeping it embedded inside your process. Doing this will block your process take over handling for several signal types, possibly disable debugger attachment, and a lot more junk that a library really has no business doing for you. It is not designed to run in this way, and may give you strange results.

If the functionality you want is available in arti_client crate, or from a non-experimental API in this crate, it would be better for you to use that API instead.

Alternatively, if you do need some underlying function from the arti crate, it would be better for all of us if you had a stable interface to that function. Please reach out to the Arti developers, so we can work together to get you the stable API you need.