Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basics/jsto...
transpile javascript code to other languages
https://github.com/basics/jsto...
Last synced: 3 days ago
JSON representation
transpile javascript code to other languages
- Host: GitHub
- URL: https://github.com/basics/jsto...
- Owner: basics
- License: mit
- Created: 2020-04-21T14:43:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T05:16:24.000Z (7 months ago)
- Last Synced: 2024-04-23T09:39:52.287Z (7 months ago)
- Language: JavaScript
- Size: 550 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
[![GitHub package version](https://img.shields.io/github/package-json/v/basics/jsto....svg)](https://github.com/basics/jsto...)
[![npm version](https://img.shields.io/npm/v/@js-basics/jsto....svg)](https://www.npmjs.com/package/@js-basics/jsto...)
[![license](https://img.shields.io/github/license/basics/jsto....svg)](https://github.com/basics/jsto...)[![OSX/Linux Build Status](https://travis-ci.org/basics/jsto....svg?branch=master)](https://travis-ci.org/basics/jsto...)
[![Dependencies Status](https://david-dm.org/basics/jsto.../status.svg)](https://david-dm.org/basics/jsto...)
[![DevDependencies Status](https://david-dm.org/basics/jsto.../dev-status.svg)](https://david-dm.org/basics/jsto...?type=dev)# jsto
this libary is going to provide you a simple way of writing typed js code.
this code can run and tested directly with js.
but with types it can be transpiled to other languages, too.type inference is supported by type checker.
| environment | jsto... checker | typescript |
| ------------------------ | :-------------: | :--------: |
| run time | ✓ | ✗ |
| build time | ✓ | ✓ |
| IDE time (the best time) | ✗ | ✓ || typesafe | jsto... checker | typescript |
| ----------- | :-------------: | :--------: |
| functions | ✓ | ✓ |
| arguments | ✓ | ✓ |
| classes | ✓ | ✓ |
| methods | ✓ | ✓ |
| variables | ✗ | ✓ |
| arithmetics | ✓ | ✗ |# features in process
- [x] generate JSTree out of js
- ESTree + type annotations
- [x] type inference
- [ ] jstoGLSL transpiler great for performance
- [x] generate valid glsl code
- [ ] js transformations to glsl
- [x] modulo as arithmetic operator
- [x] pow as arithmetic operator
- [x] variable index expression for vectors
- [ ] gentype for function outline
- [x] functional structs
- [ ] destruct
- [ ] symbols and enums- [x] jstoGLSL simulator great for testing
- [x] painting (slowly) to image buffer
- [x] vector arithmetic (component wise) operator support
- [x] partly matrix algebraic operator support
- [ ] typesafetyin future
- [ ] jstoWorker
- [ ] transpile js code without overhead of types and arithmetics# JSTree extended from ESTree
`typeAnnotation` for Literals and Identifiers
`returnType` for Functions
# Demos
[first glsl simulation in js](https://unpkg.com/@js-basics/jsto.../demo/index.html)