https://github.com/mmkal/workert
POC of TypeScript compiler running in a Cloudflare Worker
https://github.com/mmkal/workert
cloudflare cloudflare-workers typescript
Last synced: 28 days ago
JSON representation
POC of TypeScript compiler running in a Cloudflare Worker
- Host: GitHub
- URL: https://github.com/mmkal/workert
- Owner: mmkal
- License: apache-2.0
- Created: 2025-12-12T12:50:15.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-12-16T15:39:42.000Z (2 months ago)
- Last Synced: 2025-12-18T21:40:40.932Z (2 months ago)
- Topics: cloudflare, cloudflare-workers, typescript
- Language: TypeScript
- Homepage: https://workert-compiler-mmkal.iterate.workers.dev/
- Size: 95.7 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# workert
TypeScript compiler running in a Cloudflare Worker. Proof of concept.
Compiles TS to JS on the edge, executes in a sandboxed dynamic worker, returns result.
**Demo:** https://workert-compiler-mmkal.iterate.workers.dev
## Usage
```bash
curl -X POST https://workert-compiler-mmkal.iterate.workers.dev \
-d '{"code": "async function codemode() { return 1 + 1 }"}'
# {"success":true,"result":2}
```
Or visit the URL in browser for a simple UI.
## Deploy your own
```bash
bun install
bun run deploy
```
Requires [Alchemy](https://github.com/sam-goodwin/alchemy) and Cloudflare credentials.
## Development
```bash
bun install
bun test # run tests
bun dev # start local dev server
```
## How it works
- Bundles `@ts-morph/bootstrap` + TypeScript compiler with Bun
- Compiled code runs in isolated worker with no network access
## License
Apache 2.0