Library/Library.rs
1#![allow(
2 non_snake_case,
3 non_camel_case_types,
4 non_upper_case_globals,
5 dead_code,
6 unused_imports,
7 unused_variables,
8 unused_assignments
9)]
10
11//! # Rest: JavaScript Bundler for VS Code Platform Code
12//!
13//! Rest compiles VS Code's TypeScript and JavaScript source into optimized
14//! bundles that Cocoon can load at runtime. Built on OXC (Oxidation Compiler)
15//! for native-speed parsing, transformation, and minification.
16//!
17//! ## What Rest Produces
18//!
19//! VS Code's source code is a massive TypeScript/JavaScript codebase. Rest
20//! takes the platform code (workbench, services, platform layers) and bundles
21//! it into self-contained modules that the Cocoon extension host can
22//! `require()`.
23//!
24//! The output lands in the `Output` Element, ready for production use.
25//!
26//! ## Why Not Webpack or esbuild
27//!
28//! Rest uses OXC because it runs at native speed as a Rust library. No Node.js
29//! process needed for bundling. The entire build pipeline stays in Rust.
30//!
31//! ## Modules
32//!
33//! - [`Fn`]: Core bundling functions and OXC integration
34//! - [`Struct`]: Configuration structures and CLI command definitions
35
36#[allow(dead_code)]
37#[tokio::main]
38/// The main entry point for the application.
39///
40/// This function initializes the command structure and executes the
41/// asynchronous function defined within it. The function is marked with the
42/// `#[tokio::main]` attribute to enable asynchronous execution using the Tokio
43/// runtime.
44///
45/// # Panics
46///
47/// This function does not panic.
48///
49/// # Example
50///
51/// ```rust
52/// #[tokio::main]
53/// async fn main() { (Struct::Binary::Command::Struct::Fn().Fn)().await }
54
55/// ```
56async fn main() { (Struct::Binary::Command::Struct::Fn().Fn)().await }
57
58/// Core bundling functions and OXC integration
59pub mod Fn;
60
61/// Configuration structures and CLI command definitions
62pub mod Struct;