Improving /C++ Open Source Software Discoverability by Utilizing Rust and Node.js Ecosystems Kyriakos-Ioannis Kyriakou, Nikolaos Tselikas, Georgia Kapitsaki

To cite this version:

Kyriakos-Ioannis Kyriakou, Nikolaos Tselikas, Georgia Kapitsaki. Improving C/C++ Open Source Software Discoverability by Utilizing Rust and Node.js Ecosystems. 14th IFIP International Con- ference on Open Source Systems (OSS), Jun 2018, Athens, Greece. pp.181-192, ￿10.1007/978-3-319- 92375-8_15￿. ￿hal-01875486￿

HAL Id: hal-01875486 https://hal.inria.fr/hal-01875486 Submitted on 17 Sep 2018

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés.

Distributed under a Creative Commons Attribution| 4.0 International License Improving C/C++ Open Source Software discoverability by utilizing Rust and Node.js ecosystems

Kyriakos-Ioannis D. Kyriakou1, Nikolaos D. Tselikas1 and Georgia M. Kapitsaki2

1 Communication Networks and Applications Laboratory, Department of Informatics and Tele- communications, University of Peloponnese, End of Karaiskaki Street, 22 100, Tripolis, Greece 2 Department of Computer Science, University of Cyprus, 75 Kallipoleos Street, P.O. Box 20537, CY-1678 Nicosia, Cyprus {kyriakou, ntsel}@uop.gr, [email protected]

Abstract. Discovering Open Source Software (OSS) components efficiently is not always an easy task. Node.js is a popular JavaScript runtime environment, whereas Rust is widely used for system programming, and both can be utilized for OSS discovery purposes. In this work, we examine whether Rust and Node.js can be used, along with their respective tooling and package repositories, in order to achieve improved discoverability of existing OSS implemented in C/C++. The paper describes how the capabilities of Rust in C/C++ interoperability can be combined with novel compilation techniques of low-level code to asm.js and WebAssembly, in order to harness JavaScript’s popularity as the medium to pub- licize hard to discover C/C++ OSS. A proposed incremental methodology is pre- sented and the main, as well as the collateral, effects of enforcing the proposed methodology in a proof-of-concept situation are examined. Our findings indicate potential increase in discoverability, code quality, portability, along with viable performance degradation of portable binaries, demonstrating 8.7 times slower execution compared to machine code, in a worst-case scenario.

Keywords: Free Open Source Software, Software Discoverability, Software Per- formance Evaluation, Software Convergence, Software Interoperability, C/C++, WebAssembly, Node.js, Rust.

1 Introduction

Node.js [1] is an open source JavaScript (JS) runtime built around V8 [2], the JS engine used in , the base for Google's . It has gained massive adoption by developers and organizations around the world, because of its ease of development, as well as the efficient, event-driven and non-blocking input/output (I/O) model. Ac- cording to the results of the 2017 annual survey conducted by Stack Overflow, JS has been declared as the most popular programming language for the fifth consecutive time [3]. The overall shifts in popularity throughout the years the survey has been conducted, displays both JS and Node.js as technologies with the greatest gain in traction among all popular choices; thus, representing the ubiquity of JS as a programmi