Expand description
Waspy: A Python to WebAssembly compiler written in Rust.
Waspy translates Python functions into WebAssembly, allowing Python code to run in browsers and other WebAssembly environments.
Re-exports§
pub use crate::core::options::CompilerOptions;pub use crate::core::options::Verbosity;pub use crate::analysis::metadata::FunctionSignature;pub use crate::core::parser;
Modules§
- analysis
- Code analysis modules for Waspy.
- compiler
- core
- Core functionality for the Waspy compiler.
- ir
- optimize
- Optimization modules for Waspy.
- stdlib
- utils
- Utility modules for Waspy.
Macros§
- log_
debug - Log a debug message (only shown with –debug)
- log_
error - Log an error message (always shown)
- log_
info - Log an info message (shown at normal verbosity and above)
- log_
verbose - Log a verbose message (shown with –verbose or –debug)
- log_
warn - Log a warning message (always shown unless quiet)
Functions§
- compile_
multiple_ python_ files - Compile multiple Python source files into a single WASM binary.
- compile_
multiple_ python_ files_ with_ config - Compile multiple Python source files into a single WASM binary with config awareness.
- compile_
multiple_ python_ files_ with_ options - Compile multiple Python source files with options.
- compile_
python_ project - Compile a Python project directory to WebAssembly.
- compile_
python_ project_ with_ options - Compile a Python project with options.
- compile_
python_ to_ wasm - Compile Python source code into a WASM binary using default options.
- compile_
python_ to_ wasm_ with_ options - Compile Python source code into a WASM binary with specified options.
- get_
python_ file_ metadata - Get metadata about a Python source file without compiling to WASM. Returns a list of function signatures for documentation or analysis.
- get_
python_ project_ metadata - Get metadata about an entire Python project. Returns a list of function signatures for all files.
- type_
to_ string - Convert IR type to string