Coder Social home page Coder Social logo

language-piranha's Introduction

Alt text

Piranha is an open-source scripting framework currently under development. It is a reusable framework which allows developers to quickly write scripting interfaces to native C++ libraries.

Piranha is currently used as an SDL (scene description language) for the MantaRay ray-tracer.

For syntax highlighting in Visual Studio Code check out the Piranha Visual Studio Code Extension.

To get started, check out the introductory handbook: Piranha Handbook

Example Piranha compiler implementation: Hello World Piranha Compiler

Design Scripting Interfaces For Your Native Libraries

Write interfaces to your native code with full type-checking, syntax checking and error reporting, syntax highlighting, support for importing libraries and more!

Alt text

Design Robust Configuration Languages

Skip writing your own parser and implement your own custom configuration language using Piranha. Piranha supports advanced features like binary and unary operations, custom functions and variables which can simplify tasks like writing configuration files.

Alt text

Design Complex Node-Based Systems

Piranha was designed for the unique demands of a ray-tracer SDL (scene description language) where a user may want to write shaders, specify multiple render jobs in a particular sequence, perform image post processing and a number of other operations. Custom logic written in Piranha has a comparable runtime to native code!

Alt text

Setup Instructions For Developers

Only a few steps are required to begin contributing to Piranha.

Install Dependencies

I have tried to rely on as few dependencies as possible and at some point may eliminate these dependencies as well, but for now you'll have to live with the pain. Install the following:

  1. CMake
  2. Boost (make sure to build the optional dependencies as well)
  3. Flex
  4. Bison

Build with CMake

After cloning the Piranha repository, cd into the repository and run the following commands:

mkdir build
cd build
cmake ..
cmake --build .

If using MSVC, to set whether it is a Release or Debug build, run the last step like this:

cmake --build . --config Release

If using MSVC, CMake will output a Visual Studio solution which you can use for development and debugging. You can also try running the reference compiler directly piranha_reference_compiler.

You are now ready to begin development!

language-piranha's People

Contributors

ange-yaghi avatar phire avatar

Watchers

 avatar

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.