wasefire_cli_tools/lib.rs
1// Copyright 2024 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Provides command-line utilities for Wasefire CLI.
16//!
17//! This library is also used for the internal maintenance CLI of Wasefire called xtask.
18
19#![feature(async_fn_track_caller)]
20#![feature(doc_auto_cfg)]
21#![feature(never_type)]
22#![feature(path_add_extension)]
23#![feature(try_blocks)]
24#![feature(try_find)]
25
26macro_rules! debug {
27 ($($x:tt)*) => {
28 if log::log_enabled!(log::Level::Warn) {
29 print!("\x1b[1;36m");
30 print!($($x)*);
31 println!("\x1b[m");
32 }
33 };
34}
35
36#[cfg(feature = "action")]
37pub mod action;
38#[cfg(feature = "cargo")]
39pub mod cargo;
40#[cfg(feature = "changelog")]
41pub mod changelog;
42pub mod cmd;
43pub mod error;
44pub mod fs;