lust/
lib.rs

1#![allow(improper_ctypes)]
2#![cfg_attr(not(feature = "std"), no_std)]
3
4extern crate alloc;
5
6pub mod ast;
7pub mod builtins;
8pub mod bytecode;
9pub mod config;
10#[cfg(feature = "std")]
11pub mod embed;
12pub mod error;
13#[cfg(feature = "std")]
14pub mod ffi;
15pub mod jit;
16mod lazy;
17pub mod lexer;
18pub mod modules;
19pub mod number;
20#[cfg(all(feature = "packages", not(target_arch = "wasm32")))]
21pub mod packages;
22pub mod parser;
23pub mod typechecker;
24pub mod vm;
25#[cfg(target_arch = "wasm32")]
26pub mod wasm;
27pub use ast::{Expr, Item, Span, Stmt, Type};
28pub use bytecode::{Chunk, Compiler, Function, Instruction, Value};
29pub use config::{ConfigError, DependencyKind, DependencySpec, LustConfig};
30#[cfg(feature = "std")]
31pub use embed::{
32    struct_field, ArrayHandle, AsyncDriver, AsyncTaskQueue, EmbeddedBuilder, EmbeddedProgram,
33    EnumInstance, FromLustValue, FromStructField, FunctionArgs, FunctionHandle, IntoLustValue,
34    MapHandle, StringRef, StructField, StructHandle, StructInstance, ValueRef,
35};
36pub use error::{LustError, Result};
37pub use jit::{JitCompiler, JitState};
38pub use lexer::{Lexer, Token, TokenKind};
39#[cfg(feature = "std")]
40pub use lust_macros::LustStructView;
41pub use modules::{LoadedModule, ModuleImports, ModuleLoader, Program};
42pub use number::{LustFloat, LustInt};
43#[cfg(all(feature = "packages", not(target_arch = "wasm32")))]
44pub use packages::{
45    build_local_module, build_package_archive, clear_credentials, collect_stub_files,
46    credentials_file, load_credentials, load_local_module, load_local_module_with_namespace,
47    resolve_dependencies, save_credentials, stub_files_from_exports, write_stub_files,
48    ArchiveError, BuildOptions, Credentials, CredentialsError, DependencyResolution,
49    DependencyResolutionError, DownloadedArchive, LoadedRustModule, LocalBuildOutput,
50    LocalModuleError, ManifestError, PackageArchive, PackageDetails, PackageKind, PackageManager,
51    PackageManifest, PackageSpecifier, PackageSummary, PackageVersionInfo, PublishResponse,
52    RegistryClient, RegistryError, ResolvedLustDependency, ResolvedRustDependency,
53    SearchParameters, StubFile, DEFAULT_BASE_URL,
54};
55pub use parser::Parser;
56pub use typechecker::{FunctionSignature, TypeChecker, TypeCollection};
57pub use vm::{NativeExport, NativeExportParam, VM};