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