| Crates.io | vize_carton |
| lib.rs | vize_carton |
| version | 0.0.1-alpha.31 |
| created_at | 2026-01-11 14:27:41.357877+00 |
| updated_at | 2026-01-12 12:37:44.097626+00 |
| description | Carton - The artist's toolbox for Vize compiler |
| homepage | |
| repository | https://github.com/ubugeeei/vize |
| max_upload_size | |
| id | 2035876 |
| size | 108,466 |
The artist's toolbox for Vize compiler
Carton (/kɑːˈtɒn/) is an artist's portfolio case or art supply box - a container that holds all the essential tools and materials an artist needs for their work. Just as a carton organizes brushes, paints, and canvases for an artist, vize_carton organizes the fundamental utilities and data structures needed for the Vize compiler.
In the art world, a carton typically contains:
Similarly, vize_carton provides:
High-performance arena-based memory allocation optimized for compiler workloads:
use vize_carton::{Allocator, Box, Vec};
let allocator = Allocator::default();
// Allocate values in the arena
let boxed = Box::new_in(42, allocator.as_bump());
let mut vec = Vec::new_in(allocator.as_bump());
vec.push(1);
vec.push(2);
use vize_carton::{is_html_tag, is_svg_tag, is_void_tag};
assert!(is_html_tag("div"));
assert!(is_svg_tag("path"));
assert!(is_void_tag("br"));
use vize_carton::{camelize, hyphenate, capitalize};
assert_eq!(camelize("foo-bar"), "fooBar");
assert_eq!(hyphenate("fooBar"), "foo-bar");
assert_eq!(capitalize("hello"), "Hello");
use vize_carton::{PatchFlags, ShapeFlags, SlotFlags};
let flags = PatchFlags::TEXT | PatchFlags::CLASS;
assert!(flags.contains(PatchFlags::TEXT));
vize_carton is part of the Vize compiler's art-themed crate collection:
| Crate | Art Term | Role |
|---|---|---|
| vize_carton | Carton (Portfolio Case) | Shared utilities & allocator |
| vize_relief | Relief (Sculpted Surface) | AST structures |
| vize_atelier_core | Armature (Sculpture Framework) | Parser & tokenizer |
| vize_atelier | Atelier (Artist's Studio) | Compilers |
| vize_vitrine | Vitrine (Display Case) | Bindings |
MIT License