wpilibsuite/wpilib-docs

Cross compile WPILib to Javascript for use in interactive docs tutorials

开放

#1,831 创建于 2022年5月23日

 (5 条评论) (1 个反应) (0 位负责人)JavaScript (297 个派生)auto 404
Component: ControlsHelp Wanted

仓库指标

星标
 (187 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Emscripten lets you cross compile C++ into Javascript. We could use this to run potentially any part of WPILib simulation in a browser.

Apparently Eigen works fine with this: https://eigen.tuxfamily.narkive.com/Yf7dM1wo/status-of-building-with-emscripten-running-code-in-a-web-browser. At the very least, we could cross compile our DARE solver so we can use it in the forthcoming PID tuning interactive tutorial.

If possible, I'd suggest writing a makefile that invokes em++ on each .cpp file and generates a .js file so the docs can just call JS functions.

贡献者指南