Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】 clang.js - 在浏览器运行 C/C++ 代码的 JS 库 #3297

Open
luoxuhai opened this issue Jul 23, 2023 · 0 comments
Open
Labels

Comments

@luoxuhai
Copy link

luoxuhai commented Jul 23, 2023

image

简介

一个在浏览器编译、链接、运行 C/C++ 代码的 JS 库。支持 C/C++ 标准库。完全在本地编译,无需网络即可工作。

原理

首先把 Clang 和 LLD 编译为 WebAssembly 使其运行在浏览器中。然后使用 WebAssembly 版本 Clang 把 C/C++ 代码编译为 WebAssembly,最后通过浏览器 API 运行 WebAssembly。

示例

https://clangjs.netlify.app

应用场景

  • 在线编程
  • C/C++ Playground

GitHub

https://github.com/luoxuhai/clang.js

@luoxuhai luoxuhai changed the title 【开源自荐】 clang.js - 在浏览器运行 C/C++ 代码 【开源自荐】 clang.js - 在浏览器运行 C/C++ 代码的 JS 库 Jul 23, 2023
@ruanyf ruanyf added the weekly label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants