Compliance with future greenhouse gas (GHG) and pollutant emissions poses major challenges for the further development of advanced internal combustion engines for light and heavy-duty applications. To meet all standards, the use of synthetic fuels and/or E-Fuels is an important alternative due to their enormous potential in terms of energy density, sustainability and low pollution combustion. However, the increased fuel diversity associated with the use of these alternative fuels adds an additional layer of complexity to the powertrain development and calibration process, resulting in an increase in development time and cost. This necessitates the application of advanced model-based closed-loop control strategies to optimize the fuel- and air-path calibration to make best use of the properties of the different fuels. One potential solution to address the impact of flex-fuel variances on the combustion process is the Combustion Rate Shaping (CRS) concept presented in this paper. It can maintain a desired combustion trace irrespective of fuel variations, hardware drifts and other external factors, thus ensuring optimal combustion. The highest benefit of this control concept comes from its application directly on the engine control unit (ECU) in combination with an in-cylinder measurement. This enables the online real-time control of the combustion, regardless of which fuel is being used. In addition, this also enables optimization and adaption of the fuel- and air-path settings to the used fuel while driving the vehicle. However, so far, the high computational cost of this control concept limits its real-time capability. Therefore, the optimization of the control concept to achieve real-time capability is the focus of this paper. The optimized control strategy is implemented on a demonstrator engine test bench built using a Rapid Control Prototyping (RCP) system. The controller performance is demonstrated both under steady-state and transient operating conditions, and the potential of the concept is demonstrated in several cases such as engine temperature variations, injector drift, individual cylinder balancing, and fuel-variation.