wpilibsuite/wpilib-docs

Cross compile WPILib to Javascript for use in interactive docs tutorials

Offen

#1.831 geöffnet am 23.05.2022

 (5 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (297 Forks)auto 404
Component: ControlsHelp Wanted

Repository-Metriken

Stars
 (187 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 7T 6h) (14 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide