GithubHelp home page GithubHelp logo

plick's Introduction

plick

A PL/1 Compiler for Microcomputers (Micro PL/1).

Plick is a LLVM Frontend Compiler for a very much work-in-progress dialect of PL/1 called Micro PL/1.

Install

Dependencies

  1. LLVM version 14.0
  2. A C compiler for linking (tested to work with both GCC and Clang)

Windows Setup

Tested on Windows 11

To make a working copy of plick from source, you will require a copy of LLVM 14.0. Plick's tests also requires C/C++ development tooling, such as MSVC or Mingw-w64. Because Rust also uses LLVM you already have one of these - by default, MSVC.

  • Follow these instructions to build LLVM from source and install on your machine.
  • Set the LLVM_SYS_140_PREFIX environment variable to the path of your built LLVM root to get the llvm-sys dependency working.

Once LLVM is set up, plick should be able to run. Note that by default the outputted object files will share the target of your current Rust toolchain. For most people on Windows, that means the object files will be for the x86_64-pc-windows-msvc target.

NOTE: cargo test on the MSVC toolchain assumes command-line access to Microsoft's cl compiler. The easiest way to provide access is to run cargo test from a Visual Studio Developer Command Prompt.

  • Compile a pli file from the project with cargo run -- <PATH TO FILE HERE>

  • Link the file to create the executable with the following command: cl <file name here> /link msvcrt.lib legacy_stdio_definitions.lib

  • You should now have an executable ready to run

Linux Setup

Tested on Debian 12 Bookworm

Install the following packages:

  • llvm-14-dev
  • libpolly-14-dev
  • zlib1g-dev
  • build-essential

Compile .pli files into .o files with cargo run -- <PATH TO FILE HERE>. Link to executable files with cc -o <OUTPUT FILE NAME> <PATH TO OBJ FILE HERE> -lm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.