{"id":44937917,"url":"https://github.com/pegasusheavy/spacey","last_synced_at":"2026-02-18T07:34:16.103Z","repository":{"id":328768258,"uuid":"1114891001","full_name":"pegasusheavy/spacey","owner":"pegasusheavy","description":"A high-performance JavaScript/TypeScript engine written in Rust for the Servo browser. Native TypeScript support, ECMAScript 3+ compliant, embeddable runtime.","archived":false,"fork":false,"pushed_at":"2026-01-09T20:35:34.000Z","size":1988,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-29T20:58:21.496Z","etag":null,"topics":["browser-engine","bytecode","compiler","ecmascript","embedded","engine","interpreter","javascript","javascript-engine","nodejs","parser","pegasus-heavy-industries","rust","servo","spidermoneky","spidermonkey","typescript","typescript-native","vm","wasm"],"latest_commit_sha":null,"homepage":"https://pegasusheavy.github.io/spacey/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pegasusheavy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":[]}},"created_at":"2025-12-12T03:24:36.000Z","updated_at":"2026-01-03T18:47:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pegasusheavy/spacey","commit_stats":null,"previous_names":["pegasusheavy/spacey"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pegasusheavy/spacey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasusheavy%2Fspacey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasusheavy%2Fspacey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasusheavy%2Fspacey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasusheavy%2Fspacey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pegasusheavy","download_url":"https://codeload.github.com/pegasusheavy/spacey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasusheavy%2Fspacey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29572465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-engine","bytecode","compiler","ecmascript","embedded","engine","interpreter","javascript","javascript-engine","nodejs","parser","pegasus-heavy-industries","rust","servo","spidermoneky","spidermonkey","typescript","typescript-native","vm","wasm"],"created_at":"2026-02-18T07:34:16.047Z","updated_at":"2026-02-18T07:34:16.094Z","avatar_url":"https://github.com/pegasusheavy.png","language":"Rust","readme":"# Spacey\n\n**An experimental JavaScript engine written in Rust, targeting adoption by the [Servo](https://servo.org/) web browser project.**\n\n\u003e ⚠️ **Experimental Software**: Spacey is in early development and is not yet suitable for production use. APIs and internals are subject to change.\n\n## Overview\n\nSpacey is a from-scratch JavaScript engine implementation in Rust, inspired by Mozilla's SpiderMonkey. The project aims to provide a modern, memory-safe JavaScript runtime that can serve as Servo's JavaScript engine, replacing the current SpiderMonkey integration with a pure-Rust solution.\n\n### Why Spacey?\n\n- **Pure Rust**: No C++ dependencies, enabling tighter integration with Servo's Rust codebase\n- **Memory Safety**: Leverages Rust's ownership model for a safer JavaScript runtime\n- **Modern Architecture**: Clean-slate design informed by decades of JS engine research\n- **Servo-First**: Designed with Servo's requirements and architecture in mind\n\n## Project Goals\n\n1. **ECMAScript Compliance**: Full ES2024+ specification compliance\n2. **Performance**: Competitive performance through bytecode compilation and JIT\n3. **Embeddability**: Clean, safe Rust API for embedding in Servo and other applications\n4. **Web Platform Integration**: Seamless integration with Servo's DOM and Web APIs\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                        spacey                               │\n│  ┌─────────────────────────────────────────────────────┐   │\n│  │              spacey-spidermonkey                     │   │\n│  │  ┌─────────┐  ┌────────┐  ┌──────────┐  ┌────────┐ │   │\n│  │  │  Lexer  │→ │ Parser │→ │ Compiler │→ │   VM   │ │   │\n│  │  └─────────┘  └────────┘  └──────────┘  └────────┘ │   │\n│  │       ↓            ↓            ↓            ↓      │   │\n│  │   Tokens         AST       Bytecode      Execution │   │\n│  │                                                     │   │\n│  │  ┌──────────────────────────────────────────────┐  │   │\n│  │  │  Runtime: Values, Objects, GC, Built-ins     │  │   │\n│  │  └──────────────────────────────────────────────┘  │   │\n│  └─────────────────────────────────────────────────────┘   │\n│                                                             │\n│  ┌─────────────────────────────────────────────────────┐   │\n│  │              spacey-node (optional)                  │   │\n│  │         Node.js bindings via napi-rs                │   │\n│  └─────────────────────────────────────────────────────┘   │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Workspace Structure\n\n| Crate | Description |\n|-------|-------------|\n| `spacey` | CLI and REPL interface |\n| `spacey-spidermonkey` | Core JavaScript engine library |\n| `spacey-node` | Node.js native addon bindings |\n\n## Current Status\n\n| Component | Status |\n|-----------|--------|\n| Lexer | 🚧 In Progress |\n| Parser | 🚧 In Progress |\n| AST | 🚧 In Progress |\n| Bytecode Compiler | 🚧 In Progress |\n| VM Interpreter | 🚧 In Progress |\n| Built-in Objects | 📋 Planned |\n| Garbage Collector | 📋 Planned |\n| JIT Compiler | 📋 Planned |\n| Servo Integration | 📋 Planned |\n\nSee [TODO.md](./TODO.md) for the detailed implementation roadmap.\n\n## Building\n\n### Prerequisites\n\n- Rust 2024 edition (nightly)\n- Cargo\n\n### Build\n\n```bash\n# Build all crates\ncargo build\n\n# Run tests\ncargo test\n\n# Run the REPL\ncargo run\n```\n\n### Node.js Bindings (Optional)\n\n```bash\ncd crates/spacey-node\npnpm install\npnpm build\n```\n\n## Usage\n\n### As a Library (Rust)\n\n```rust\nuse spacey_spidermonkey::Engine;\n\nfn main() {\n    let mut engine = Engine::new();\n\n    match engine.eval(\"1 + 2 * 3\") {\n        Ok(result) =\u003e println!(\"Result: {}\", result),\n        Err(e) =\u003e eprintln!(\"Error: {}\", e),\n    }\n}\n```\n\n### From Node.js\n\n```javascript\nconst spacey = require('spacey-node');\n\nconst engine = new spacey.Engine();\nconst result = engine.eval('Math.sqrt(16)');\nconsole.log(result); // { valueType: 'number', value: '4' }\n```\n\n## Servo Integration\n\nSpacey is being developed with Servo integration as a primary goal. The planned integration points include:\n\n- **Script Thread**: Direct integration with Servo's script execution pipeline\n- **DOM Bindings**: Rust-native bindings to Servo's DOM implementation\n- **Web APIs**: Support for Web platform APIs through Servo's infrastructure\n- **Memory Management**: Coordination with Servo's memory management strategies\n\n### Comparison with Current SpiderMonkey Integration\n\n| Aspect | SpiderMonkey (current) | Spacey (planned) |\n|--------|----------------------|------------------|\n| Language | C++ with Rust bindings | Pure Rust |\n| Integration | FFI boundary | Native Rust API |\n| Memory | Separate GC | Integrated with Servo |\n| Build | Complex C++ toolchain | Cargo-only |\n\n## Contributing\n\nSpacey welcomes contributions! Areas where help is especially needed:\n\n- ECMAScript specification compliance\n- Performance optimization\n- Test262 test suite integration\n- Documentation\n\nPlease see the [TODO.md](./TODO.md) for specific tasks and milestones.\n\n## Related Projects\n\n- [Servo](https://servo.org/) - The browser engine Spacey targets\n- [SpiderMonkey](https://spidermonkey.dev/) - Mozilla's JS engine (architectural inspiration)\n- [Boa](https://github.com/boa-dev/boa) - Another Rust JS engine\n- [Deno](https://deno.land/) - Rust-based JS/TS runtime using V8\n\n## License\n\nThis project is licensed under the [Mozilla Public License 2.0](./LICENSE).\n\nCopyright © 2025 Pegasus Heavy Industries, LLC\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eSpacey\u003c/strong\u003e — A JavaScript engine for the Rust-powered web\n\u003c/p\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasusheavy%2Fspacey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpegasusheavy%2Fspacey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasusheavy%2Fspacey/lists"}