npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tsll

v1.0.0-alpha.11

Published

Compiler frontend for translating Typescript to LLVM IR

Downloads

27

Readme

Actions Status npm version

What is tsll?

Tsll is a Typescript compiler frontend for LLVM IR generation. Our goal of this work is to verify blockchain smart contracts through the generated IR. Before we transpile Node.js code in Typescript into Javascript artifacts, tsll combined with other backend analysis tools could provide a powerful framework to search for vulnerabilities and security issues as smart contract developers would not realize while writing such smart contracts.

Design idea

Tsll extracts information on Abstract Syntax Tree (AST) generated with Typescript Compiler API by visiting each node, and create instructions accordingly with LLVM Typescript bindings to achieve the final IR generation.

For more detail, go to wiki pages

Prerequisite

Follow the steps to build the source code in LLVM project. I highly recommend using the build tool Ninja as it is fast and simple. Below are a few steps you could start from.

  1. Clone the LLVM project repository and enter the project directory via git clone https://github.com/llvm/llvm-project.git and cd llvm-project
  2. Choose a tag from the list and check out into a branch by running git tag -l and git checkout tags/<tag> (Replace <tag> for with your tag choice)
  3. Generate Ninja build files with cmake -S llvm -B build -G Ninja
  4. cmake --build build to start building your LLVM from the Ninja build files (This may take a while)

Note that we use LLVM 13.0.0 to convert Typescript to LLVM Intermediate Representation in this project so you might want to build this LLVM version for compatibility purposes.

Install

npm install tsll

Usage

tsll can be run as a command as you normally would. Just type the following command to see more options on your favorite terminal.

tsll -h

Development

For those who would like to develop this project together, please check out below.

git clone this repo, and make sure you have already installed LLVM before npm i.

Code Style

This project is developed generally with Typescript style guide to attain better maintainability and readability.

References

A list of resources regarding LLVM and Typescript Compiler API documentation is provided below so that you can get started with this project to contribute if you will.

  • https://github.com/microsoft/TypeScript/blob/d8e830d132a464ec63fd122ec50b1bb1781d16b7/doc/spec-ARCHIVED.md
  • https://releases.llvm.org/11.0.0/docs/LangRef.html
  • https://ts-ast-viewer.com/#
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
  • https://github.com/emlai/ts-llvm

Disclaimer

By using this project, you agree that we as SBIP developers of tsll have no legal obligations in any form to your usage.