• Stars
    star
    257
  • Rank 158,728 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

High performance scripting and specification language.

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!

More Repositories

1

engine-sim

Combustion engine simulator that generates realistic audio.
C++
8,669
star
2

manta-ray

An open source physically based renderer.
C++
752
star
3

simple-2d-constraint-solver

Simple physics simulator with support for rigid bodies, force generators and constraints.
C++
575
star
4

delta-studio

A game engine currently under development.
C++
347
star
5

direct-to-video

Easily write MP4 videos from a C++ application.
C++
205
star
6

scs-2d-demo

Demo for the Simple 2D Constraint Solver.
C++
86
star
7

cereal-adventure

Platform game concept made with the Delta engine.
C++
52
star
8

delta-template

Template for creating applications that use the Delta Game Engine.
C++
36
star
9

engine-generator

Python engine generator for Engine Simulator
Python
22
star
10

cmake-template

Template for creating C++ projects that use CMake.
CMake
20
star
11

visualcpp_template

Template I use for my Visual C++ projects.
Python
13
star
12

atg-math

C++
12
star
13

piranha-vscode-extension

Visual Studio Code extension for the Piranha language.
9
star
14

csv-io

Simple library for IO using the CSV format.
C++
9
star
15

gradus

Command line utility to teach music composition
C++
6
star
16

ange-yaghi

Just personal information about me.
5
star
17

toccata

A program that monitors real-time input from a MIDI keyboard and tracks mistakes and timing accuracy.
C++
5
star
18

ant-world

Be your own ant in an anthropomorphic ant world!
C++
3
star
19

console_clock

Simple command line clock utility.
C++
2
star
20

tactical-destruction

A strategy and planning game I made in 2013.
C++
1
star
21

personal-finance-tracker

Database application to track personal finances.
C++
1
star
22

urbanity

Experimental project to generate photorealistic cityscapes.
C++
1
star
23

console_lib

CMake
1
star
24

beef-planet

C++
1
star
25

gstreamer-sandbox

Just a sandbox project to learn gstreamer.
C
1
star