Skip to main content

Crate vize_carton

Crate vize_carton 

Source
Expand description

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
  • Telegraph: Generic message fan-out for report emitters

§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);

Re-exports§

pub use dom_tag_config::*;
pub use flags::*;
pub use general::*;

Modules§

config
Shared Vize configuration loading.
corsa_resolver
Unified Corsa/tsgo executable discovery.
dialect
Vue dialect profiles and structural petite-vue detection.
directive
Vize comment directive parsing.
dom_tag_config
DOM tag configuration shared between compiler-dom and runtime-dom.
flags
Optimization flags shared between compiler and runtime.
general
General utility functions shared across the compiler.
hash
Fast hashing utilities using xxHash3.
i18n
Internationalization (i18n) foundation for Vize.
line_index
Byte-offset to (line, UTF-16 column) mapping for LSP coordinates.
lsp
Generic LSP (Language Server Protocol) client utilities.
path
Filesystem path helpers shared by CLI and native type-checking code.
profiler
Lightweight profiling utilities for performance monitoring.
source_range
Source range utilities for position tracking.
string_builder
String builder utilities for efficient string construction.
telegraph
Generic message fan-out for compiler reports and tool integrations.

Macros§

append
Push formatted content to a string using write!.
appendln
Push a line (with newline) to a string efficiently.
appends
Push multiple items to a string efficiently.
bitflags
Generate a flags type.
cstr
Create a new [CompactString] using format arguments.
phf_map
phf_set
profile
Macro for profiling a block of code.
smallvec
Creates a SmallVec containing the arguments.

Structs§

Allocator
Arena allocator for Vize.
Box
An owned pointer to a bump-allocated T value, that runs Drop implementations.
Bump
An arena to bump allocate into.
BumpString
A UTF-8 encoded, growable string.
BumpVec
A contiguous growable array type, written Vec<'bump, T> but pronounced ‘vector’.
CompactString
A CompactString is a compact string type that can be used almost anywhere a String or str can be used.
PhfMap
An immutable map constructed at compile time.
PhfSet
An immutable set constructed at compile time.
SmallVec
A Vec-like container that can store a small number of elements inline.
String
A CompactString is a compact string type that can be used almost anywhere a String or str can be used.
Vec
A contiguous growable array type, written Vec<'bump, T> but pronounced ‘vector’.

Traits§

CloneIn
Trait for cloning a value into an arena allocator.
ToCompactString
A trait for converting a value to a CompactString.

Type Aliases§

FxHashMap
Type alias for a hash map that uses the Fx hashing algorithm.
FxHashSet
Type alias for a hash set that uses the Fx hashing algorithm.