WCSE 2021
ISBN: 978-981-18-1791-5 DOI: 10.18178/wcse.2021.06.003

B2GPAPI: an Efficient Framework Providing C/C++ Runtime in Web-based OS

Hao Xu, Long Peng, Tao Mao, Jun Ma, Shasha Li, Jie Yu, Qingbo Wu

Abstract— In the Internet era, mobile devices have become more and more popular because of their portability. Web-based operating system (OS) is a mobile operating system based on web technologies and has great potential for growth. However, mobile applications are mainly developed for Android and iOS, and cannot run in a Web-based OS due to the incompatibility between different platforms. Aiming to expand the application ecosystem of the Web-based OS and based on the fact that many mature applications’ low-level code is written in C/C++, we propose B2GPAPI, a framework that provides a runtime for C/C++ applications in the Web-based OS. B2GPAPI makes it possible that existing mature mobile applications can directly run in a Web-based OS. To implement the framework, on the one hand, we employ thehtml tag in web applications as a connection with the dynamic link library of the C/C++ application; on the other hand, in Web engine of the Web-based OS, we provide an event interface to deliver the event information from web application to the C/C++ application and a graphic rendering interface to display the interface of the C/C++ applications. In order to verify the efficiency of the framework, we compare B2GPAPI’s graphics rendering interface with the WebGL interface. Experimental results show that B2GPAPI has good practicability and outperforms than WebGL.

Index Terms— HTML5, WebGL, Open GL ES, C/C++, Web-based OS

Hao Xu
College of Computer, National University of Defense Technology, CHINA
Long Peng
College of Computer, National University of Defense Technology, CHINA
Tao Mao
Kylin Software Co., CHINA
Jun Ma
College of Computer, National University of Defense Technology, CHINA
Shasha Li
College of Computer, National University of Defense Technology, CHINA
Jie Yu
College of Computer, National University of Defense Technology, CHINA
Qingbo Wu
College of Computer, National University of Defense Technology, CHINA

[Download]


Cite: Hao Xu, Long Peng, Tao Mao, Jun Ma, Shasha Li, Jie Yu, Qingbo Wu, "B2GPAPI: an Efficient Framework Providing C/C++ Runtime in Web-based OS ," 2021 The 11th International Workshop on Computer Science and Engineering (WCSE 2021), pp. 13-22, Shanghai, China, June 19-21, 2021.