Skip to content

Commit 9da0973

Browse files
Document large input behavior and compilation limits (#45)
1 parent 160b9cd commit 9da0973

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
//! Bytes converts literals into an array of bytes.
22
//!
33
//! Currently supports only integer literals of unbounded size.
4+
//!
5+
//! The macros are intended for small byte inputs. There is no arbitrary limit,
6+
//! but very large inputs may result in long compilation times. For large amounts
7+
//! of bytes, store the bytes in a file and use [`include_bytes!`] instead.
48
59
mod bytes;
610
mod bytesmin;
@@ -22,6 +26,11 @@ extern crate proc_macro;
2226
///
2327
/// Decimal and octal literal forms are not supported.
2428
///
29+
/// This macro is intended for small byte inputs. There is no arbitrary limit,
30+
/// but very large inputs may result in long compilation times. For large
31+
/// amounts of bytes, store the bytes in a file and use [`include_bytes!`]
32+
/// instead.
33+
///
2534
/// ### Examples
2635
///
2736
/// ```
@@ -66,6 +75,11 @@ pub fn bytes(input: TokenStream) -> TokenStream {
6675
///
6776
/// To preserve leading zeros, use [`bytes!`].
6877
///
78+
/// This macro is intended for small byte inputs. There is no arbitrary limit,
79+
/// but very large inputs may result in long compilation times. For large
80+
/// amounts of bytes, store the bytes in a file and use [`include_bytes!`]
81+
/// instead.
82+
///
6983
/// ### Examples
7084
///
7185
/// ```

0 commit comments

Comments
 (0)