xrpl_hooks/lib.rs
1//! XRPL Hooks API
2//!
3//! This crate allows you to write XRPL hooks in Rust.
4//!
5//! Before you begin, it is highly recommended that you read
6//! the [official docs](https://xrpl-hooks.readme.io/) carefully.
7//!
8//! # Examples
9//!
10//! For a quick start and to view examples,
11//! use the [hook template](https://github.com/otov4its/xrpl-hook-template/)
12
13#![no_std]
14#![deny(
15 warnings,
16 clippy::all,
17 missing_copy_implementations,
18 missing_docs,
19 rustdoc::missing_crate_level_docs,
20 rustdoc::missing_doc_code_examples,
21 non_ascii_idents,
22 unreachable_pub
23)]
24#![doc(test(attr(deny(warnings))))]
25#![doc(html_root_url = "https://docs.rs/xrpl-hooks/0.3.1")]
26
27mod macros;
28
29/// # Low-level unsafe C bindings
30///
31/// Use very carefully if at all necessary.
32pub mod _c;
33
34/// XRPL Hooks API
35pub mod api;
36
37/// A few utilities
38pub mod helpers;
39
40// Prelude
41pub use {api::*, helpers::*};
42
43#[cfg(not(test))]
44use core::panic::PanicInfo;
45/// You should use rollback() instead of native panic!() macro
46#[cfg(not(test))]
47#[inline(always)]
48#[panic_handler]
49fn panic(_: &PanicInfo<'_>) -> ! {
50 loop {}
51}