1#![warn(clippy::all, clippy::pedantic, clippy::undocumented_unsafe_blocks)]
2#![allow(
3 clippy::let_underscore_untyped,
4 reason = "https://github.com/rust-lang/rust-clippy/pull/10442#issuecomment-1516570154"
5)]
6#![allow(
7 clippy::question_mark,
8 reason = "https://github.com/rust-lang/rust-clippy/issues/8281"
9)]
10#![allow(clippy::manual_let_else, reason = "manual_let_else was very buggy on release")]
11#![allow(clippy::missing_errors_doc, reason = "A lot of existing code fails this lint")]
12#![allow(
13 clippy::unnecessary_lazy_evaluations,
14 reason = "https://github.com/rust-lang/rust-clippy/issues/8109"
15)]
16#![cfg_attr(
17 test,
18 allow(clippy::non_ascii_literal, reason = "tests sometimes require UTF-8 string content")
19)]
20#![allow(unknown_lints)]
21#![warn(
22 missing_copy_implementations,
23 missing_debug_implementations,
24 missing_docs,
25 rust_2024_compatibility,
26 trivial_casts,
27 trivial_numeric_casts,
28 unused_qualifications,
29 variant_size_differences
30)]
31#![forbid(unsafe_code)]
32
33#![doc(html_favicon_url = "https://www.artichokeruby.org/favicon-32x32.png")]
47#![doc(html_logo_url = "https://www.artichokeruby.org/artichoke-logo.svg")]
48
49use std::io::{self, Write};
50use std::process;
51
52use artichoke::repl;
53use termcolor::{ColorChoice, StandardStream, WriteColor};
54
55fn main() {
56 let mut stderr = StandardStream::stderr(ColorChoice::Auto);
57 if let Err(err) = repl::run(io::stdout(), &mut stderr, None) {
58 let _ignored = stderr.reset();
63 let _ignored = writeln!(stderr, "{err}");
64 process::exit(1);
65 }
66}