vczh-libraries / Workflow

Debuggable script language for interoperation with C++ using reflection.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Workflow

Debuggable script language for interoperation with C++ using reflection, which can also generate C++ code.

License

This project is licensed under the License repo.

Source code in this repo is for reference only, please use the source code in the Release repo.

You are welcome to contribute to this repo by opening pull requests.

Document

  • For Gaclib: click here
  • For Workflow: click here
    • Using Workflow in C++: click here
    • Sample code for above document: click here
    • Workflow language reference: click here

Features

Executing Workflow by C++ code generation

Workflow scripts are able to be converted to equivalent C++ code.

If all scripts are known at compile time, this could significantly improve the script performance.

You can also get rid of runtime reflection overhead in this way.

Executing Workflow script directly

  • Workflow and C++ classes call each other by reflection.
  • Serialize compiled script to a file in binary format, you don't need to call the compiler every time.
  • bind(EXPR) expression creates a subscriptable object to observe changing of the expression value.
  • Coroutine allows implementing Enumerable and Async by coroutine functions.
  • Coroutine allows creating your own coroutine syntax.
  • State Machine offers a new way to write classes, taking methods as input and drive the state machine forward.
  • Being able to install a debugger on a thread to track Workflow script.

Unit Test

For Windows, open Test/UnitTest/UnitTest.sln, and run the following projects in order:

  • CompilerTest_GenerateMetadata : Generate metadata file for involved C++ types (including classes only for unit test).
  • CompilerTest_LoadAndCompile : Load the generated metadata, compile and run Workflow scripts, and generate C++ code from Workflow scripts.
  • CppTest : Run generated C++ code.
  • CppTest_Metaonly : Run generated C++ code.
  • CppTest_Reflection : Run generated C++ code.
  • LibraryTest : Test built-in library for Workflow.
  • RuntimeTest : Test Workflow debugger.

For Linux, use Test/Linux/*/makefile to build and run unit test projects as described above.

About

Debuggable script language for interoperation with C++ using reflection.

License:Other


Languages

Language:C++ 96.1%Language:Makefile 3.8%Language:C 0.1%Language:CMake 0.0%