1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// vize_carton defines and bridges std types, so it needs to use them directly.
//! Carton - The artist's toolbox for Vize.
//!
//! This crate provides the foundational utilities and data structures for the Vize compiler,
//! much like a carton (artist's portfolio case) holds all the essential tools and materials
//! an artist needs for their work.
//!
//! # Modules
//!
//! - **Allocator**: Arena-based memory allocation for efficient AST construction
//! - **Shared utilities**: DOM configuration, optimization flags, and helper functions
//!
//! # Example
//!
//! ```
//! use vize_carton::{Allocator, Box, Vec};
//!
//! let allocator = Allocator::default();
//!
//! // Allocate a boxed value
//! let boxed = Box::new_in(42, allocator.as_bump());
//! assert_eq!(*boxed, 42);
//!
//! // Create a vector
//! let mut vec = Vec::new_in(allocator.as_bump());
//! vec.push(1);
//! vec.push(2);
//! vec.push(3);
//! assert_eq!(vec.len(), 3);
//! ```
// Allocator modules
// Shared modules
// Re-export allocator types
pub use Allocator;
pub use Box;
pub use CloneIn;
pub use Vec;
// Re-export bumpalo types for convenience
pub use Bump;
pub use String as BumpString;
pub use Vec as BumpVec;
// Re-export compact_str::CompactString for convenience
pub use CompactString;
pub use CompactString as String;
pub use ToCompactString;
// Re-export smallvec for stack-optimized collections
pub use ;
// Re-export bitflags for flag types
pub use bitflags;
// Re-export rustc-hash for fast hash maps/sets
pub use ;
// Re-export phf for compile-time perfect hash functions
pub use ;
// Re-export shared utilities
pub use *;
pub use *;
pub use *;