Coder Social home page Coder Social logo

praveenmunagapati / rcrl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onqtam/rcrl

0.0 0.0 0.0 137 KB

Read-Compile-Run-Loop: tiny and powerful interactive C++ compiler (REPL)

Home Page: http://onqtam.com/programming/2018-02-12-read-compile-run-loop-a-tiny-repl-for-cpp/

License: MIT License

CMake 14.67% C++ 79.67% C 5.66%

rcrl's Introduction

Read-Compile-Run-Loop: tiny and powerful interactive C++ compiler (REPL)

Windows status Linux Status Language License

RCRL is a tiny engine for interactive C++ compilation and execution (implemented in just a few source files - src/rcrl) and works on any platform with any toolchain - the main focus is easy integration. It supports:

  • mixing includes, type/function definitions, persistent variable definitions and statements meant only for function scope
  • interacting with the host application through dll-exported symbols (after linking to it)

gif showcase

It is an elegant alternative to cling (and other projects that are built on top of it).

This repository is a demo project with GUI but the RCRL engine can be integrated in any way with host applications - code may be submitted even from external editors with full syntax highlighting and code completion! The goal was not to make a one-size-fits-all solution because that is hardly possible - but to demonstrate how the core of RCRL can be integrated.

Checkout this blog post if you are curious how to use it, how it works and how to integrate it.

Building

The demo is tested on Windows/Linux/MacOS and uses OpenGL 2.

You will need:

  • CMake 3.0 or newer
  • A C++14 capable compiler (tested with VS 2015+, GCC 5+, Clang 3.6+)

The repository makes use of a few third party libraries and they are setup as submodules of the repo (in src/third_party/). Here are the steps you'll need to setup, build and run the project after cloning it:

  • git submodule update --init - checks out the submodules
  • cmake path/to/repo - call cmake to generate the build files
  • cmake --build . - compiles the project
  • the resulting binary is host_app in bin of the build folder

Watch this video to see it in action with commentary:

youtube video showcase

rcrl's People

Contributors

onqtam 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.