| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A cross-platform AOT compiler that enables running TypeScript as native code via LLVM.
It targets developers who want the ergonomics of TypeScript with the performance of C++.
Key features:
Target audience:
Use the prebuilt Docker image with all dependencies and compiled project:
# pull the image
docker pull ghcr.io/newcloudtechnologies/tsnative:latest
# run it
docker run -it ghcr.io/newcloudtechnologies/tsnative
# build the sample project
cd boilerplate/
npm run buildYou can also build the image locally from source:
docker build -t tsnative .
docker run -it tsnativeClone the repository:
git clone --depth 1 --branch master git@github.com:newcloudtechnologies/tsnative.git
cd tsnativeInstall system dependencies:
./scripts/setup.shInstall Conan settings and profiles:
conan config install ./settings.yml
conan config install -tf profiles ./profiles/linux_x86_64_gcc9
conan config install -tf profiles ./profiles/linux_x86_64_gcc9_debugBuild third-party dependencies:
conan create 3rdparty/zlib 1.2.12@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/llvm 11.1.0@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/abseil 20211102.0@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/gtest 1.11.0@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/libuv 1.43.0@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/graphvizlib 1.0.0@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create 3rdparty/llvm-node 3.0.9@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9Build main packages:
conan create declarator/ 0.3@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9
conan create std/ 0.3@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9 -o build_tests=True -o enable_logs=all
conan create compiler/ 0.3@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9# -o runmode and -o test_filter are optional
conan create test/ 0.3@ -pr:b linux_x86_64_gcc9 -pr:h linux_x86_64_gcc9 -o run_mode=compile -o test_filter=forThe boilerplate folder contains a test project demonstrating tsnative usage.
Basic commands:
npm run build # build
npm run clean # clean artifacts
npm run rebuild # rebuildThe compiled binary will be located at: boilerplate/out/<cmake_project_name>
The project consists of 3 parts.
Compiler's output is LLVM IR and then it compiled via LLVM into a platform executable file.
The project implements a subset of TypeScript and has certain limitations when integrating with C++.
A summary is available in LIMITATIONS.md
We welcome all contributions — code, tests, docs, or ideas.
Please read CONTRIBUTING.md before submitting changes.
We've a telegram channel to support, please, join and send your question.
| Back | FazBrowse Home | New Git URL |