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 externs;
12#[cfg(feature = "std")]
13pub mod embed;
14pub mod error;
15#[cfg(feature = "std")]
16pub mod ffi;
17pub mod jit;
18mod lazy;
19pub mod lexer;
20#[cfg(all(feature = "std", not(target_arch = "wasm32")))]
21pub mod lua_compat;
22pub mod modules;
23pub mod number;
24#[cfg(all(feature = "packages", not(target_arch = "wasm32")))]
25pub mod packages;
26pub mod parser;
27pub mod typechecker;
28pub mod vm;
29#[cfg(target_arch = "wasm32")]
30pub mod wasm;
31pub use ast::{Expr, Item, Span, Stmt, Type};
32pub use bytecode::{Chunk, Compiler, Function, Instruction, Value};
33pub use config::{ConfigError, DependencyKind, DependencySpec, LustConfig};
34#[cfg(feature = "std")]
35pub use embed::{
36 enum_variant, enum_variant_with, function_param, private_struct_field_decl, self_param,
37 struct_field, struct_field_decl, trait_bound, type_named, type_unit, type_unknown,
38 weak_struct_field_decl, ArrayHandle, AsyncDriver, AsyncTaskQueue, EmbeddedBuilder,
39 EmbeddedProgram, EnumInstance, ExternRegistry, FromLustValue, FromStructField, FunctionArgs,
40 FunctionBuilder, FunctionHandle, ImplBuilder, IntoLustValue, MapHandle, ModuleStub, StringRef,
41 StructBuilder, StructField, StructHandle, StructInstance, TraitBuilder, TraitMethodBuilder,
42 ValueRef,
43};
44pub use error::{LustError, Result};
45pub use jit::{JitCompiler, JitState};
46pub use lexer::{Lexer, Token, TokenKind};
47#[cfg(feature = "std")]
48pub use lust_macros::LustStructView;
49pub use modules::{LoadedModule, ModuleImports, ModuleLoader, Program};
50pub use number::{LustFloat, LustInt};
51#[cfg(all(feature = "packages", not(target_arch = "wasm32")))]
52pub use packages::{
53 build_local_module, build_package_archive, clear_credentials, collect_stub_files,
54 credentials_file, load_credentials, load_local_module, resolve_dependencies, save_credentials,
55 stub_files_from_exports, write_stub_files, ArchiveError, BuildOptions, Credentials,
56 CredentialsError, DependencyResolution, DependencyResolutionError, DownloadedArchive,
57 LoadedRustModule, LocalBuildOutput, LocalModuleError, ManifestError, PackageArchive,
58 PackageDetails, PackageKind, PackageManager, PackageManifest, PackageSpecifier, PackageSummary,
59 PackageVersionInfo, PublishResponse, RegistryClient, RegistryError, ResolvedLuaDependency,
60 ResolvedLustDependency, ResolvedRustDependency, SearchParameters, StubFile, DEFAULT_BASE_URL,
61};
62pub use parser::Parser;
63pub use typechecker::{FunctionSignature, TypeChecker, TypeCollection};
64pub use vm::{NativeExport, NativeExportParam, VM};