rew_core/
lib.rs

1//! Core utilities and types for the Rew runtime system
2
3pub mod utils;
4
5use serde::{Deserialize, Serialize};
6use std::path::PathBuf;
7
8/// Build options for compiling Rew code
9#[derive(Debug, Clone, Default)]
10pub struct BuildOptions {
11  pub bundle_all: bool,
12  pub entry_file: Option<PathBuf>,
13}
14
15/// App configuration structure
16#[derive(Debug, Deserialize, Serialize, Clone)]
17pub struct AppManifest {
18  pub package: Option<String>,
19  pub version: Option<String>,
20  pub description: Option<String>,
21  pub entries: Option<String>,
22}
23
24#[derive(Debug, Deserialize, Serialize, Clone)]
25pub struct AppConfig {
26  pub manifest: Option<AppManifest>,
27  pub entries: Option<std::collections::HashMap<String, String>>,
28}
29
30#[derive(Debug, Clone)]
31pub struct AppInfo {
32  pub path: PathBuf,
33  pub config: AppConfig,
34}
35
36
37#[derive(Default)]
38pub struct RuntimeState {
39  pub current_dir: PathBuf,
40  pub args: Vec<String>,
41}