ovr / Staticscript
Licence: other
🚀 TypeScript compiler on top of TypeScript as frontend and LLVM as backend
Stars: ✠447
Programming Languages
typescript
32286 projects
Labels
Projects that are alternatives of or similar to Staticscript
Codegen
Experimental wrapper over LLVM for generating and compiling code at run-time.
Stars: ✠362 (-19.02%)
Mutual labels: llvm
Scala Native
Your favorite language gets closer to bare metal.
Stars: ✠4,053 (+806.71%)
Mutual labels: llvm
Clangkit
ClangKit provides an Objective-C frontend to LibClang. Source tokenization, diagnostics and fix-its are actually implemented.
Stars: ✠330 (-26.17%)
Mutual labels: llvm
Mapping High Level Constructs To Llvm Ir
A guide that explains how high level programming language constructs are mapped to the LLVM intermediate language.
Stars: ✠305 (-31.77%)
Mutual labels: llvm
Enzyme
High-performance automatic differentiation of LLVM.
Stars: ✠418 (-6.49%)
Mutual labels: llvm
Easy Just In Time
LLVM Optimization to extract a function, embedded in its intermediate representation in the binary, and execute it using the LLVM Just-In-Time compiler.
Stars: ✠361 (-19.24%)
Mutual labels: llvm
Bytecoder
Rich Domain Model for JVM Bytecode and Framework to interpret and transpile it.
Stars: ✠401 (-10.29%)
Mutual labels: llvm
Staticscript
🎉🎉🎉 A new statically typed programming language, syntactically like TypeScript.
Stars: ✠337 (-24.61%)
Mutual labels: llvm
Soll
SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
Stars: ✠329 (-26.4%)
Mutual labels: llvm
Tagua Vm
Tagua VM is an experimental PHP Virtual Machine that guarantees safety and quality by removing large classes of vulnerabilities thanks to the Rust language and the LLVM Compiler Infrastructure.
Stars: ✠419 (-6.26%)
Mutual labels: llvm
Swiftweekly.github.io
A community-driven weekly newsletter about Swift.org
Stars: ✠305 (-31.77%)
Mutual labels: llvm
Sericum
(Toy) Compiler Infrastructure influenced by LLVM written in Rust
Stars: ✠366 (-18.12%)
Mutual labels: llvm
Llvm
Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Stars: ✠424 (-5.15%)
Mutual labels: llvm
Rapidus
A toy JavaScript engine implemented in Rust from scratch
Stars: ✠390 (-12.75%)
Mutual labels: llvm
StaticScript
Real Static Typed Script - RSTS project.
StaticScript is a language on top of TypeScript as frontend and LLVM as backend for code-generation to binary.
How it was implemented
My talk about How it's working on hight level and about V8/JIT and etc
I prepared two talks on PiterJS meetup with explanation about how it was implemented
Part 1
Part 2
(Video)(Sorry, but due technical problems on meetup It was not recorded)
Installing
For latest stable version:
npm install -g static-script
Let's write simple example
Put it in calculate-pi.ts
{
function calculatePI(cycles: number): number {
let inside = 0;
for (let i = 0; i < cycles; i++) {
let x = Math.random() * 2 - 1;
let y = Math.random() * 2 - 1;
if ((x*x + y*y) < 1) {
inside++
}
}
return 4.0 * inside / cycles;
}
console_log(calculatePI(1000000000));
}
Next compile it:
$ ./bin/ssc calculate-pi.ts
Next run it:
$ time ./output/main
This will produce:
3.144800
./output/main 0,01s user 0,00s system 80% cpu 0,013 total
LICENSE
This project is open-sourced software licensed under the MIT License.
See the LICENSE file for more information.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].