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