# LLVM Compiler Research Internships Add Clang-REPL Autocompletion and WebAssembly Support

DevFeed: [LLVM Compiler Research Internships Add Clang-REPL Autocompletion and WebAssembly Support](<https://devfeed.tech/articles/another-step-forward-towards-interactive-programming-43099.md>)

Original publisher: [Read original article](<https://blog.llvm.org/posts/2023-12-31-compiler-research-internships-2023/>)

Author: QuillPusher (Saqib)

Published: 2023-12-31T00:00:00Z

Content type: news

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [clang](<https://devfeed.tech/topics/clang.md>), [code-completion](<https://devfeed.tech/topics/code-completion.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [jupyter](<https://devfeed.tech/topics/jupyter.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [clang-repl](<https://devfeed.tech/tags/clang-repl.md>), [code-completion](<https://devfeed.tech/tags/code-completion.md>), [compiler-research](<https://devfeed.tech/tags/compiler-research.md>), [jupyter](<https://devfeed.tech/tags/jupyter.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rust](<https://devfeed.tech/tags/rust.md>), [web-browser](<https://devfeed.tech/tags/web-browser.md>)

## AI overview

The LLVM Compiler Research team reports on internship projects that improve interactive C++ programming with Clang-REPL. The work includes context-aware autocompletion and an approach for running Clang-REPL in WebAssembly on the client side through a web browser and Jupyter.

## Source excerpt

The Compiler Research team is pleased to announce the successful completionof another round of internships focused on enhancements in interactiveprogramming, specifically in relation to the Clang-REPL component in LLVM. The Compiler Research team includes researchers located at Princeton Universityand CERN. Our primary goal is best described as follows: To establish a proficient workflow in LLVM, where interactive development inC++ is possible, and exploratory C++ becomes an accessible experience to awider audience. Following are some notable contributions by our interns this year. Yuquan Fu - Autocompletion in Clang-REPL Clang-Repl allows developers to program in C++ interactively with a REPLenvironment. However, it was missing the ability to suggest code completion orauto-complete options for user input, which can be time-consuming and prone totyping errors. With this code completion system, users can either complete their input quicklyor see a list of valid completion candidates. The code completion is alsocontext-aware, providing semantically relevant results based on the currentposition and input on the current line. Mentors: Vassil Vassilev (Princeton.edu) & David Lange (Princeton.edu) Project Details: Autocompletion in Clang-REPL Funding: Google Summer of Code 2023 Example - avoiding tedious typingclang-repl> struct WhateverMeaningfulLoooooooooongName{ int field;};clang-repl> Wh<tab> With code completion, hitting tab completes the entity name: clang-repl> WhateverMeaningfulLoooooooooongName For implementation details, please see the respective slides and theblog. Anubhab Ghosh - WebAssembly Support for Clang-Repl The Xeus Framework enables accessing Clang-REPL (an interpreter that JITcompiles C++ code into native code) in a web browser, using Jupyter. However,this shifts the computational load to the server. A more scalable approach is to use WebAssembly. It allows sandboxed executionof native (e.g. C/C++/Rust) programs compiled to an intermediate bytecode at