BrowserSm: Squeak Smalltalk Virtual Machine for Web Browsers
BrowserSm
A Squeak Smalltalk Virtual Machine for Web Browsers
BrowserSm is a JavaScript-based implementation of the Squeak Smalltalk virtual machine that runs standard Squeak images in web browsers. It enables deployment of complete Smalltalk applications — including a full-featured web browser — without requiring browser plugins or external runtimes. The reference application is a web browser implemented entirely in Smalltalk, demonstrating the power of running live Smalltalk environments in the browser.
Key Features
- JavaScript-Based VM: Complete Squeak virtual machine implementation running in browsers without plugins
- Standard Image Compatibility: Runs unmodified Squeak 6.0+ images with full language support
- Live Development Environment: Full Squeak IDE available in browser with inspect, debug, and modify capabilities
- Reference Browser Application: Demonstrates VM capabilities with a complete web browser written in Smalltalk
- Constitutional Governance: VM development guided by rigorous specifications ensuring correctness and performance
- Dual Deployment: Same images run on desktop Squeak VMs and in web browsers via BrowserSm
Architecture Overview
BrowserSm implements a complete Squeak virtual machine in JavaScript, enabling standard Squeak applications to run in web browsers:
The Virtual Machine Layer
JavaScript-based implementation of the complete Squeak VM:
- Bytecode Interpreter: Executes standard Squeak bytecodes in JavaScript
- Object Memory Management: Implements Spur object format with garbage collection
- Primitive Operations: Maps Squeak primitives to browser APIs (DOM, Canvas, WebGL)
- Image Format Support: Loads and boots standard Squeak image files
- Development Tools: Integrates with browser developer tools for VM debugging
The Smalltalk Application Layer
Standard Squeak images running on the VM:
- Complete Squeak Environment: Full IDE, inspector, debugger, and development tools
- Reference Browser Application: Web browser implemented entirely in Smalltalk
- Live Object System: All objects inspectable and modifiable at runtime
- Web Platform Integration: Smalltalk objects mapped to browser APIs
- Cross-Platform Compatibility: Same images run on desktop and web VMs
Quick Start
Try the Web Demo
Experience a complete Squeak environment running in your browser: Launch BrowserSm Demo →
Development Setup
1
2
3
4
5
6
7
8
9
10
11
# Clone the repository
git clone https://github.com/pauljbernard/browsersm.git
cd browsersm
# Option 1: Load browser application into desktop Squeak
# Open Squeak 6.0 and file in the packages from src/
# Option 2: Run via the JavaScript VM
# Serve the VM and load a Squeak image
python3 -m http.server 8080
# Visit: http://localhost:8080/vm/index.html
Documentation
- Getting Started — Installation and first steps
- Architecture Guide — Technical overview and design principles
- Constitution — Project governance and development principles
- User Guide — Using BrowserSm as a web browser
- Developer Guide — Contributing and extending BrowserSm
- API Reference — Class and method documentation
- Examples — Sample code and tutorials
Live Demo
Experience BrowserSm running in your browser: Launch BrowserSm Web Demo →
Project Status
Current Version: 0.9-alpha Constitutional Compliance: ✅ Fully compliant Web Standards Coverage: ~60% (see Implementation Status)
Recent Milestones
- ✅ Constitutional compliance achieved (Article I-XII)
- ✅ Smalltalk script runtime implementation
- ✅ HTML5 parser with error recovery
- ✅ CSS flexbox layout engine
- ✅ Morphic-based browser UI
- 🚧 BSvm JavaScript interpreter (in development)
- 🚧 WebGL acceleration
- 🚧 Advanced CSS features
Philosophy
BrowserSm embodies the Smalltalk design principles articulated by Dan Ingalls:
- Personal Mastery: Every component is comprehensible and modifiable
- Uniform Metaphor: Everything is an object, everything sends messages
- Modularity: Clean separation of concerns with well-defined interfaces
- Factoring: Common functionality extracted into reusable components
- Reactive Principle: All objects can present themselves meaningfully for inspection
This isn’t just another browser implementation — it’s a demonstration that complex systems can be built with simplicity, consistency, and transparency.
Contributing
BrowserSm development is governed by a Constitution that ensures architectural integrity. All contributions must comply with constitutional principles.
- Developer Guide — Getting started with development
- GitHub Repository — Source code and issue tracking
- Specification Documents — Technical specifications and requirements
License
BrowserSm is released under the MIT License. See LICENSE for details.
“Computing should be a reflection of the mind’s desire to explore and understand.” — Alan Kay