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, resolve_dependencies, save_credentials,
47    stub_files_from_exports, write_stub_files, ArchiveError, BuildOptions, Credentials,
48    CredentialsError, DependencyResolution, DependencyResolutionError, DownloadedArchive,
49    LoadedRustModule, LocalBuildOutput, LocalModuleError, ManifestError, PackageArchive,
50    PackageDetails, PackageKind, PackageManager, PackageManifest, PackageSpecifier, PackageSummary,
51    PackageVersionInfo, PublishResponse, RegistryClient, RegistryError, ResolvedLustDependency,
52    ResolvedRustDependency, SearchParameters, StubFile, DEFAULT_BASE_URL,
53};
54pub use parser::Parser;
55pub use typechecker::{FunctionSignature, TypeChecker, TypeCollection};
56pub use vm::{NativeExport, NativeExportParam, VM};