Skip to content

Frequently Asked Questions (FAQ)

Quick Answers

Q: Will WASM work for me? A: Yes. Python fallback always works. WASM can provide substantial speedups on suitable workloads.

Q: What Python versions are supported? A: Python 3.12+ (full features). Check with python --version.

Q: How do I install WASM support? A: pip install multilingualprogramming[wasm] (includes wasmtime runtime)

Q: Is there a performance penalty if WASM unavailable? A: No. Python fallback is automatic and transparent.

Q: Will my code break? A: No. WASM is optional. Code works with or without it.


Installation & Setup

Q: Which installation should I choose?

Answer:

Scenario Command Notes
Testing/learning pip install multilingualprogramming Python only, 50MB
Production pip install multilingualprogramming[wasm] WASM + Python, 150MB
Max performance pip install multilingualprogramming[performance] + NumPy, 250MB

Q: Do I need to compile anything?

Answer: No! WASM binaries are pre-compiled in the wheel package.

Q: How do I verify the installation?

Answer:

from multilingualprogramming.runtime.backend_selector import BackendSelector
selector = BackendSelector()
print(f"WASM: {selector.is_wasm_available()}")
print(f"Python: working")  # Always works

Q: Can I use multilingual in a virtual environment?

Answer: Yes! Works with venv, conda, poetry, etc.

python -m venv myenv
source myenv/bin/activate  # Linux/Mac
# or
myenv\Scripts\activate  # Windows

pip install multilingualprogramming[wasm]


Performance & Speed

Q: How much faster is WASM?

Answer: It depends on operation size, hardware, and runtime overhead. For larger compute-heavy operations, speedups can be significant. Benchmark your own workload for reliable numbers.

Q: Why isn't operation X faster?

Answer: Common reasons: 1. Operation too small (< 1ms) - overhead dominates 2. WASM not available - using Python fallback 3. Operation not optimized for WASM yet

Solution: See PERFORMANCE_TUNING.md

Q: Do I need to change my code for better performance?

Answer: No! Automatic optimization: - WASM used if available (fast path) - Python fallback if not (safe path) - Same code, automatic benefits

Q: What's the WASM module load overhead?

Answer: ~10-50ms first call, then cached (~0ms)

Solution: Module caching is automatic, happens once

Q: Can I benchmark my code?

Answer: Yes! See PERFORMANCE_TUNING.md


Compatibility & Platforms

Q: What platforms are supported?

Answer: - ✅ Windows x86_64 - ✅ Linux x86_64 - ✅ macOS x86_64 - ✅ macOS ARM64 (Apple Silicon)

Q: Will it work on Raspberry Pi?

Answer: Partially: - ✅ Python fallback works - ❌ WASM not available (ARM architecture) - Solution: Python fallback provides all functionality

Q: Does it work with Docker/Kubernetes?

Answer: Yes! Same Python 3.12+ requirements.

FROM python:3.12
RUN pip install multilingualprogramming[wasm]

Q: Can I use it in a web application?

Answer: Currently: - ✅ Backend (server-side) - works great - ❌ Browser (client-side) - future feature

Q: What about mobile?

Answer: - ❌ iOS - not supported (yet) - ❌ Android - Python not standard (but possible)


Features & Capabilities

Q: Does WASM support all 17 languages?

Answer: Yes! All languages generate both Python and WASM.

Q: Can I use multilingual with NumPy?

Answer: Yes! Both in fallback and in your code:

import numpy as np
from multilingualprogramming.runtime.backend_selector import BackendSelector

# WASM will be used if available
selector = BackendSelector()
result = selector.call_function("matrix_multiply", a, b)

# Or use NumPy directly
result = np.dot(a, b)

Q: Can I call C code from multilingual?

Answer: - Python path: Yes (via ctypes, cffi) - WASM path: No (WASM sandbox)

Q: Can multilingual call Python libraries?

Answer: Yes! From Python-generated code

# This works
import numpy as np
# Then use in multilingual code

Q: What about debugging?

Answer: - Python path: Full Python debugging (pdb, print, etc.) - WASM path: Limited (use Python fallback for debugging)

Recommendation: Debug with Python, deploy with WASM


Backend Selection

Q: How does the backend selector work?

Answer: Automatic priority: 1. Check if wasmtime installed 2. Check if WASM binary available 3. Check platform compatibility 4. Use WASM if all checks pass 5. Fall back to Python if any check fails

Q: Can I force Python backend?

Answer: Yes!

from multilingualprogramming.runtime.backend_selector import BackendSelector, Backend

# Force Python (always safe)
selector = BackendSelector(prefer_backend=Backend.PYTHON)
result = selector.call_function("fibonacci", 10)

Q: Can I force WASM backend?

Answer: Yes, but risky:

# Force WASM (will fail if unavailable)
selector = BackendSelector(prefer_backend=Backend.WASM)
result = selector.call_function("fibonacci", 10)  # Raises error if no WASM

Recommendation: Use Backend.AUTO in production (default)

Q: Can I check WASM availability programmatically?

Answer: Yes!

from multilingualprogramming.runtime.backend_selector import BackendSelector

selector = BackendSelector()
if selector.is_wasm_available():
    print("WASM enabled - using fast path")
else:
    print("WASM unavailable - using Python fallback")


Troubleshooting

Q: I installed multilingual but WASM isn't working

Answer: Common causes: 1. wasmtime not installed: pip install multilingualprogramming[wasm] 2. WASM binaries missing: Reinstall 3. Platform not supported: Use Python fallback 4. Corrupted installation: pip install --force-reinstall multilingualprogramming[wasm]

See TROUBLESHOOTING.md for detailed solutions

Q: Why is my operation slower with WASM?

Answer: WASM overhead > benefit for small operations.

Solution: - Only use WASM for operations > 1ms - Batch small operations - See PERFORMANCE_TUNING.md

Q: What if there's a bug in WASM?

Answer: 1. Python fallback still works perfectly 2. Use Python backend temporarily 3. Report bug on GitHub Issues 4. Bug will be fixed in next release

Q: How do I debug WASM code?

Answer: 1. Reproduce with Python fallback 2. Debug with Python tools (pdb, print, etc.) 3. WASM debugging is advanced (requires Wasmtime + tools)

Recommendation: Use Python for development, WASM for production


Development

Q: How do I contribute WASM optimizations?

Answer: 1. Fork repository 2. Optimize specific function (see multilingualprogramming/codegen/wasm_generator.py) 3. Add tests (see tests/wasm_comprehensive_test.py) 4. Submit pull request

Q: Can I add custom WASM functions?

Answer: Yes! See WASM_DEVELOPMENT.md

Q: How do I run tests?

Answer:

# All tests
pytest tests/

# WASM-specific tests
pytest tests/wasm_corpus_test.py
pytest tests/wasm_comprehensive_test.py

# With coverage
pytest tests/ --cov=multilingualprogramming

Q: Where's the source code?

Answer: GitHub Repository


Q: What license is this?

Answer: GPL-3.0-or-later (copy left)

In short: - ✅ Use commercially - ✅ Modify source code - ✅ Distribute your own version - ❌ Keep modifications proprietary (must share source)

Q: Can I use this in a closed-source project?

Answer: No (GPL3 requirement). Options: 1. Open-source your code too 2. Request alternative license 3. Use only Python fallback (discuss licensing)


Migration & Upgrades

Q: How do I upgrade from v0.3 to v0.4?

Answer: See MIGRATION.md

Quick version:

pip install --upgrade multilingualprogramming
# Code compatibility: 100% (no changes needed!)

Q: Will my v0.3 code work?

Answer: Yes! 100% backward compatible.

Q: Is there a breaking change?

Answer: No! v0.4 is fully backward compatible with v0.3


Project Status

Q: Is this production-ready?

Answer: Yes! v0.4 is: - ✅ Feature complete - ✅ 33+ tests passing - ✅ 1,500+ tests total (Code Generation) - ✅ Documentation complete - ✅ Performance validated

Q: What's next after v0.4?

Answer: Advanced Features features: - JIT compilation - Parallel execution - Browser support - GPU acceleration

Q: How often are updates released?

Answer: TBD (depends on community contributions)

Q: Can I request features?

Answer: Yes! Open an issue on GitHub


Getting More Help

Q: Where's the documentation?

Answer: - 📖 Installation Guide - 📖 Development Guide - 📖 Performance Tuning - 📖 Architecture Overview - 🆘 Troubleshooting - ❓ This FAQ

Q: How do I report a bug?

Answer: 1. Check TROUBLESHOOTING.md 2. Check existing issues 3. Create new issue with: - Python version - Platform - Minimal reproducible example - Full error traceback

Q: Can I contact the developers?

Answer: - 💬 GitHub Issues/Discussions - 📧 johnsamuelwrites@gmail.com

Q: Is there a community?

Answer: Not yet! You could help start one: - Comment on GitHub discussions - Share your projects - Contribute improvements


Performance FAQ

Q: When should I use WASM?

Answer: Use WASM for operations that: - Take > 1ms to compute - Repeat frequently - Are performance-critical

Q: When should I use Python?

Answer: Use Python for: - Prototyping/development - Debugging - Small operations (< 1ms) - When WASM unavailable

Q: Should I always use WASM if available?

Answer: Almost! Exception: operations < 1ms (overhead might dominate)

Q: How do I measure speedup?

Answer: See PERFORMANCE_TUNING.md


Bottom Line

TL;DR: - 🚀 Install: pip install multilingualprogramming[wasm] - 📊 Speedup: workload-dependent; benchmark compute-intensive paths - 💻 Fallback: Always works (Python) - 🔧 No changes: Automatic backend selection - ✅ Stable with fallback; validate in your environment


Version: Documentation Suite Final Last Updated: February 22, 2026 Status: ✅ Complete