![](/img/trans.png)
[英]is it possible to use the emscripten wasm port of sdl in cheerp?
我最近開始使用 cheerp,我想知道我是否可以在 cheerp 中使用 emscripten SDL 庫,或者是否有用於 cheerp 的 SDL 端口 ...
[英]is it possible to use the emscripten wasm port of sdl in cheerp?
我最近開始使用 cheerp,我想知道我是否可以在 cheerp 中使用 emscripten SDL 庫,或者是否有用於 cheerp 的 SDL 端口 ...
[英]What C++ [[attributes]] are implemented by cheerp?
C++11 規范定義了[[attributes]] ,可用於指定/影響實現定義的行為。 Cheerp 支持此功能以指定您是否正在編寫 C++ 代碼以編譯為[[cheerp::genericjs]]或[[cheerp::wasm]]代碼。 這會導致您的 C++ 代碼分別被編譯成編譯器的.js或. ...
[英]How do I load a cheerp-wasm program in absence of a 'path' module?
Cheerp 有一個cheerp-wasm目標,它將 C++ 編譯為.js及其關聯的.wasm文件。 我理解它的方式是.js文件實際上是 web 程序集的加載器。 此 加載器調用require("path")來導入所需的文件系統功能,以將.wasm作為文件加載。 我的代碼運行的環境(Screep ...
[英]How to iterate over dynamically named objects in Cheerp/js?
Cheerp是一個 C++ 到 js/wasm 的轉譯器。 使用 C++,我可以通過靜態定義 object(及其成員)的類型和名稱來與extern Javascript 對象交互。 下面以object為例: 將example1靜態定義為帶有 itemA/itemB 作為子結構的結構將是微不足道的 ...
[英]How do I interface with extern variables from Cheerp/js?
Cheerp是一個 C++ 到 js/wasm 的轉譯器。 Screeps是一款編程視頻游戲。 如何從轉譯的 C++ 代碼中讀取Game.time變量? (在爬行中) 我嘗試了多種變化: extern , volatile和static 引用和指針 client和cheerp名稱空間繼承自 ...
[英]How to preserve variable name in Cheerp (a C++ to JavaScript transpiler)
我正在使用 Cheerp ( https://www.leaningtech.com/cheerp/ ) 將一些 C++ 代碼轉換為 JavaScript。 有沒有保留變量名的選項? 看起來名字總是亂七八糟 原始 C++ 代碼: Cheerp 的輸出: 我在文檔中找不到任何選項: http ...