Skip to content

Reimplementation of "PNut for Windows" in typescript

License

Notifications You must be signed in to change notification settings

ironsheep/PNut-TS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

604 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PNut Re-implementation in TypeScript (PNut-TS)

Project Maintenance

License

NodeJS

Release

GitHub issues

A joint project between Chip Gracey and Stephen M Moraco. Reimplementation Pnut for Windows in a platform agnostic language.

We welcome testing help

While this is no longer our first release, we hope is that our community can help us expand our testing beyond what we've been able to do to help us find any compilation issues we may not have found. Our regression test suite is reasonably large (currently 180+ individual .spin2 compiles which generate coverage reports that allow us to quickly find regions of code that we haven't tested.) but there is no such thing as too much testing!

The page Testing PNut-TS will help you learn how to test and identify what to report when you find an issue.

Table of Contents

On this Page:

Additional pages:

PNut-TS Features

The features of this new implementation are:

  • A full P2 Compiler (equivalent to PNut on Windows) for all platforms
  • Written in a language which is relatively easy to maintain
  • A command line tool with standard option processing
  • Has a full featured light-weight preprocessor
  • Listing, object, and binary compatible with PNut of same version.
    (PNut v43, initially (at testing release), now at PNut v51a with this release.)
  • Internal table-size-limits are now easy to adjust if we find a need.

Installing PNut-TS

Install .zip files available for each release:

Archive Name Operating System Architecture Contents
pnut-ts-linux-arm64-{MMmmpp}.zip Linux, RPi ARM 64 bit pnut_ts/ folder
pnut-ts-linux-x64-{MMmmpp}.zip Linux Intel x86-64 bit pnut_ts/ folder
pnut-ts-macos-arm64-{MMmmpp}.zip macOS Apple Silicon DMG installer
pnut-ts-macos-x64-{MMmmpp}.zip macOS Intel x86-64 bit DMG installer
pnut-ts-win-arm64-{MMmmpp}.zip Windows ARM 64 bit pnut_ts/ folder
pnut-ts-win-x64-{MMmmpp}.zip Windows Intel x86-64 bit pnut_ts/ folder

NOTE: where {MMmmpp} is the packed release version. (E.g., 014303 means v1.43.3, 015107 means v1.51.7)

Installation is pretty easy for PNut-TS. Here are the general steps: (more specific instructions links are below.)

  • Identify and download the .zip file for your platform and architecture (from the latest release.)
  • Unzip the file:
    • Windows/Linux: Creates a pnut_ts/ folder containing the executable
    • macOS: Contains a signed and notarized DMG installer
  • On Windows, Linux move the pnut_ts/ folder to your preferred install location.
    On macOS open the DMG and drag the pnut_ts/ folder to the /Applications folder. (This is a signed and notarized application so it should run without Gatekeeper warnings.)
  • Setup an environment variable (typically PATH) so that the pnut_ts (or pnut-ts) executable can be referenced from anywhere.
  • Run VSCode with the Spin2 extension (v2.3.0 or later) to ensure that the installed compiler was found.

See detailed installation instructions for; macOS, Windows, and Linux/RPi.

That's really all there is to it!

Repository Configuration

This project is configured to run in a docker container. Docker is essentially a way to run stuff in a local sandboxed environment. The environment is specified by a docker image, and its main component is a snapshot of all files that are needed to run.

Wanting to clone the PNut_TS repository locally and run regression tests, or even maybe contribute to this compiler? Then start with Installing Docker Desktop to your machine. See Overview of Docker Desktop at the Docker website.

In general if you've not used docker before you'll follow these steps to get up and running:

VSCode will tell docker what image needs to be downloaded and then it will start the container and then ask you to [Reopen in Container]. Once you do reopen VSCode will then install the NPM packages to get your local copy ready to build and run.

Linting and formatting of TypeScript is setup using Prettier formatter and ESLint. See How to use Prettier with ESLint and TypeScript in VSCode


If you like my work and/or this has helped you in some way then feel free to help me out for a couple of ☕'s or 🍕 slices or support my work by contributing at Patreon!

coffee    -OR-    PatreonPatreon.com/IronSheep


License

Licensed under the MIT License.

Follow these links for more information: