Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seho-dev/typescript-rust
A Typescript interpreter in Rust.
https://github.com/seho-dev/typescript-rust
Last synced: 16 days ago
JSON representation
A Typescript interpreter in Rust.
- Host: GitHub
- URL: https://github.com/seho-dev/typescript-rust
- Owner: seho-dev
- License: mit
- Created: 2022-11-09T15:55:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T16:41:03.000Z (over 2 years ago)
- Last Synced: 2025-01-20T23:49:45.534Z (21 days ago)
- Size: 178 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# typescript
This is a Rust native implementation of a Typescript Parser and a JIT execution engine.
This project comes in two crates:
+ [typescript-ast]: Parses Typescript into an AST.
+ [typescript-jit]: Takes an AST representation and creates an executable script.**State:**
+ Parser: Async/Await are missing.
+ JIT: Creates functional binary code for functions.## Why?
+ Because V8 is to compllicated to "just integrate it".
+ rquickjs makes problems in an multi threaded environment.
+ And lua is fast, but ugly for larger scripts.## Features
+ Parses Typescript via Pest.
+ A LLVM based JIT execution engine.## typescript-jit usage
**Info:**
```
A native Typescript parser and JIT runner.Usage: typescript-jit [OPTIONS]
Arguments:
Options:
-l, --log show a execution log. This for debugging
-i, --ir shows the LLVM IR code. This for debugging
-h, --help Print help information
-V, --version Print version information
``````bash
cargo run -- -l typescript.log --ir main.ir 'samples/sample.ts'
```