Skip to main content

Mechanism

Let's see how Jenova transforms C/C++ into a Scripting Language and discover where the magic happens!

GuideImage_JenovaFrameworkAnatomy

Jenova Framework Anatomy, Demonstrates the internal workings of the Jenova framework.

Anatomy

Jenova Framework is assembled from following components :

A. Build System

Jenova has a complete build system similar to Visual Studio project files. You can Build, Clean, and Rebuild projects. The build system is responsible for collecting, preprocessing, compiling, and parsing C++ scripts in your Godot project.

  • Script Manager: Responsible for creating, removing, collecting, and identifying C++ Scripts within your project. Each C++ file in the project will create a C++ Script Object in the Script Manager. While compiling, the Script Manager assigns each script a Unique Identifier and detects if it is an Active Script or Passive Script.

    Information

    Active Script: An active script is a C++ script attached to a node present in the scene tree. It contains script events and will be executed like GDScript.

    Passive Script: A passive script is a C++ script in the project but not attached to any node or the attached node is not present in the current scene tree. Passive scripts can contain Exported Functions, Boot Setup, Utility Functions, etc.

  • Compiler Interface : Jenova features a flexible compiler interface composed of various stages, Including the Preprocessor, Compiler, and Linker. This design allows for easy integration with any C/C++ build toolchain.

  • Symbol Parser : After a successful build, Jenova Symbol Parser analyzes the compiled binary and extracts the required data for the interpreter, known as "Metadata". Metadata contains information about Scripts, Offsets, Types etc.

  • Deployer: When you build your Godot game, Jenova Deployer will encrypt and compress the compiled code and its metadata, Adding it to the game build package file. It also removes all C++ script sources from the exported package to prevent your C++ script sources from being leaked. However, This is an option that can be customized.

    📖 Learn more about Jenova Editor Settings

B. Runtime

Jenova Runtime is the main core of the Jenova Framework. It's responsible for the execution process of built C++ scripts.

  • Module Mapper: Responsible for allocation and mapping the Jenova Module compiled code to memory, Preparing it for execution. Jenova doesn't load executable files from disk instead it dynamically maps them into executable memory pages.

  • Interpreter: One of the most important and core components of the runtime, Jenova Interpreter uses the information stored in Metadata to Manage Properties, Call Functions and return results from the compiled code. Jenova Interpreter features different backends which can be changed from the settings.

    📖 Learn more about Jenova Interpreter

C. Utilities

  • Integrated Development: Jenova enables the creation of C/C++ and header files offering seamless in-editor C++ code editing.

  • Template Manager: Manages C++ script templates. The Jenova Template Manager provides templates both globally and on a class basis.

  • Asset Monitor: Responsible for tracking changes applied to C++ scripts and headers. This is useful for the automated Hot-Reload feature.

  • Task System: Jenova features a minimal yet powerful task system for multi-threading powered by libpthread. It is used in various parts of the Jenova editor plugin such as the package manager and it also exposes an API to JenovaSDK.

  • Package Manager: A user-friendly package manager designed for Jenova users to easily download official packages prepared for the Jenova Framework. It includes compilers, GodotKits, libraries, addons, etc.

  • Exporter: Jenova is capable of exporting projects to various outputs. It can currently generate and integrate your entire codebase to Visual Studio for ultimate code editing. It can also export projects to GDExtension.

    Note

    At the moment, Jenova Framework does not have a Debugger and Profiler implementation but these will be added in the future.

D. Development Kit

Pipeline