├── .gitattributes ├── .github └── workflows │ └── azure-static-web-apps-gray-cliff-03fc78e10.yml ├── .gitignore ├── .gitmodules ├── .vscode ├── c_cpp_properties.json ├── launch.json └── settings.json ├── LICENSE ├── azure ├── docsite │ ├── 404.html │ ├── api │ │ ├── api-c-audio │ │ │ └── index.html │ │ ├── api-c-con │ │ │ └── index.html │ │ ├── api-c-d2d │ │ │ └── index.html │ │ ├── api-c-general │ │ │ └── index.html │ │ ├── api-c-localization │ │ │ └── index.html │ │ ├── api-c-stdlib │ │ │ └── index.html │ │ ├── api-libcpp │ │ │ └── index.html │ │ ├── api-ts-consoles │ │ │ └── index.html │ │ ├── api-ts-library │ │ │ └── index.html │ │ ├── api-ts-memory │ │ │ └── index.html │ │ └── api-ts-modules │ │ │ └── index.html │ ├── assets │ │ ├── images │ │ │ └── favicon.png │ │ ├── javascripts │ │ │ ├── bundle.fe8b6f2b.min.js │ │ │ ├── bundle.fe8b6f2b.min.js.map │ │ │ ├── lunr │ │ │ │ ├── min │ │ │ │ │ ├── lunr.ar.min.js │ │ │ │ │ ├── lunr.da.min.js │ │ │ │ │ ├── lunr.de.min.js │ │ │ │ │ ├── lunr.du.min.js │ │ │ │ │ ├── lunr.el.min.js │ │ │ │ │ ├── lunr.es.min.js │ │ │ │ │ ├── lunr.fi.min.js │ │ │ │ │ ├── lunr.fr.min.js │ │ │ │ │ ├── lunr.he.min.js │ │ │ │ │ ├── lunr.hi.min.js │ │ │ │ │ ├── lunr.hu.min.js │ │ │ │ │ ├── lunr.hy.min.js │ │ │ │ │ ├── lunr.it.min.js │ │ │ │ │ ├── lunr.ja.min.js │ │ │ │ │ ├── lunr.jp.min.js │ │ │ │ │ ├── lunr.kn.min.js │ │ │ │ │ ├── lunr.ko.min.js │ │ │ │ │ ├── lunr.multi.min.js │ │ │ │ │ ├── lunr.nl.min.js │ │ │ │ │ ├── lunr.no.min.js │ │ │ │ │ ├── lunr.pt.min.js │ │ │ │ │ ├── lunr.ro.min.js │ │ │ │ │ ├── lunr.ru.min.js │ │ │ │ │ ├── lunr.sa.min.js │ │ │ │ │ ├── lunr.stemmer.support.min.js │ │ │ │ │ ├── lunr.sv.min.js │ │ │ │ │ ├── lunr.ta.min.js │ │ │ │ │ ├── lunr.te.min.js │ │ │ │ │ ├── lunr.th.min.js │ │ │ │ │ ├── lunr.tr.min.js │ │ │ │ │ ├── lunr.vi.min.js │ │ │ │ │ └── lunr.zh.min.js │ │ │ │ ├── tinyseg.js │ │ │ │ └── wordcut.js │ │ │ └── workers │ │ │ │ ├── search.b8dbb3d2.min.js │ │ │ │ └── search.b8dbb3d2.min.js.map │ │ └── stylesheets │ │ │ ├── main.6543a935.min.css │ │ │ ├── main.6543a935.min.css.map │ │ │ ├── palette.06af60db.min.css │ │ │ └── palette.06af60db.min.css.map │ ├── examples │ │ ├── examples-balls │ │ │ └── index.html │ │ ├── examples-callc │ │ │ └── index.html │ │ ├── examples-divcon │ │ │ └── index.html │ │ ├── examples-fft │ │ │ └── index.html │ │ ├── examples-helloworld │ │ │ └── index.html │ │ ├── examples-lib │ │ │ └── index.html │ │ ├── examples-libcxx │ │ │ └── index.html │ │ ├── examples-maze │ │ │ └── index.html │ │ ├── examples-multi-io │ │ │ └── index.html │ │ ├── examples-overview │ │ │ └── index.html │ │ ├── examples-pong │ │ │ └── index.html │ │ ├── examples-terminal │ │ │ └── index.html │ │ ├── examples-tests-audio │ │ │ └── index.html │ │ └── examples-tests-d2d │ │ │ └── index.html │ ├── gettingstarted │ │ ├── basicsteps │ │ │ └── index.html │ │ ├── charencoding │ │ │ └── index.html │ │ ├── compiler-opts │ │ │ └── index.html │ │ ├── debugging │ │ │ └── index.html │ │ ├── events │ │ │ └── index.html │ │ ├── helloworld │ │ │ └── index.html │ │ ├── installation │ │ │ └── index.html │ │ ├── parameters │ │ │ └── index.html │ │ └── stdio │ │ │ └── index.html │ ├── img │ │ ├── readme-img-2-player-pong.png │ │ ├── readme-img-balls.png │ │ ├── readme-img-fft.png │ │ ├── readme-img-maze.png │ │ ├── readme-img-menu-pong.png │ │ ├── readme-img-single-player-pong.png │ │ ├── readme-img-square.png │ │ └── readme-img-terminal.png │ ├── index.html │ ├── more │ │ ├── building │ │ │ └── index.html │ │ ├── imports │ │ │ └── index.html │ │ ├── production │ │ │ └── index.html │ │ └── wasm-problem │ │ │ └── index.html │ ├── search │ │ └── search_index.json │ ├── sitemap.xml │ └── sitemap.xml.gz ├── examples │ ├── .npmignore │ ├── balls │ │ ├── balls-a.wasm │ │ ├── balls-dbg.wasm │ │ ├── balls.wasm │ │ └── index.html │ ├── callc │ │ ├── callc-a.wasm │ │ ├── callc.wasm │ │ ├── index.html │ │ └── test-file.txt │ ├── dist │ │ ├── balls │ │ │ ├── balls-a.wasm │ │ │ ├── balls-dbg.wasm │ │ │ ├── balls.wasm │ │ │ └── index.html │ │ ├── callc │ │ │ ├── callc-a.wasm │ │ │ ├── callc.wasm │ │ │ └── index.html │ │ ├── divcon │ │ │ ├── divcon.wasm │ │ │ └── index.html │ │ ├── fft │ │ │ ├── index.html │ │ │ └── kiss_fft.wasm │ │ ├── helloworld │ │ │ ├── helloworld.wasm │ │ │ ├── index.7e2c85bd.js │ │ │ ├── index.7e2c85bd.js.map │ │ │ ├── index.html │ │ │ ├── index.runtime.3559a563.js │ │ │ └── index.runtime.3559a563.js.map │ │ ├── index.html │ │ ├── lib │ │ │ ├── index.html │ │ │ ├── testex-a.wasm │ │ │ └── testex.wasm │ │ ├── maze │ │ │ ├── index.html │ │ │ └── maze.wasm │ │ ├── multi-io │ │ │ ├── index.html │ │ │ ├── multi-io-mod.wasm │ │ │ └── multi-io.wasm │ │ ├── pong │ │ │ ├── entry-point-a.wasm │ │ │ ├── entry-point.wasm │ │ │ └── index.html │ │ ├── terminal │ │ │ ├── index.html │ │ │ └── terminal.wasm │ │ ├── test-file.fabefebd.txt │ │ ├── tests-audio │ │ │ ├── croud.mp3 │ │ │ ├── index.html │ │ │ ├── ping.mp3 │ │ │ ├── tests-audio-a.wasm │ │ │ └── tests-audio.wasm │ │ ├── tests-d2d │ │ │ ├── index.html │ │ │ ├── test-img.jpg │ │ │ ├── tests-d2d-a.wasm │ │ │ └── tests-d2d.wasm │ │ ├── tests-libcxx │ │ │ ├── index.html │ │ │ └── tests-libcxx.wasm │ │ ├── tests-timer │ │ │ ├── index.html │ │ │ ├── tests-timer-a.wasm │ │ │ └── tests-timer.wasm │ │ ├── tests-user │ │ │ ├── index.html │ │ │ └── tests-user.wasm │ │ ├── tests │ │ │ ├── index.html │ │ │ ├── tests-dbg-a.wasm │ │ │ ├── tests-dbg.wasm │ │ │ └── tests.wasm │ │ ├── twrmodasyncproxy.49926308.js │ │ └── twrmodasyncproxy.49926308.js.map │ ├── divcon │ │ ├── divcon.wasm │ │ └── index.html │ ├── fft │ │ ├── fft-script.js │ │ ├── fft-script.js.map │ │ ├── fft-script.ts │ │ ├── index.html │ │ └── kiss_fft.wasm │ ├── helloworld-b │ │ ├── helloworld.wasm │ │ └── index.html │ ├── helloworld │ │ ├── helloworld.wasm │ │ └── index.html │ ├── index.html │ ├── lib │ │ ├── index.html │ │ ├── out │ │ │ └── twrlibex.js │ │ ├── testex-a.wasm │ │ ├── testex.wasm │ │ └── twrlibex.ts │ ├── maze │ │ ├── cyberman.bmp │ │ ├── inarrow.bmp │ │ ├── index.html │ │ ├── maze-script.js │ │ ├── maze-script.js.map │ │ ├── maze-script.ts │ │ └── maze.wasm │ ├── multi-io │ │ ├── index.html │ │ ├── multi-io-mod.wasm │ │ └── multi-io.wasm │ ├── pong │ │ ├── entry-point-a.wasm │ │ ├── entry-point.wasm │ │ ├── index.html │ │ ├── jsEventsLib.ts │ │ └── out │ │ │ └── jsEventsLib.js │ ├── server.py │ ├── terminal │ │ ├── index.html │ │ └── terminal.wasm │ ├── tests-audio │ │ ├── clearIODiv.ts │ │ ├── croud.mp3 │ │ ├── index.html │ │ ├── out │ │ │ └── clearIODiv.js │ │ ├── ping.mp3 │ │ ├── tests-audio-a.wasm │ │ └── tests-audio.wasm │ ├── tests-d2d │ │ ├── index.html │ │ ├── test-img.jpg │ │ ├── tests-d2d-a.wasm │ │ └── tests-d2d.wasm │ ├── tests-libcxx │ │ ├── index.html │ │ └── tests-libcxx.wasm │ ├── tests-timer │ │ ├── index.html │ │ ├── tests-timer-a.wasm │ │ └── tests-timer.wasm │ ├── tests-user │ │ ├── index.html │ │ └── tests-user.wasm │ └── tests │ │ ├── index.html │ │ ├── tests-dbg-a.wasm │ │ ├── tests-dbg.wasm │ │ └── tests.wasm ├── google2d031eb6720a1297.html ├── handsitemap.txt ├── index.html ├── lib-js │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ ├── tsconfig.tsbuildinfo │ ├── twrcircular.d.ts │ ├── twrcircular.d.ts.map │ ├── twrcircular.js │ ├── twrcircular.js.map │ ├── twrcon.d.ts │ ├── twrcon.d.ts.map │ ├── twrcon.js │ ├── twrcon.js.map │ ├── twrconcanvas.d.ts │ ├── twrconcanvas.d.ts.map │ ├── twrconcanvas.js │ ├── twrconcanvas.js.map │ ├── twrcondebug.d.ts │ ├── twrcondebug.d.ts.map │ ├── twrcondebug.js │ ├── twrcondebug.js.map │ ├── twrcondiv.d.ts │ ├── twrcondiv.d.ts.map │ ├── twrcondiv.js │ ├── twrcondiv.js.map │ ├── twrcondummy.d.ts │ ├── twrcondummy.d.ts.map │ ├── twrcondummy.js │ ├── twrcondummy.js.map │ ├── twrconterm.d.ts │ ├── twrconterm.d.ts.map │ ├── twrconterm.js │ ├── twrconterm.js.map │ ├── twreventqueue.d.ts │ ├── twreventqueue.d.ts.map │ ├── twreventqueue.js │ ├── twreventqueue.js.map │ ├── twrlibaudio.d.ts │ ├── twrlibaudio.d.ts.map │ ├── twrlibaudio.js │ ├── twrlibaudio.js.map │ ├── twrlibbuiltin.d.ts │ ├── twrlibbuiltin.d.ts.map │ ├── twrlibbuiltin.js │ ├── twrlibbuiltin.js.map │ ├── twrlibdate.d.ts │ ├── twrlibdate.d.ts.map │ ├── twrlibdate.js │ ├── twrlibdate.js.map │ ├── twrliblocale.d.ts │ ├── twrliblocale.d.ts.map │ ├── twrliblocale.js │ ├── twrliblocale.js.map │ ├── twrlibmath.d.ts │ ├── twrlibmath.d.ts.map │ ├── twrlibmath.js │ ├── twrlibmath.js.map │ ├── twrlibrary.d.ts │ ├── twrlibrary.d.ts.map │ ├── twrlibrary.js │ ├── twrlibrary.js.map │ ├── twrlibtimer.d.ts │ ├── twrlibtimer.d.ts.map │ ├── twrlibtimer.js │ ├── twrlibtimer.js.map │ ├── twrmod.d.ts │ ├── twrmod.d.ts.map │ ├── twrmod.js │ ├── twrmod.js.map │ ├── twrmodasync.d.ts │ ├── twrmodasync.d.ts.map │ ├── twrmodasync.js │ ├── twrmodasync.js.map │ ├── twrmodasyncproxy.d.ts │ ├── twrmodasyncproxy.d.ts.map │ ├── twrmodasyncproxy.js │ ├── twrmodasyncproxy.js.map │ ├── twrmodutil.d.ts │ ├── twrmodutil.d.ts.map │ ├── twrmodutil.js │ ├── twrmodutil.js.map │ ├── twrsignal.d.ts │ ├── twrsignal.d.ts.map │ ├── twrsignal.js │ ├── twrsignal.js.map │ ├── twrwasmbase.d.ts │ ├── twrwasmbase.d.ts.map │ ├── twrwasmbase.js │ ├── twrwasmbase.js.map │ ├── twrwasmcall.d.ts │ ├── twrwasmcall.d.ts.map │ ├── twrwasmcall.js │ ├── twrwasmcall.js.map │ ├── twrwasmmem.d.ts │ ├── twrwasmmem.d.ts.map │ ├── twrwasmmem.js │ └── twrwasmmem.js.map ├── robots.txt ├── source │ └── twr-ts │ │ ├── index.ts │ │ ├── tsconfig.json │ │ ├── twrcircular.ts │ │ ├── twrcon.ts │ │ ├── twrconcanvas.ts │ │ ├── twrcondebug.ts │ │ ├── twrcondiv.ts │ │ ├── twrcondummy.ts │ │ ├── twrconterm.ts │ │ ├── twreventqueue.ts │ │ ├── twrlibaudio.ts │ │ ├── twrlibbuiltin.ts │ │ ├── twrlibdate.ts │ │ ├── twrliblocale.ts │ │ ├── twrlibmath.ts │ │ ├── twrlibrary.ts │ │ ├── twrlibtimer.ts │ │ ├── twrmod.ts │ │ ├── twrmodasync.ts │ │ ├── twrmodasyncproxy.ts │ │ ├── twrmodutil.ts │ │ ├── twrsignal.ts │ │ ├── twrwasmbase.ts │ │ ├── twrwasmcall.ts │ │ └── twrwasmmem.ts └── staticwebapp.config.json ├── docs ├── api │ ├── api-c-audio.md │ ├── api-c-con.md │ ├── api-c-d2d.md │ ├── api-c-general.md │ ├── api-c-localization.md │ ├── api-c-stdlib.md │ ├── api-libcpp.md │ ├── api-ts-consoles.md │ ├── api-ts-library.md │ ├── api-ts-memory.md │ └── api-ts-modules.md ├── examples │ ├── examples-balls.md │ ├── examples-callc.md │ ├── examples-divcon.md │ ├── examples-fft.md │ ├── examples-helloworld.md │ ├── examples-lib.md │ ├── examples-libcxx.md │ ├── examples-maze.md │ ├── examples-multi-io.md │ ├── examples-overview.md │ ├── examples-pong.md │ ├── examples-terminal.md │ ├── examples-tests-audio.md │ └── examples-tests-d2d.md ├── gettingstarted │ ├── basicsteps.md │ ├── charencoding.md │ ├── compiler-opts.md │ ├── debugging.md │ ├── events.md │ ├── helloworld.md │ ├── installation.md │ ├── parameters.md │ └── stdio.md ├── img │ ├── readme-img-2-player-pong.png │ ├── readme-img-balls.png │ ├── readme-img-fft.png │ ├── readme-img-maze.png │ ├── readme-img-menu-pong.png │ ├── readme-img-single-player-pong.png │ ├── readme-img-square.png │ └── readme-img-terminal.png ├── index.md └── more │ ├── building.md │ ├── imports.md │ ├── production.md │ └── wasm-problem.md ├── examples ├── .npmignore ├── balls │ ├── Makefile │ ├── ball.cpp │ ├── ball.h │ ├── balls-a.wasm │ ├── balls-dbg.wasm │ ├── balls.wasm │ ├── gamefield.cpp │ ├── gamefield.h │ ├── heart.cpp │ ├── index.html │ ├── list.cpp │ ├── newop.cpp │ └── package.json ├── buildall.sh ├── buildbundle.sh ├── callc │ ├── Makefile │ ├── callc-a.wasm │ ├── callc.c │ ├── callc.wasm │ ├── index.html │ ├── package.json │ └── test-file.txt ├── cleanall.sh ├── divcon │ ├── Makefile │ ├── divcon.c │ ├── divcon.wasm │ ├── index.html │ └── package.json ├── fft │ ├── Makefile │ ├── README │ ├── _kiss_fft_guts.h │ ├── fft-script.js │ ├── fft-script.ts │ ├── index.html │ ├── kiss_fft.c │ ├── kiss_fft.h │ ├── kiss_fft.wasm │ ├── package.json │ └── tsconfig.json ├── helloworld-b │ ├── Makefile │ ├── helloworld.c │ ├── helloworld.wasm │ ├── index.html │ └── package.json ├── helloworld │ ├── Makefile │ ├── helloworld.c │ ├── helloworld.wasm │ ├── index.html │ └── package.json ├── index.html ├── lib │ ├── Makefile │ ├── index.html │ ├── out │ │ └── twrlibex.js │ ├── package.json │ ├── testex-a.wasm │ ├── testex.c │ ├── testex.wasm │ ├── tsconfig.json │ ├── twr-ex.h │ └── twrlibex.ts ├── maze │ ├── Makefile │ ├── cyberman.bmp │ ├── inarrow.bmp │ ├── index.html │ ├── maze-script.js │ ├── maze-script.ts │ ├── maze.c │ ├── maze.h │ ├── maze.wasm │ ├── package.json │ ├── stack.c │ ├── stack.h │ ├── tsconfig.json │ ├── winemu.c │ └── winemu.h ├── multi-io │ ├── Makefile │ ├── index.html │ ├── multi-io-mod.c │ ├── multi-io-mod.wasm │ ├── multi-io.c │ ├── multi-io.wasm │ └── package.json ├── package.json ├── pong │ ├── Makefile │ ├── entry-point-a.wasm │ ├── entry-point.cpp │ ├── entry-point.wasm │ ├── extra.cpp │ ├── extra.h │ ├── index.html │ ├── jsEventsLib.ts │ ├── out │ │ └── jsEventsLib.js │ ├── package.json │ ├── pong-menu.cpp │ ├── pong-menu.h │ ├── pong.cpp │ ├── pong.h │ ├── tsconfig.json │ ├── two-player-pong.cpp │ └── two-player-pong.h ├── readme.md ├── server.py ├── terminal │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── terminal.c │ └── terminal.wasm ├── tests-audio │ ├── Makefile │ ├── clearIODiv.ts │ ├── croud.mp3 │ ├── index.html │ ├── out │ │ ├── clearIODiv.d.ts │ │ └── clearIODiv.js │ ├── package.json │ ├── ping.mp3 │ ├── tests-audio-a.wasm │ ├── tests-audio.c │ ├── tests-audio.wasm │ └── tsconfig.json ├── tests-d2d │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── test-img.jpg │ ├── tests-d2d-a.wasm │ ├── tests-d2d.c │ └── tests-d2d.wasm ├── tests-libcxx │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── tests-libcxx.cpp │ └── tests-libcxx.wasm ├── tests-timer │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── tests-timer-a.wasm │ ├── tests-timer.c │ └── tests-timer.wasm ├── tests-user │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── parsecmd.cpp │ ├── parsecmd.h │ ├── terminal.cpp │ ├── terminal.h │ ├── tests-user.cpp │ └── tests-user.wasm ├── tests │ ├── Makefile │ ├── index.html │ ├── package.json │ ├── tests-dbg-a.wasm │ ├── tests-dbg.wasm │ ├── tests.c │ └── tests.wasm └── twr-cpp │ ├── canvas.cpp │ └── canvas.h ├── include ├── _stdtypes.h ├── assert.h ├── c++ │ └── v1 │ │ ├── __algorithm │ │ ├── adjacent_find.h │ │ ├── all_of.h │ │ ├── any_of.h │ │ ├── binary_search.h │ │ ├── clamp.h │ │ ├── comp.h │ │ ├── comp_ref_type.h │ │ ├── copy.h │ │ ├── copy_backward.h │ │ ├── copy_if.h │ │ ├── copy_move_common.h │ │ ├── copy_n.h │ │ ├── count.h │ │ ├── count_if.h │ │ ├── equal.h │ │ ├── equal_range.h │ │ ├── fill.h │ │ ├── fill_n.h │ │ ├── find.h │ │ ├── find_end.h │ │ ├── find_first_of.h │ │ ├── find_if.h │ │ ├── find_if_not.h │ │ ├── for_each.h │ │ ├── for_each_n.h │ │ ├── for_each_segment.h │ │ ├── generate.h │ │ ├── generate_n.h │ │ ├── half_positive.h │ │ ├── in_found_result.h │ │ ├── in_fun_result.h │ │ ├── in_in_out_result.h │ │ ├── in_in_result.h │ │ ├── in_out_out_result.h │ │ ├── in_out_result.h │ │ ├── includes.h │ │ ├── inplace_merge.h │ │ ├── is_heap.h │ │ ├── is_heap_until.h │ │ ├── is_partitioned.h │ │ ├── is_permutation.h │ │ ├── is_sorted.h │ │ ├── is_sorted_until.h │ │ ├── iter_swap.h │ │ ├── iterator_operations.h │ │ ├── lexicographical_compare.h │ │ ├── lexicographical_compare_three_way.h │ │ ├── lower_bound.h │ │ ├── make_heap.h │ │ ├── make_projected.h │ │ ├── max.h │ │ ├── max_element.h │ │ ├── merge.h │ │ ├── min.h │ │ ├── min_element.h │ │ ├── min_max_result.h │ │ ├── minmax.h │ │ ├── minmax_element.h │ │ ├── mismatch.h │ │ ├── move.h │ │ ├── move_backward.h │ │ ├── next_permutation.h │ │ ├── none_of.h │ │ ├── nth_element.h │ │ ├── partial_sort.h │ │ ├── partial_sort_copy.h │ │ ├── partition.h │ │ ├── partition_copy.h │ │ ├── partition_point.h │ │ ├── pop_heap.h │ │ ├── prev_permutation.h │ │ ├── pstl_any_all_none_of.h │ │ ├── pstl_backend.h │ │ ├── pstl_backends │ │ │ ├── cpu_backend.h │ │ │ └── cpu_backends │ │ │ │ ├── any_of.h │ │ │ │ ├── backend.h │ │ │ │ ├── fill.h │ │ │ │ ├── find_if.h │ │ │ │ ├── for_each.h │ │ │ │ ├── libdispatch.h │ │ │ │ ├── merge.h │ │ │ │ ├── serial.h │ │ │ │ ├── stable_sort.h │ │ │ │ ├── thread.h │ │ │ │ ├── transform.h │ │ │ │ └── transform_reduce.h │ │ ├── pstl_copy.h │ │ ├── pstl_count.h │ │ ├── pstl_fill.h │ │ ├── pstl_find.h │ │ ├── pstl_for_each.h │ │ ├── pstl_frontend_dispatch.h │ │ ├── pstl_generate.h │ │ ├── pstl_is_partitioned.h │ │ ├── pstl_merge.h │ │ ├── pstl_replace.h │ │ ├── pstl_sort.h │ │ ├── pstl_stable_sort.h │ │ ├── pstl_transform.h │ │ ├── push_heap.h │ │ ├── ranges_adjacent_find.h │ │ ├── ranges_all_of.h │ │ ├── ranges_any_of.h │ │ ├── ranges_binary_search.h │ │ ├── ranges_clamp.h │ │ ├── ranges_copy.h │ │ ├── ranges_copy_backward.h │ │ ├── ranges_copy_if.h │ │ ├── ranges_copy_n.h │ │ ├── ranges_count.h │ │ ├── ranges_count_if.h │ │ ├── ranges_equal.h │ │ ├── ranges_equal_range.h │ │ ├── ranges_fill.h │ │ ├── ranges_fill_n.h │ │ ├── ranges_find.h │ │ ├── ranges_find_end.h │ │ ├── ranges_find_first_of.h │ │ ├── ranges_find_if.h │ │ ├── ranges_find_if_not.h │ │ ├── ranges_for_each.h │ │ ├── ranges_for_each_n.h │ │ ├── ranges_generate.h │ │ ├── ranges_generate_n.h │ │ ├── ranges_includes.h │ │ ├── ranges_inplace_merge.h │ │ ├── ranges_is_heap.h │ │ ├── ranges_is_heap_until.h │ │ ├── ranges_is_partitioned.h │ │ ├── ranges_is_permutation.h │ │ ├── ranges_is_sorted.h │ │ ├── ranges_is_sorted_until.h │ │ ├── ranges_iterator_concept.h │ │ ├── ranges_lexicographical_compare.h │ │ ├── ranges_lower_bound.h │ │ ├── ranges_make_heap.h │ │ ├── ranges_max.h │ │ ├── ranges_max_element.h │ │ ├── ranges_merge.h │ │ ├── ranges_min.h │ │ ├── ranges_min_element.h │ │ ├── ranges_minmax.h │ │ ├── ranges_minmax_element.h │ │ ├── ranges_mismatch.h │ │ ├── ranges_move.h │ │ ├── ranges_move_backward.h │ │ ├── ranges_next_permutation.h │ │ ├── ranges_none_of.h │ │ ├── ranges_nth_element.h │ │ ├── ranges_partial_sort.h │ │ ├── ranges_partial_sort_copy.h │ │ ├── ranges_partition.h │ │ ├── ranges_partition_copy.h │ │ ├── ranges_partition_point.h │ │ ├── ranges_pop_heap.h │ │ ├── ranges_prev_permutation.h │ │ ├── ranges_push_heap.h │ │ ├── ranges_remove.h │ │ ├── ranges_remove_copy.h │ │ ├── ranges_remove_copy_if.h │ │ ├── ranges_remove_if.h │ │ ├── ranges_replace.h │ │ ├── ranges_replace_copy.h │ │ ├── ranges_replace_copy_if.h │ │ ├── ranges_replace_if.h │ │ ├── ranges_reverse.h │ │ ├── ranges_reverse_copy.h │ │ ├── ranges_rotate.h │ │ ├── ranges_rotate_copy.h │ │ ├── ranges_sample.h │ │ ├── ranges_search.h │ │ ├── ranges_search_n.h │ │ ├── ranges_set_difference.h │ │ ├── ranges_set_intersection.h │ │ ├── ranges_set_symmetric_difference.h │ │ ├── ranges_set_union.h │ │ ├── ranges_shuffle.h │ │ ├── ranges_sort.h │ │ ├── ranges_sort_heap.h │ │ ├── ranges_stable_partition.h │ │ ├── ranges_stable_sort.h │ │ ├── ranges_starts_with.h │ │ ├── ranges_swap_ranges.h │ │ ├── ranges_transform.h │ │ ├── ranges_unique.h │ │ ├── ranges_unique_copy.h │ │ ├── ranges_upper_bound.h │ │ ├── remove.h │ │ ├── remove_copy.h │ │ ├── remove_copy_if.h │ │ ├── remove_if.h │ │ ├── replace.h │ │ ├── replace_copy.h │ │ ├── replace_copy_if.h │ │ ├── replace_if.h │ │ ├── reverse.h │ │ ├── reverse_copy.h │ │ ├── rotate.h │ │ ├── rotate_copy.h │ │ ├── sample.h │ │ ├── search.h │ │ ├── search_n.h │ │ ├── set_difference.h │ │ ├── set_intersection.h │ │ ├── set_symmetric_difference.h │ │ ├── set_union.h │ │ ├── shift_left.h │ │ ├── shift_right.h │ │ ├── shuffle.h │ │ ├── sift_down.h │ │ ├── sort.h │ │ ├── sort_heap.h │ │ ├── stable_partition.h │ │ ├── stable_sort.h │ │ ├── swap_ranges.h │ │ ├── three_way_comp_ref_type.h │ │ ├── transform.h │ │ ├── uniform_random_bit_generator_adaptor.h │ │ ├── unique.h │ │ ├── unique_copy.h │ │ ├── unwrap_iter.h │ │ ├── unwrap_range.h │ │ └── upper_bound.h │ │ ├── __assert │ │ ├── __atomic │ │ ├── aliases.h │ │ ├── atomic.h │ │ ├── atomic_base.h │ │ ├── atomic_flag.h │ │ ├── atomic_init.h │ │ ├── atomic_lock_free.h │ │ ├── atomic_sync.h │ │ ├── check_memory_order.h │ │ ├── contention_t.h │ │ ├── cxx_atomic_impl.h │ │ ├── fence.h │ │ ├── is_always_lock_free.h │ │ ├── kill_dependency.h │ │ └── memory_order.h │ │ ├── __availability │ │ ├── __bit │ │ ├── bit_cast.h │ │ ├── bit_ceil.h │ │ ├── bit_floor.h │ │ ├── bit_log2.h │ │ ├── bit_width.h │ │ ├── blsr.h │ │ ├── byteswap.h │ │ ├── countl.h │ │ ├── countr.h │ │ ├── endian.h │ │ ├── has_single_bit.h │ │ ├── popcount.h │ │ └── rotate.h │ │ ├── __bit_reference │ │ ├── __charconv │ │ ├── chars_format.h │ │ ├── from_chars_integral.h │ │ ├── from_chars_result.h │ │ ├── tables.h │ │ ├── to_chars.h │ │ ├── to_chars_base_10.h │ │ ├── to_chars_floating_point.h │ │ ├── to_chars_integral.h │ │ ├── to_chars_result.h │ │ └── traits.h │ │ ├── __chrono │ │ ├── calendar.h │ │ ├── concepts.h │ │ ├── convert_to_timespec.h │ │ ├── convert_to_tm.h │ │ ├── day.h │ │ ├── duration.h │ │ ├── file_clock.h │ │ ├── formatter.h │ │ ├── hh_mm_ss.h │ │ ├── high_resolution_clock.h │ │ ├── literals.h │ │ ├── month.h │ │ ├── month_weekday.h │ │ ├── monthday.h │ │ ├── ostream.h │ │ ├── parser_std_format_spec.h │ │ ├── statically_widen.h │ │ ├── steady_clock.h │ │ ├── system_clock.h │ │ ├── time_point.h │ │ ├── weekday.h │ │ ├── year.h │ │ ├── year_month.h │ │ ├── year_month_day.h │ │ └── year_month_weekday.h │ │ ├── __compare │ │ ├── common_comparison_category.h │ │ ├── compare_partial_order_fallback.h │ │ ├── compare_strong_order_fallback.h │ │ ├── compare_three_way.h │ │ ├── compare_three_way_result.h │ │ ├── compare_weak_order_fallback.h │ │ ├── is_eq.h │ │ ├── ordering.h │ │ ├── partial_order.h │ │ ├── strong_order.h │ │ ├── synth_three_way.h │ │ ├── three_way_comparable.h │ │ └── weak_order.h │ │ ├── __concepts │ │ ├── arithmetic.h │ │ ├── assignable.h │ │ ├── boolean_testable.h │ │ ├── class_or_enum.h │ │ ├── common_reference_with.h │ │ ├── common_with.h │ │ ├── constructible.h │ │ ├── convertible_to.h │ │ ├── copyable.h │ │ ├── derived_from.h │ │ ├── destructible.h │ │ ├── different_from.h │ │ ├── equality_comparable.h │ │ ├── invocable.h │ │ ├── movable.h │ │ ├── predicate.h │ │ ├── regular.h │ │ ├── relation.h │ │ ├── same_as.h │ │ ├── semiregular.h │ │ ├── swappable.h │ │ └── totally_ordered.h │ │ ├── __condition_variable │ │ └── condition_variable.h │ │ ├── __config │ │ ├── __config_site │ │ ├── __coroutine │ │ ├── coroutine_handle.h │ │ ├── coroutine_traits.h │ │ ├── noop_coroutine_handle.h │ │ └── trivial_awaitables.h │ │ ├── __cxxabi_config.h │ │ ├── __debug_utils │ │ ├── randomize_range.h │ │ └── strict_weak_ordering_check.h │ │ ├── __exception │ │ ├── exception.h │ │ ├── exception_ptr.h │ │ ├── nested_exception.h │ │ ├── operations.h │ │ └── terminate.h │ │ ├── __expected │ │ ├── bad_expected_access.h │ │ ├── expected.h │ │ ├── unexpect.h │ │ └── unexpected.h │ │ ├── __filesystem │ │ ├── copy_options.h │ │ ├── directory_entry.h │ │ ├── directory_iterator.h │ │ ├── directory_options.h │ │ ├── file_status.h │ │ ├── file_time_type.h │ │ ├── file_type.h │ │ ├── filesystem_error.h │ │ ├── operations.h │ │ ├── path.h │ │ ├── path_iterator.h │ │ ├── perm_options.h │ │ ├── perms.h │ │ ├── recursive_directory_iterator.h │ │ ├── space_info.h │ │ └── u8path.h │ │ ├── __format │ │ ├── buffer.h │ │ ├── concepts.h │ │ ├── container_adaptor.h │ │ ├── enable_insertable.h │ │ ├── escaped_output_table.h │ │ ├── extended_grapheme_cluster_table.h │ │ ├── format_arg.h │ │ ├── format_arg_store.h │ │ ├── format_args.h │ │ ├── format_context.h │ │ ├── format_error.h │ │ ├── format_functions.h │ │ ├── format_fwd.h │ │ ├── format_parse_context.h │ │ ├── format_string.h │ │ ├── format_to_n_result.h │ │ ├── formatter.h │ │ ├── formatter_bool.h │ │ ├── formatter_char.h │ │ ├── formatter_floating_point.h │ │ ├── formatter_integer.h │ │ ├── formatter_integral.h │ │ ├── formatter_output.h │ │ ├── formatter_pointer.h │ │ ├── formatter_string.h │ │ ├── formatter_tuple.h │ │ ├── parser_std_format_spec.h │ │ ├── range_default_formatter.h │ │ ├── range_formatter.h │ │ ├── unicode.h │ │ ├── width_estimation_table.h │ │ └── write_escaped.h │ │ ├── __functional │ │ ├── binary_function.h │ │ ├── binary_negate.h │ │ ├── bind.h │ │ ├── bind_back.h │ │ ├── bind_front.h │ │ ├── binder1st.h │ │ ├── binder2nd.h │ │ ├── boyer_moore_searcher.h │ │ ├── compose.h │ │ ├── default_searcher.h │ │ ├── function.h │ │ ├── hash.h │ │ ├── identity.h │ │ ├── invoke.h │ │ ├── is_transparent.h │ │ ├── mem_fn.h │ │ ├── mem_fun_ref.h │ │ ├── not_fn.h │ │ ├── operations.h │ │ ├── perfect_forward.h │ │ ├── pointer_to_binary_function.h │ │ ├── pointer_to_unary_function.h │ │ ├── ranges_operations.h │ │ ├── reference_wrapper.h │ │ ├── unary_function.h │ │ ├── unary_negate.h │ │ └── weak_result_type.h │ │ ├── __fwd │ │ ├── array.h │ │ ├── fstream.h │ │ ├── get.h │ │ ├── hash.h │ │ ├── ios.h │ │ ├── istream.h │ │ ├── mdspan.h │ │ ├── memory_resource.h │ │ ├── ostream.h │ │ ├── pair.h │ │ ├── span.h │ │ ├── sstream.h │ │ ├── streambuf.h │ │ ├── string.h │ │ ├── string_view.h │ │ ├── subrange.h │ │ └── tuple.h │ │ ├── __hash_table │ │ ├── __ios │ │ └── fpos.h │ │ ├── __iterator │ │ ├── access.h │ │ ├── advance.h │ │ ├── back_insert_iterator.h │ │ ├── bounded_iter.h │ │ ├── common_iterator.h │ │ ├── concepts.h │ │ ├── counted_iterator.h │ │ ├── cpp17_iterator_concepts.h │ │ ├── data.h │ │ ├── default_sentinel.h │ │ ├── distance.h │ │ ├── empty.h │ │ ├── erase_if_container.h │ │ ├── front_insert_iterator.h │ │ ├── incrementable_traits.h │ │ ├── indirectly_comparable.h │ │ ├── insert_iterator.h │ │ ├── istream_iterator.h │ │ ├── istreambuf_iterator.h │ │ ├── iter_move.h │ │ ├── iter_swap.h │ │ ├── iterator.h │ │ ├── iterator_traits.h │ │ ├── iterator_with_data.h │ │ ├── mergeable.h │ │ ├── move_iterator.h │ │ ├── move_sentinel.h │ │ ├── next.h │ │ ├── ostream_iterator.h │ │ ├── ostreambuf_iterator.h │ │ ├── permutable.h │ │ ├── prev.h │ │ ├── projected.h │ │ ├── ranges_iterator_traits.h │ │ ├── readable_traits.h │ │ ├── reverse_access.h │ │ ├── reverse_iterator.h │ │ ├── segmented_iterator.h │ │ ├── size.h │ │ ├── sortable.h │ │ ├── unreachable_sentinel.h │ │ └── wrap_iter.h │ │ ├── __locale │ │ ├── __locale_dir │ │ └── locale_base_api │ │ │ ├── bsd_locale_defaults.h │ │ │ ├── bsd_locale_fallbacks.h │ │ │ └── locale_guard.h │ │ ├── __mbstate_t.h │ │ ├── __mdspan │ │ ├── default_accessor.h │ │ ├── extents.h │ │ ├── layout_left.h │ │ ├── layout_right.h │ │ └── mdspan.h │ │ ├── __memory │ │ ├── addressof.h │ │ ├── align.h │ │ ├── aligned_alloc.h │ │ ├── allocate_at_least.h │ │ ├── allocation_guard.h │ │ ├── allocator.h │ │ ├── allocator_arg_t.h │ │ ├── allocator_destructor.h │ │ ├── allocator_traits.h │ │ ├── assume_aligned.h │ │ ├── auto_ptr.h │ │ ├── builtin_new_allocator.h │ │ ├── compressed_pair.h │ │ ├── concepts.h │ │ ├── construct_at.h │ │ ├── destruct_n.h │ │ ├── pointer_traits.h │ │ ├── ranges_construct_at.h │ │ ├── ranges_uninitialized_algorithms.h │ │ ├── raw_storage_iterator.h │ │ ├── shared_ptr.h │ │ ├── swap_allocator.h │ │ ├── temp_value.h │ │ ├── temporary_buffer.h │ │ ├── uninitialized_algorithms.h │ │ ├── unique_ptr.h │ │ ├── uses_allocator.h │ │ ├── uses_allocator_construction.h │ │ └── voidify.h │ │ ├── __memory_resource │ │ ├── memory_resource.h │ │ ├── monotonic_buffer_resource.h │ │ ├── polymorphic_allocator.h │ │ ├── pool_options.h │ │ ├── synchronized_pool_resource.h │ │ └── unsynchronized_pool_resource.h │ │ ├── __mutex │ │ ├── lock_guard.h │ │ ├── mutex.h │ │ ├── tag_types.h │ │ └── unique_lock.h │ │ ├── __node_handle │ │ ├── __numeric │ │ ├── accumulate.h │ │ ├── adjacent_difference.h │ │ ├── exclusive_scan.h │ │ ├── gcd_lcm.h │ │ ├── inclusive_scan.h │ │ ├── inner_product.h │ │ ├── iota.h │ │ ├── midpoint.h │ │ ├── partial_sum.h │ │ ├── pstl_reduce.h │ │ ├── pstl_transform_reduce.h │ │ ├── reduce.h │ │ ├── transform_exclusive_scan.h │ │ ├── transform_inclusive_scan.h │ │ └── transform_reduce.h │ │ ├── __pstl │ │ └── internal │ │ │ ├── algorithm_fwd.h │ │ │ ├── algorithm_impl.h │ │ │ ├── execution_defs.h │ │ │ ├── execution_impl.h │ │ │ ├── glue_algorithm_defs.h │ │ │ ├── glue_algorithm_impl.h │ │ │ ├── glue_memory_defs.h │ │ │ ├── glue_memory_impl.h │ │ │ ├── glue_numeric_defs.h │ │ │ ├── glue_numeric_impl.h │ │ │ ├── memory_impl.h │ │ │ ├── numeric_fwd.h │ │ │ ├── numeric_impl.h │ │ │ ├── omp │ │ │ ├── parallel_for.h │ │ │ ├── parallel_for_each.h │ │ │ ├── parallel_invoke.h │ │ │ ├── parallel_merge.h │ │ │ ├── parallel_scan.h │ │ │ ├── parallel_stable_partial_sort.h │ │ │ ├── parallel_stable_sort.h │ │ │ ├── parallel_transform_reduce.h │ │ │ ├── parallel_transform_scan.h │ │ │ └── util.h │ │ │ ├── parallel_backend.h │ │ │ ├── parallel_backend_omp.h │ │ │ ├── parallel_backend_serial.h │ │ │ ├── parallel_backend_tbb.h │ │ │ ├── parallel_backend_utils.h │ │ │ ├── unseq_backend_simd.h │ │ │ └── utils.h │ │ ├── __pstl_algorithm │ │ ├── __pstl_memory │ │ ├── __pstl_numeric │ │ ├── __random │ │ ├── bernoulli_distribution.h │ │ ├── binomial_distribution.h │ │ ├── cauchy_distribution.h │ │ ├── chi_squared_distribution.h │ │ ├── clamp_to_integral.h │ │ ├── default_random_engine.h │ │ ├── discard_block_engine.h │ │ ├── discrete_distribution.h │ │ ├── exponential_distribution.h │ │ ├── extreme_value_distribution.h │ │ ├── fisher_f_distribution.h │ │ ├── gamma_distribution.h │ │ ├── generate_canonical.h │ │ ├── geometric_distribution.h │ │ ├── independent_bits_engine.h │ │ ├── is_seed_sequence.h │ │ ├── is_valid.h │ │ ├── knuth_b.h │ │ ├── linear_congruential_engine.h │ │ ├── log2.h │ │ ├── lognormal_distribution.h │ │ ├── mersenne_twister_engine.h │ │ ├── negative_binomial_distribution.h │ │ ├── normal_distribution.h │ │ ├── piecewise_constant_distribution.h │ │ ├── piecewise_linear_distribution.h │ │ ├── poisson_distribution.h │ │ ├── random_device.h │ │ ├── ranlux.h │ │ ├── seed_seq.h │ │ ├── shuffle_order_engine.h │ │ ├── student_t_distribution.h │ │ ├── subtract_with_carry_engine.h │ │ ├── uniform_int_distribution.h │ │ ├── uniform_random_bit_generator.h │ │ ├── uniform_real_distribution.h │ │ └── weibull_distribution.h │ │ ├── __ranges │ │ ├── access.h │ │ ├── all.h │ │ ├── as_rvalue_view.h │ │ ├── common_view.h │ │ ├── concepts.h │ │ ├── container_compatible_range.h │ │ ├── counted.h │ │ ├── dangling.h │ │ ├── data.h │ │ ├── drop_view.h │ │ ├── drop_while_view.h │ │ ├── elements_view.h │ │ ├── empty.h │ │ ├── empty_view.h │ │ ├── enable_borrowed_range.h │ │ ├── enable_view.h │ │ ├── filter_view.h │ │ ├── from_range.h │ │ ├── iota_view.h │ │ ├── istream_view.h │ │ ├── join_view.h │ │ ├── lazy_split_view.h │ │ ├── movable_box.h │ │ ├── non_propagating_cache.h │ │ ├── owning_view.h │ │ ├── range_adaptor.h │ │ ├── rbegin.h │ │ ├── ref_view.h │ │ ├── rend.h │ │ ├── repeat_view.h │ │ ├── reverse_view.h │ │ ├── single_view.h │ │ ├── size.h │ │ ├── split_view.h │ │ ├── subrange.h │ │ ├── take_view.h │ │ ├── take_while_view.h │ │ ├── to.h │ │ ├── transform_view.h │ │ ├── view_interface.h │ │ ├── views.h │ │ └── zip_view.h │ │ ├── __split_buffer │ │ ├── __std_clang_module │ │ ├── __std_mbstate_t.h │ │ ├── __stop_token │ │ ├── atomic_unique_lock.h │ │ ├── intrusive_list_view.h │ │ ├── intrusive_shared_ptr.h │ │ ├── stop_callback.h │ │ ├── stop_source.h │ │ ├── stop_state.h │ │ └── stop_token.h │ │ ├── __string │ │ ├── char_traits.h │ │ ├── constexpr_c_functions.h │ │ └── extern_template_lists.h │ │ ├── __support │ │ ├── android │ │ │ └── locale_bionic.h │ │ ├── fuchsia │ │ │ └── xlocale.h │ │ ├── ibm │ │ │ ├── gettod_zos.h │ │ │ ├── locale_mgmt_zos.h │ │ │ ├── nanosleep.h │ │ │ └── xlocale.h │ │ ├── musl │ │ │ └── xlocale.h │ │ ├── newlib │ │ │ └── xlocale.h │ │ ├── openbsd │ │ │ └── xlocale.h │ │ ├── win32 │ │ │ └── locale_win32.h │ │ └── xlocale │ │ │ ├── __nop_locale_mgmt.h │ │ │ ├── __posix_l_fallback.h │ │ │ └── __strtonum_fallback.h │ │ ├── __system_error │ │ ├── errc.h │ │ ├── error_category.h │ │ ├── error_code.h │ │ ├── error_condition.h │ │ └── system_error.h │ │ ├── __thread │ │ ├── formatter.h │ │ ├── id.h │ │ ├── poll_with_backoff.h │ │ ├── this_thread.h │ │ ├── thread.h │ │ └── timed_backoff_policy.h │ │ ├── __threading_support │ │ ├── __tree │ │ ├── __tuple │ │ ├── make_tuple_types.h │ │ ├── pair_like.h │ │ ├── sfinae_helpers.h │ │ ├── tuple_element.h │ │ ├── tuple_indices.h │ │ ├── tuple_like.h │ │ ├── tuple_like_ext.h │ │ ├── tuple_size.h │ │ └── tuple_types.h │ │ ├── __type_traits │ │ ├── add_const.h │ │ ├── add_cv.h │ │ ├── add_lvalue_reference.h │ │ ├── add_pointer.h │ │ ├── add_rvalue_reference.h │ │ ├── add_volatile.h │ │ ├── aligned_storage.h │ │ ├── aligned_union.h │ │ ├── alignment_of.h │ │ ├── apply_cv.h │ │ ├── can_extract_key.h │ │ ├── common_reference.h │ │ ├── common_type.h │ │ ├── conditional.h │ │ ├── conjunction.h │ │ ├── copy_cv.h │ │ ├── copy_cvref.h │ │ ├── datasizeof.h │ │ ├── decay.h │ │ ├── dependent_type.h │ │ ├── disjunction.h │ │ ├── enable_if.h │ │ ├── extent.h │ │ ├── has_unique_object_representation.h │ │ ├── has_virtual_destructor.h │ │ ├── integral_constant.h │ │ ├── invoke.h │ │ ├── is_abstract.h │ │ ├── is_aggregate.h │ │ ├── is_allocator.h │ │ ├── is_always_bitcastable.h │ │ ├── is_arithmetic.h │ │ ├── is_array.h │ │ ├── is_assignable.h │ │ ├── is_base_of.h │ │ ├── is_bounded_array.h │ │ ├── is_callable.h │ │ ├── is_char_like_type.h │ │ ├── is_class.h │ │ ├── is_compound.h │ │ ├── is_const.h │ │ ├── is_constant_evaluated.h │ │ ├── is_constructible.h │ │ ├── is_convertible.h │ │ ├── is_copy_assignable.h │ │ ├── is_copy_constructible.h │ │ ├── is_core_convertible.h │ │ ├── is_default_constructible.h │ │ ├── is_destructible.h │ │ ├── is_empty.h │ │ ├── is_enum.h │ │ ├── is_equality_comparable.h │ │ ├── is_execution_policy.h │ │ ├── is_final.h │ │ ├── is_floating_point.h │ │ ├── is_function.h │ │ ├── is_fundamental.h │ │ ├── is_implicitly_default_constructible.h │ │ ├── is_integral.h │ │ ├── is_literal_type.h │ │ ├── is_member_function_pointer.h │ │ ├── is_member_object_pointer.h │ │ ├── is_member_pointer.h │ │ ├── is_move_assignable.h │ │ ├── is_move_constructible.h │ │ ├── is_nothrow_assignable.h │ │ ├── is_nothrow_constructible.h │ │ ├── is_nothrow_convertible.h │ │ ├── is_nothrow_copy_assignable.h │ │ ├── is_nothrow_copy_constructible.h │ │ ├── is_nothrow_default_constructible.h │ │ ├── is_nothrow_destructible.h │ │ ├── is_nothrow_move_assignable.h │ │ ├── is_nothrow_move_constructible.h │ │ ├── is_null_pointer.h │ │ ├── is_object.h │ │ ├── is_pod.h │ │ ├── is_pointer.h │ │ ├── is_polymorphic.h │ │ ├── is_primary_template.h │ │ ├── is_reference.h │ │ ├── is_reference_wrapper.h │ │ ├── is_referenceable.h │ │ ├── is_same.h │ │ ├── is_scalar.h │ │ ├── is_scoped_enum.h │ │ ├── is_signed.h │ │ ├── is_signed_integer.h │ │ ├── is_specialization.h │ │ ├── is_standard_layout.h │ │ ├── is_swappable.h │ │ ├── is_trivial.h │ │ ├── is_trivially_assignable.h │ │ ├── is_trivially_constructible.h │ │ ├── is_trivially_copy_assignable.h │ │ ├── is_trivially_copy_constructible.h │ │ ├── is_trivially_copyable.h │ │ ├── is_trivially_default_constructible.h │ │ ├── is_trivially_destructible.h │ │ ├── is_trivially_lexicographically_comparable.h │ │ ├── is_trivially_move_assignable.h │ │ ├── is_trivially_move_constructible.h │ │ ├── is_unbounded_array.h │ │ ├── is_union.h │ │ ├── is_unsigned.h │ │ ├── is_unsigned_integer.h │ │ ├── is_valid_expansion.h │ │ ├── is_void.h │ │ ├── is_volatile.h │ │ ├── lazy.h │ │ ├── make_32_64_or_128_bit.h │ │ ├── make_const_lvalue_ref.h │ │ ├── make_signed.h │ │ ├── make_unsigned.h │ │ ├── maybe_const.h │ │ ├── nat.h │ │ ├── negation.h │ │ ├── noexcept_move_assign_container.h │ │ ├── operation_traits.h │ │ ├── predicate_traits.h │ │ ├── promote.h │ │ ├── rank.h │ │ ├── remove_all_extents.h │ │ ├── remove_const.h │ │ ├── remove_const_ref.h │ │ ├── remove_cv.h │ │ ├── remove_cvref.h │ │ ├── remove_extent.h │ │ ├── remove_pointer.h │ │ ├── remove_reference.h │ │ ├── remove_volatile.h │ │ ├── result_of.h │ │ ├── strip_signature.h │ │ ├── type_identity.h │ │ ├── type_list.h │ │ ├── underlying_type.h │ │ ├── unwrap_ref.h │ │ └── void_t.h │ │ ├── __undef_macros │ │ ├── __utility │ │ ├── as_const.h │ │ ├── auto_cast.h │ │ ├── cmp.h │ │ ├── convert_to_integral.h │ │ ├── declval.h │ │ ├── exception_guard.h │ │ ├── exchange.h │ │ ├── forward.h │ │ ├── forward_like.h │ │ ├── in_place.h │ │ ├── integer_sequence.h │ │ ├── is_pointer_in_range.h │ │ ├── move.h │ │ ├── pair.h │ │ ├── piecewise_construct.h │ │ ├── priority_tag.h │ │ ├── rel_ops.h │ │ ├── swap.h │ │ ├── terminate_on_exception.h │ │ ├── to_underlying.h │ │ └── unreachable.h │ │ ├── __variant │ │ └── monostate.h │ │ ├── __verbose_abort │ │ ├── algorithm │ │ ├── any │ │ ├── array │ │ ├── atomic │ │ ├── barrier │ │ ├── bit │ │ ├── bitset │ │ ├── cassert │ │ ├── ccomplex │ │ ├── cctype │ │ ├── cerrno │ │ ├── cfenv │ │ ├── cfloat │ │ ├── charconv │ │ ├── chrono │ │ ├── cinttypes │ │ ├── ciso646 │ │ ├── climits │ │ ├── clocale │ │ ├── cmath │ │ ├── codecvt │ │ ├── compare │ │ ├── complex │ │ ├── complex.h │ │ ├── concepts │ │ ├── condition_variable │ │ ├── coroutine │ │ ├── csetjmp │ │ ├── csignal │ │ ├── cstdarg │ │ ├── cstdbool │ │ ├── cstddef │ │ ├── cstdint │ │ ├── cstdio │ │ ├── cstdlib │ │ ├── cstring │ │ ├── ctgmath │ │ ├── ctime │ │ ├── ctype.h │ │ ├── cuchar │ │ ├── cwchar │ │ ├── cwctype │ │ ├── cxxabi.h │ │ ├── deque │ │ ├── errno.h │ │ ├── exception │ │ ├── execution │ │ ├── expected │ │ ├── experimental │ │ ├── __config │ │ ├── __memory │ │ ├── deque │ │ ├── forward_list │ │ ├── iterator │ │ ├── list │ │ ├── map │ │ ├── memory_resource │ │ ├── propagate_const │ │ ├── regex │ │ ├── set │ │ ├── simd │ │ ├── string │ │ ├── type_traits │ │ ├── unordered_map │ │ ├── unordered_set │ │ ├── utility │ │ └── vector │ │ ├── ext │ │ ├── __hash │ │ ├── hash_map │ │ └── hash_set │ │ ├── fenv.h │ │ ├── filesystem │ │ ├── float.h │ │ ├── format │ │ ├── forward_list │ │ ├── fstream │ │ ├── functional │ │ ├── future │ │ ├── initializer_list │ │ ├── inttypes.h │ │ ├── iomanip │ │ ├── ios │ │ ├── iosfwd │ │ ├── iostream │ │ ├── istream │ │ ├── iterator │ │ ├── latch │ │ ├── libcxx.imp │ │ ├── limits │ │ ├── limits.h │ │ ├── list │ │ ├── locale │ │ ├── locale.h │ │ ├── map │ │ ├── math.h │ │ ├── mdspan │ │ ├── memory │ │ ├── memory_resource │ │ ├── module.modulemap │ │ ├── mutex │ │ ├── new │ │ ├── numbers │ │ ├── numeric │ │ ├── optional │ │ ├── ostream │ │ ├── print │ │ ├── queue │ │ ├── random │ │ ├── ranges │ │ ├── ratio │ │ ├── regex │ │ ├── scoped_allocator │ │ ├── semaphore │ │ ├── set │ │ ├── setjmp.h │ │ ├── shared_mutex │ │ ├── source_location │ │ ├── span │ │ ├── sstream │ │ ├── stack │ │ ├── stdatomic.h │ │ ├── stdbool.h │ │ ├── stddef.h │ │ ├── stdexcept │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── stop_token │ │ ├── streambuf │ │ ├── string │ │ ├── string.h │ │ ├── string_view │ │ ├── strstream │ │ ├── system_error │ │ ├── tgmath.h │ │ ├── thread │ │ ├── tuple │ │ ├── type_traits │ │ ├── typeindex │ │ ├── typeinfo │ │ ├── uchar.h │ │ ├── unordered_map │ │ ├── unordered_set │ │ ├── utility │ │ ├── valarray │ │ ├── variant │ │ ├── vector │ │ ├── version │ │ ├── wchar.h │ │ └── wctype.h ├── ctype.h ├── errno.h ├── float.h ├── langinfo.h ├── limits.h ├── locale.h ├── math.h ├── stdarg.h ├── stdbool.h ├── stddef.h ├── stdint.h ├── stdio.h ├── stdlib.h ├── string.h ├── time.h ├── twr-audio.h ├── twr-crt.h ├── twr-draw2d.h ├── twr-io.h ├── twr-jsimports.h ├── twr-wasm.h ├── uchar.h └── whar.h ├── lib-c ├── libc++.a ├── twr.a └── twrd.a ├── lib-js ├── index.d.ts ├── index.d.ts.map ├── index.js ├── index.js.map ├── tsconfig.tsbuildinfo ├── twrcircular.d.ts ├── twrcircular.d.ts.map ├── twrcircular.js ├── twrcircular.js.map ├── twrcon.d.ts ├── twrcon.d.ts.map ├── twrcon.js ├── twrcon.js.map ├── twrconcanvas.d.ts ├── twrconcanvas.d.ts.map ├── twrconcanvas.js ├── twrconcanvas.js.map ├── twrcondebug.d.ts ├── twrcondebug.d.ts.map ├── twrcondebug.js ├── twrcondebug.js.map ├── twrcondiv.d.ts ├── twrcondiv.d.ts.map ├── twrcondiv.js ├── twrcondiv.js.map ├── twrcondummy.d.ts ├── twrcondummy.d.ts.map ├── twrcondummy.js ├── twrcondummy.js.map ├── twrconterm.d.ts ├── twrconterm.d.ts.map ├── twrconterm.js ├── twrconterm.js.map ├── twreventqueue.d.ts ├── twreventqueue.d.ts.map ├── twreventqueue.js ├── twreventqueue.js.map ├── twrlibaudio.d.ts ├── twrlibaudio.d.ts.map ├── twrlibaudio.js ├── twrlibaudio.js.map ├── twrlibbuiltin.d.ts ├── twrlibbuiltin.d.ts.map ├── twrlibbuiltin.js ├── twrlibbuiltin.js.map ├── twrlibdate.d.ts ├── twrlibdate.d.ts.map ├── twrlibdate.js ├── twrlibdate.js.map ├── twrliblocale.d.ts ├── twrliblocale.d.ts.map ├── twrliblocale.js ├── twrliblocale.js.map ├── twrlibmath.d.ts ├── twrlibmath.d.ts.map ├── twrlibmath.js ├── twrlibmath.js.map ├── twrlibrary.d.ts ├── twrlibrary.d.ts.map ├── twrlibrary.js ├── twrlibrary.js.map ├── twrlibtimer.d.ts ├── twrlibtimer.d.ts.map ├── twrlibtimer.js ├── twrlibtimer.js.map ├── twrmod.d.ts ├── twrmod.d.ts.map ├── twrmod.js ├── twrmod.js.map ├── twrmodasync.d.ts ├── twrmodasync.d.ts.map ├── twrmodasync.js ├── twrmodasync.js.map ├── twrmodasyncproxy.d.ts ├── twrmodasyncproxy.d.ts.map ├── twrmodasyncproxy.js ├── twrmodasyncproxy.js.map ├── twrmodutil.d.ts ├── twrmodutil.d.ts.map ├── twrmodutil.js ├── twrmodutil.js.map ├── twrsignal.d.ts ├── twrsignal.d.ts.map ├── twrsignal.js ├── twrsignal.js.map ├── twrwasmbase.d.ts ├── twrwasmbase.d.ts.map ├── twrwasmbase.js ├── twrwasmbase.js.map ├── twrwasmcall.d.ts ├── twrwasmcall.d.ts.map ├── twrwasmcall.js ├── twrwasmcall.js.map ├── twrwasmmem.d.ts ├── twrwasmmem.d.ts.map ├── twrwasmmem.js └── twrwasmmem.js.map ├── mkdocs.yml ├── notes-to-self.txt ├── package.json ├── readme.md ├── scripts ├── a-merge-dev-into-main.sh ├── b-buildazure.sh ├── c-commit-build.sh ├── google2d031eb6720a1297.html ├── handsitemap.txt ├── merge-dev-and-build-and-commit.sh ├── robots.txt ├── root.html └── staticwebapp.config.json ├── server.py ├── source ├── Makefile ├── compiler-rt │ ├── adddf3.c │ ├── addtf3.c │ ├── ashlti3.c │ ├── comparetf2.c │ ├── divtf3.c │ ├── extenddftf2.c │ ├── fixtfsi.c │ ├── floatsitf.c │ ├── fp_add_impl.inc │ ├── fp_compare_impl.inc │ ├── fp_div_impl.inc │ ├── fp_extend.h │ ├── fp_extend_impl.inc │ ├── fp_fixint_impl.inc │ ├── fp_lib.h │ ├── fp_mode.c │ ├── fp_mode.h │ ├── fp_mul_impl.inc │ ├── fp_trunc.h │ ├── fp_trunc_impl.inc │ ├── int_endianness.h │ ├── int_lib.h │ ├── int_math.h │ ├── int_types.h │ ├── int_util.c │ ├── int_util.h │ ├── lshrti3.c │ ├── multf3.c │ ├── multi3.c │ ├── subtf3.c │ ├── trunctfdf2.c │ └── trunctfsf2.c ├── libcxx │ ├── buildlibcxx.sh │ ├── compile_flags.txt │ ├── compile_flags_unwind.txt │ └── libcxxabi-patches │ │ └── src │ │ ├── BUILD.gn │ │ ├── CMakeLists.txt │ │ ├── cxa_default_handlers.cpp │ │ ├── cxa_handlers.cpp │ │ └── cxa_noexception.cpp ├── tsconfig.json ├── twr-c │ ├── audio.c │ ├── draw2d.c │ ├── initwasm.c │ ├── io.c │ ├── iojscon.c │ ├── ionull.c │ ├── twr-audio.h │ ├── twr-crt.h │ ├── twr-draw2d.h │ ├── twr-io.h │ ├── twr-jsimports.h │ └── twr-wasm.h ├── twr-gcc-unit-test │ ├── Makefile │ ├── Makefile-fc │ ├── Makefile-pr │ ├── fc.c │ ├── locale.c │ ├── locale.cpp │ ├── main.c │ ├── math │ │ ├── s21_abs.c │ │ ├── s21_acos.c │ │ ├── s21_asin.c │ │ ├── s21_atan.c │ │ ├── s21_ceil.c │ │ ├── s21_cos.c │ │ ├── s21_exp.c │ │ ├── s21_fabs.c │ │ ├── s21_floor.c │ │ ├── s21_fmod.c │ │ ├── s21_log.c │ │ ├── s21_math.h │ │ ├── s21_pow.c │ │ ├── s21_sin.c │ │ ├── s21_sqrt.c │ │ ├── s21_tan.c │ │ └── s21_trunc.c │ └── pr.c ├── twr-stdclib │ ├── abort.c │ ├── assert.c │ ├── atexit.c │ ├── char.c │ ├── cvtfloat.c │ ├── cvtint.c │ ├── div.c │ ├── errno.c │ ├── float │ │ ├── atod.c │ │ ├── dtoa.c │ │ ├── fcvt.c │ │ ├── float.c │ │ └── twr-float-util.h │ ├── include │ │ ├── _stdtypes.h │ │ ├── assert.h │ │ ├── ctype.h │ │ ├── errno.h │ │ ├── float.h │ │ ├── langinfo.h │ │ ├── limits.h │ │ ├── locale.h │ │ ├── math.h │ │ ├── stdarg.h │ │ ├── stdbool.h │ │ ├── stddef.h │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── stdlib.h │ │ ├── string.h │ │ ├── time.h │ │ ├── uchar.h │ │ └── whar.h │ ├── malloc.c │ ├── math.c │ ├── mbstring.c │ ├── memcpy.wat │ ├── misc.c │ ├── printf.c │ ├── rand.c │ ├── setlocale.c │ ├── stdio.c │ ├── strftime.c │ ├── string.c │ ├── time.c │ ├── trap.wat │ └── unittests.c └── twr-ts │ ├── index.ts │ ├── tsconfig.json │ ├── twrcircular.ts │ ├── twrcon.ts │ ├── twrconcanvas.ts │ ├── twrcondebug.ts │ ├── twrcondiv.ts │ ├── twrcondummy.ts │ ├── twrconterm.ts │ ├── twreventqueue.ts │ ├── twrlibaudio.ts │ ├── twrlibbuiltin.ts │ ├── twrlibdate.ts │ ├── twrliblocale.ts │ ├── twrlibmath.ts │ ├── twrlibrary.ts │ ├── twrlibtimer.ts │ ├── twrmod.ts │ ├── twrmodasync.ts │ ├── twrmodasyncproxy.ts │ ├── twrmodutil.ts │ ├── twrsignal.ts │ ├── twrwasmbase.ts │ ├── twrwasmcall.ts │ └── twrwasmmem.ts ├── twr-wasm-gcc.code-workspace └── twr-wasm.code-workspace /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | source/twr-gcc-unit-test/out/ 2 | source/twr-gcc-unit-test/a.exe 3 | source/out/ 4 | examples/.parcel-cache/ 5 | examples/dist/** 6 | examples/**/out/ 7 | examples/**/*.o 8 | examples/**/*.bc 9 | examples/**/*.js 10 | examples/**/*.wasm 11 | examples/**/*.map 12 | examples/**/package-lock.json 13 | include/* 14 | lib-c/twr.a 15 | lib-c/twrd.a 16 | lib-js/ 17 | azure/ 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "twr-bigint"] 2 | path = source/twr-bigint 3 | url = https://github.com/twiddlingbits/twr-bigint.git 4 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "ALL", 5 | "includePath": [ 6 | "${default}", // get includePath set in workspace (or user) 7 | "${workspaceFolder}/source/**" 8 | ] 9 | } 10 | ], 11 | "version": 4 12 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Examples/Tests (Chrome)", 5 | "type": "chrome", 6 | "request": "launch", 7 | "runtimeArgs": [ 8 | "--allow-file-access-from-files", 9 | "--autoplay-policy=no-user-gesture-required", 10 | "--enable-features=SharedArrayBuffer" 11 | ], 12 | "file": "${workspaceFolder}/examples/index.html", 13 | "cwd": "${workspaceFolder}/examples/" 14 | }, 15 | ], 16 | "version": "2.0.0" 17 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "aternative" 4 | ] 5 | } -------------------------------------------------------------------------------- /azure/docsite/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/docsite/assets/images/favicon.png -------------------------------------------------------------------------------- /azure/docsite/assets/javascripts/lunr/min/lunr.jp.min.js: -------------------------------------------------------------------------------- 1 | module.exports=require("./lunr.ja"); -------------------------------------------------------------------------------- /azure/docsite/assets/javascripts/lunr/min/lunr.multi.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var t=Array.prototype.slice.call(arguments),i=t.join("-"),r="",n=[],s=[],p=0;pt,set:e=>t=e,enumerable:!0,configurable:!0});var t,n=new Map;t=function(e,r){for(var t=0;tlibcxx WebAssembly Smoke tests
-------------------------------------------------------------------------------- /azure/examples/dist/tests-libcxx/tests-libcxx.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests-libcxx/tests-libcxx.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests-timer/tests-timer-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests-timer/tests-timer-a.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests-timer/tests-timer.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests-timer/tests-timer.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests-user/tests-user.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests-user/tests-user.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests/tests-dbg-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests/tests-dbg-a.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests/tests-dbg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests/tests-dbg.wasm -------------------------------------------------------------------------------- /azure/examples/dist/tests/tests.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/dist/tests/tests.wasm -------------------------------------------------------------------------------- /azure/examples/divcon/divcon.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/divcon/divcon.wasm -------------------------------------------------------------------------------- /azure/examples/fft/kiss_fft.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/fft/kiss_fft.wasm -------------------------------------------------------------------------------- /azure/examples/helloworld-b/helloworld.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/helloworld-b/helloworld.wasm -------------------------------------------------------------------------------- /azure/examples/helloworld/helloworld.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/helloworld/helloworld.wasm -------------------------------------------------------------------------------- /azure/examples/helloworld/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World using WebAssembly 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 |
20 | 21 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /azure/examples/lib/testex-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/lib/testex-a.wasm -------------------------------------------------------------------------------- /azure/examples/lib/testex.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/lib/testex.wasm -------------------------------------------------------------------------------- /azure/examples/maze/cyberman.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/maze/cyberman.bmp -------------------------------------------------------------------------------- /azure/examples/maze/inarrow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/maze/inarrow.bmp -------------------------------------------------------------------------------- /azure/examples/maze/maze-script.js: -------------------------------------------------------------------------------- 1 | // The Javascript side of my C maze program 2 | // My maze code was written along time ago in C for the Amiga, then ported some years later as a Windows screen saver. 3 | // Now, 20+ years later, running on the web! 4 | // 5 | // The C code is more or less untouched. I wrote a simple Win32 to twr-wasm 2D drawing APIs layer. 6 | // 7 | import { twrWasmModuleAsync } from "twr-wasm"; 8 | export async function mazeRunner() { 9 | const amod = new twrWasmModuleAsync(); 10 | await amod.loadWasm('maze.wasm'); 11 | //void CalcMaze(HWND hWnd, LONG cell_size, LONG is_black_bg, LONG isd - slow draw) 12 | await amod.callC(["CalcMaze", 0, 7, 0, 1]); 13 | await amod.callC(["SolveBegin"]); 14 | let timer = setInterval(async () => { 15 | let isdone = await amod.callC(["SolveStep", 0]); //SolveStep(hwnd)) 16 | if (isdone) 17 | clearInterval(timer); 18 | }, 50); 19 | } 20 | //# sourceMappingURL=maze-script.js.map -------------------------------------------------------------------------------- /azure/examples/maze/maze-script.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"maze-script.js","sourceRoot":"","sources":["maze-script.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,uHAAuH;AACvH,4CAA4C;AAC5C,EAAE;AACF,mGAAmG;AACnG,GAAG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAE5C,MAAM,CAAC,KAAK,UAAU,UAAU;IAE5B,MAAM,IAAI,GAAC,IAAI,kBAAkB,EAAE,CAAC;IAEpC,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEjC,kFAAkF;IAClF,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;IAEjC,IAAI,KAAK,GAAG,WAAW,CAAC,KAAK,IAAG,EAAE;QAC9B,IAAI,MAAM,GAAC,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,kBAAkB;QAClE,IAAI,MAAM;YAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"} -------------------------------------------------------------------------------- /azure/examples/maze/maze-script.ts: -------------------------------------------------------------------------------- 1 | // The Javascript side of my C maze program 2 | // My maze code was written along time ago in C for the Amiga, then ported some years later as a Windows screen saver. 3 | // Now, 20+ years later, running on the web! 4 | // 5 | // The C code is more or less untouched. I wrote a simple Win32 to twr-wasm 2D drawing APIs layer. 6 | // 7 | 8 | import {twrWasmModuleAsync} from "twr-wasm"; 9 | 10 | export async function mazeRunner() { 11 | 12 | const amod=new twrWasmModuleAsync(); 13 | 14 | await amod.loadWasm('maze.wasm'); 15 | 16 | //void CalcMaze(HWND hWnd, LONG cell_size, LONG is_black_bg, LONG isd - slow draw) 17 | await amod.callC(["CalcMaze", 0, 7, 0, 1]); 18 | await amod.callC(["SolveBegin"]); 19 | 20 | let timer = setInterval(async ()=>{ 21 | let isdone=await amod.callC(["SolveStep", 0]); //SolveStep(hwnd)) 22 | if (isdone) clearInterval(timer); 23 | }, 50); 24 | } 25 | -------------------------------------------------------------------------------- /azure/examples/maze/maze.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/maze/maze.wasm -------------------------------------------------------------------------------- /azure/examples/multi-io/multi-io-mod.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/multi-io/multi-io-mod.wasm -------------------------------------------------------------------------------- /azure/examples/multi-io/multi-io.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/multi-io/multi-io.wasm -------------------------------------------------------------------------------- /azure/examples/pong/entry-point-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/pong/entry-point-a.wasm -------------------------------------------------------------------------------- /azure/examples/pong/entry-point.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/pong/entry-point.wasm -------------------------------------------------------------------------------- /azure/examples/server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from http import server # Python 3 3 | 4 | class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler): 5 | def end_headers(self): 6 | self.send_my_headers() 7 | server.SimpleHTTPRequestHandler.end_headers(self) 8 | 9 | def send_my_headers(self): 10 | self.send_header("Access-Control-Allow-Origin", "*") 11 | self.send_header("Cross-Origin-Embedder-Policy", "require-corp") 12 | self.send_header("Cross-Origin-Opener-Policy", "same-origin") 13 | # Turn off caching 14 | self.send_header("Cache-Control", "no-cache, no-store, must-revalidate") 15 | self.send_header("Pragma", "no-cache") 16 | self.send_header("Expires", "0") 17 | 18 | if __name__ == '__main__': 19 | server.test(HandlerClass=MyHTTPRequestHandler) 20 | 21 | -------------------------------------------------------------------------------- /azure/examples/terminal/terminal.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/terminal/terminal.wasm -------------------------------------------------------------------------------- /azure/examples/tests-audio/clearIODiv.ts: -------------------------------------------------------------------------------- 1 | import {IWasmModule, IWasmModuleAsync, twrLibrary, keyEventToCodePoint, TLibImports, twrLibraryInstanceRegistry} from "twr-wasm" 2 | 3 | // Libraries use default export 4 | export default class clearIODivLib extends twrLibrary { 5 | id: number; 6 | 7 | imports:TLibImports = { 8 | clearIODiv: {}, 9 | }; 10 | 11 | // every library should have this line 12 | libSourcePath = new URL(import.meta.url).pathname; 13 | 14 | constructor() { 15 | // all library constructors should start with these two lines 16 | super(); 17 | this.id=twrLibraryInstanceRegistry.register(this); 18 | } 19 | 20 | clearIODiv(mod: IWasmModule|IWasmModuleAsync) { 21 | const ioDiv = document.getElementById("twr_iodiv"); 22 | if (!ioDiv) throw new Error("clearIODiv couldn't find twr_iodiv!"); 23 | 24 | ioDiv.innerText = ""; 25 | } 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /azure/examples/tests-audio/croud.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-audio/croud.mp3 -------------------------------------------------------------------------------- /azure/examples/tests-audio/out/clearIODiv.js: -------------------------------------------------------------------------------- 1 | import { twrLibrary, twrLibraryInstanceRegistry } from "twr-wasm"; 2 | // Libraries use default export 3 | export default class clearIODivLib extends twrLibrary { 4 | id; 5 | imports = { 6 | clearIODiv: {}, 7 | }; 8 | // every library should have this line 9 | libSourcePath = new URL(import.meta.url).pathname; 10 | constructor() { 11 | // all library constructors should start with these two lines 12 | super(); 13 | this.id = twrLibraryInstanceRegistry.register(this); 14 | } 15 | clearIODiv(mod) { 16 | const ioDiv = document.getElementById("twr_iodiv"); 17 | if (!ioDiv) 18 | throw new Error("clearIODiv couldn't find twr_iodiv!"); 19 | ioDiv.innerText = ""; 20 | } 21 | } 22 | //# sourceMappingURL=clearIODiv.js.map -------------------------------------------------------------------------------- /azure/examples/tests-audio/ping.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-audio/ping.mp3 -------------------------------------------------------------------------------- /azure/examples/tests-audio/tests-audio-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-audio/tests-audio-a.wasm -------------------------------------------------------------------------------- /azure/examples/tests-audio/tests-audio.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-audio/tests-audio.wasm -------------------------------------------------------------------------------- /azure/examples/tests-d2d/test-img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-d2d/test-img.jpg -------------------------------------------------------------------------------- /azure/examples/tests-d2d/tests-d2d-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-d2d/tests-d2d-a.wasm -------------------------------------------------------------------------------- /azure/examples/tests-d2d/tests-d2d.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-d2d/tests-d2d.wasm -------------------------------------------------------------------------------- /azure/examples/tests-libcxx/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libcxx WebAssembly Smoke tests 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 |
19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /azure/examples/tests-libcxx/tests-libcxx.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-libcxx/tests-libcxx.wasm -------------------------------------------------------------------------------- /azure/examples/tests-timer/tests-timer-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-timer/tests-timer-a.wasm -------------------------------------------------------------------------------- /azure/examples/tests-timer/tests-timer.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-timer/tests-timer.wasm -------------------------------------------------------------------------------- /azure/examples/tests-user/tests-user.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests-user/tests-user.wasm -------------------------------------------------------------------------------- /azure/examples/tests/tests-dbg-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests/tests-dbg-a.wasm -------------------------------------------------------------------------------- /azure/examples/tests/tests-dbg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests/tests-dbg.wasm -------------------------------------------------------------------------------- /azure/examples/tests/tests.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/azure/examples/tests/tests.wasm -------------------------------------------------------------------------------- /azure/google2d031eb6720a1297.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google2d031eb6720a1297.html -------------------------------------------------------------------------------- /azure/handsitemap.txt: -------------------------------------------------------------------------------- 1 | https://twiddlingbits.dev/docsite/index.html 2 | https://twiddlingbits.dev/examples/dist/index.html 3 | https://twiddlingbits.dev/examples/dist/maze/index.html 4 | https://twiddlingbits.dev/examples/dist/balls/index.html 5 | https://twiddlingbits.dev/examples/dist/fft/index.html 6 | https://twiddlingbits.dev/examples/dist/divcon/index.html 7 | 8 | -------------------------------------------------------------------------------- /azure/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /azure/lib-js/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from "./twrwasmbase.js"; 2 | export * from "./twrmod.js"; 3 | export * from "./twrwasmmem.js"; 4 | export * from "./twrmodasync.js"; 5 | export * from "./twrcondiv.js"; 6 | export * from "./twrconterm.js"; 7 | export * from "./twrcon.js"; 8 | export * from "./twrcondebug.js"; 9 | export * from "./twrconcanvas.js"; 10 | export * from "./twrlibrary.js"; 11 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/twr-ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"} -------------------------------------------------------------------------------- /azure/lib-js/index.js: -------------------------------------------------------------------------------- 1 | export * from "./twrwasmbase.js"; 2 | export * from "./twrmod.js"; 3 | export * from "./twrwasmmem.js"; 4 | export * from "./twrmodasync.js"; 5 | export * from "./twrcondiv.js"; 6 | export * from "./twrconterm.js"; 7 | export * from "./twrcon.js"; 8 | export * from "./twrcondebug.js"; 9 | export * from "./twrconcanvas.js"; 10 | export * from "./twrlibrary.js"; 11 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /azure/lib-js/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/twr-ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"} -------------------------------------------------------------------------------- /azure/lib-js/twrcircular.d.ts: -------------------------------------------------------------------------------- 1 | export declare class twrSharedCircularBuffer { 2 | saBuffer: SharedArrayBuffer; 3 | f64Array: Float64Array; 4 | i32Array: Int32Array; 5 | constructor(sa?: SharedArrayBuffer); 6 | private silentWrite; 7 | writeArray(arr: number[]): void; 8 | write(n: number): void; 9 | read(): number | undefined; 10 | readWait(): number; 11 | isEmpty(): boolean; 12 | } 13 | //# sourceMappingURL=twrcircular.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrcircular.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrcircular.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrcircular.ts"],"names":[],"mappings":"AAkBA,qBAAa,uBAAuB;IACjC,QAAQ,EAAC,iBAAiB,CAAC;IAC3B,QAAQ,EAAC,YAAY,CAAC;IACtB,QAAQ,EAAC,UAAU,CAAC;gBAEP,EAAE,CAAC,EAAC,iBAAiB;IAalC,OAAO,CAAC,WAAW;IAQnB,UAAU,CAAC,GAAG,EAAC,MAAM,EAAE;IAQvB,KAAK,CAAC,CAAC,EAAC,MAAM;IAKd,IAAI;IAaJ,QAAQ,IAAG,MAAM;IAYhB,OAAO,IAAG,OAAO;CAGpB"} -------------------------------------------------------------------------------- /azure/lib-js/twrconcanvas.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrconcanvas.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrconcanvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,YAAY,EAAU,MAAM,aAAa,CAAC;AAClE,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,UAAU,EAAE,WAAW,EAA6B,MAAM,iBAAiB,CAAC;AA6DpF,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,cAAc;IACvE,EAAE,EAAC,MAAM,CAAC;IACV,GAAG,EAAC,wBAAwB,CAAC;IAC7B,OAAO,EAAC,iBAAiB,CAAA;IACzB,KAAK,EAAC,YAAY,CAAC;IAEnB,kBAAkB,EAAE;QAAG,CAAC,KAAK,EAAE,MAAM,GAClC,CAAC,SAAS,GACV;YAAC,IAAI,EAAC,UAAU,CAAC;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,MAAM,EAAC,MAAM,CAAA;SAAC,CAAC,GAC/C,cAAc,GACd,gBAAgB,CAAA;KAClB,CAAC;IAEF,OAAO,EAAC,WAAW,CAIjB;IAEF,aAAa,SAAqC;IAClD,aAAa,SAAgB;gBAEjB,OAAO,EAAC,iBAAiB;IAwBrC,OAAO,CAAC,IAAI,EAAC,MAAM,YAAY,GAAG,MAAM;IAIxC,aAAa,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,EAAE,EAAC,MAAM,GAAE,MAAM;IAKxE,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAI,OAAO,CAAC,MAAM,CAAC;IAqB1F,aAAa,CAAC,GAAG,EAAC,gBAAgB,GAAC,WAAW,EAAE,EAAE,EAAC,MAAM;CA8rB3D;AAED,eAAe,gBAAgB,CAAC"} -------------------------------------------------------------------------------- /azure/lib-js/twrcondebug.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrcondebug.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrcondebug.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAU,MAAM,aAAa,CAAA;AACtD,OAAO,EAAC,6BAA6B,EAAC,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAA;AACvC,OAAO,EAAC,UAAU,EAAE,WAAW,EAA6B,MAAM,iBAAiB,CAAC;AAEpF,qBAAa,eAAgB,SAAQ,UAAW,YAAW,iBAAiB;IACzE,EAAE,EAAC,MAAM,CAAC;IACV,OAAO,SAAI;IACX,OAAO,YAAW;IAClB,WAAW,EAAC,6BAA6B,CAAC;IAE1C,OAAO,EAAC,WAAW,CAIjB;IAEF,aAAa,SAAqC;IAClD,aAAa,SAAgB;;IAU7B,OAAO,CAAC,EAAE,EAAC,MAAM;IAiBjB,aAAa,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,EAAE,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM;IAMjF,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAE,MAAM;IAMhC,aAAa,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,EAAE,EAAC,MAAM,GAAE,MAAM;IAKxE,MAAM,CAAC,GAAG,EAAC,MAAM;IAKjB,YAAY,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAG,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM;CAItF;AAED,eAAe,eAAe,CAAC"} -------------------------------------------------------------------------------- /azure/lib-js/twrlibbuiltin.d.ts: -------------------------------------------------------------------------------- 1 | export declare function twrLibBuiltIns(): Promise; 2 | //# sourceMappingURL=twrlibbuiltin.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrlibbuiltin.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrlibbuiltin.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrlibbuiltin.ts"],"names":[],"mappings":"AAeA,wBAAsB,cAAc,kBAanC"} -------------------------------------------------------------------------------- /azure/lib-js/twrlibbuiltin.js: -------------------------------------------------------------------------------- 1 | // pre-installed libraries go in this file 2 | import twrLibMathMod from "./twrlibmath.js"; 3 | import twrLibLocaleMod from "./twrliblocale.js"; 4 | import twrLibTimerMod from "./twrlibtimer.js"; 5 | import twrLibAudio from "./twrlibaudio.js"; 6 | import twrLibDateMod from "./twrlibdate.js"; 7 | import twrConsoleDummy from "./twrcondummy.js"; 8 | // currently, libraries can only have one instance 9 | let defaultLibsAreRegistered = false; 10 | export async function twrLibBuiltIns() { 11 | if (!defaultLibsAreRegistered) { 12 | // add builtin libraries here: 13 | new twrLibMathMod; // will register self in twrLibraryInstanceRegistry 14 | new twrLibLocaleMod; 15 | new twrLibTimerMod; 16 | new twrLibAudio; 17 | new twrLibDateMod; 18 | new twrConsoleDummy; 19 | defaultLibsAreRegistered = true; 20 | } 21 | } 22 | //# sourceMappingURL=twrlibbuiltin.js.map -------------------------------------------------------------------------------- /azure/lib-js/twrlibbuiltin.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrlibbuiltin.js","sourceRoot":"","sources":["../source/twr-ts/twrlibbuiltin.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAI1C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,eAAe,MAAM,kBAAkB,CAAA;AAE9C,kDAAkD;AAClD,IAAI,wBAAwB,GAAC,KAAK,CAAC;AAEnC,MAAM,CAAC,KAAK,UAAU,cAAc;IACjC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAE7B,8BAA8B;QAC9B,IAAI,aAAa,CAAC,CAAE,mDAAmD;QACvE,IAAI,eAAe,CAAC;QACpB,IAAI,cAAc,CAAC;QACnB,IAAI,WAAW,CAAC;QAChB,IAAI,aAAa,CAAC;QAClB,IAAI,eAAe,CAAC;QAEpB,wBAAwB,GAAC,IAAI,CAAC;IACjC,CAAC;AACJ,CAAC"} -------------------------------------------------------------------------------- /azure/lib-js/twrlibdate.d.ts: -------------------------------------------------------------------------------- 1 | import { IWasmModule } from "./twrmod.js"; 2 | import { twrWasmBase } from "./twrwasmbase.js"; 3 | import { twrLibrary, TLibImports } from "./twrlibrary.js"; 4 | export default class twrLibDate extends twrLibrary { 5 | id: number; 6 | imports: TLibImports; 7 | libSourcePath: string; 8 | constructor(); 9 | twrTimeEpoch(callingMod: IWasmModule | twrWasmBase): bigint; 10 | } 11 | //# sourceMappingURL=twrlibdate.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrlibdate.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrlibdate.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrlibdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAA;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAC,UAAU,EAAE,WAAW,EAA6B,MAAM,iBAAiB,CAAC;AAMpF,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;IAC/C,EAAE,EAAC,MAAM,CAAC;IAEV,OAAO,EAAC,WAAW,CAElB;IAED,aAAa,SAAqC;;IASlD,YAAY,CAAC,UAAU,EAAC,WAAW,GAAC,WAAW;CAKjD"} -------------------------------------------------------------------------------- /azure/lib-js/twrlibdate.js: -------------------------------------------------------------------------------- 1 | import { twrLibrary, twrLibraryInstanceRegistry } from "./twrlibrary.js"; 2 | //TODO!! Add more Date functions (as alternatives to std c lib)? 3 | // add built-in Libraries (like this one) to twrLibBultins 4 | // libraries use the default export 5 | export default class twrLibDate extends twrLibrary { 6 | id; 7 | imports = { 8 | twrTimeEpoch: { isCommonCode: true } 9 | }; 10 | libSourcePath = new URL(import.meta.url).pathname; 11 | constructor() { 12 | // all library constructors should start with these two lines 13 | super(); 14 | this.id = twrLibraryInstanceRegistry.register(this); 15 | } 16 | // return ms since epoch as int64_t 17 | twrTimeEpoch(callingMod) { 18 | return BigInt(Date.now()); 19 | } 20 | } 21 | //# sourceMappingURL=twrlibdate.js.map -------------------------------------------------------------------------------- /azure/lib-js/twrlibdate.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrlibdate.js","sourceRoot":"","sources":["../source/twr-ts/twrlibdate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAe,0BAA0B,EAAC,MAAM,iBAAiB,CAAC;AAEpF,gEAAgE;AAEhE,0DAA0D;AAC1D,mCAAmC;AACnC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;IAC/C,EAAE,CAAQ;IAEV,OAAO,GAAe;QACnB,YAAY,EAAC,EAAC,YAAY,EAAE,IAAI,EAAC;KACnC,CAAA;IAED,aAAa,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;IAElD;QACG,6DAA6D;QAC7D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAC,0BAA0B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,mCAAmC;IACnC,YAAY,CAAC,UAAkC;QAE5C,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAE7B,CAAC;CACH"} -------------------------------------------------------------------------------- /azure/lib-js/twrlibtimer.d.ts: -------------------------------------------------------------------------------- 1 | import { IWasmModule } from "./twrmod.js"; 2 | import { IWasmModuleAsync } from "./twrmodasync.js"; 3 | import { twrLibrary, TLibImports } from "./twrlibrary.js"; 4 | export default class twrLibTimer extends twrLibrary { 5 | id: number; 6 | imports: TLibImports; 7 | libSourcePath: string; 8 | constructor(); 9 | twr_timer_single_shot(callingMod: IWasmModule | IWasmModuleAsync, milliSeconds: number, eventID: number): number; 10 | twr_timer_repeat(callingMod: IWasmModule | IWasmModuleAsync, milliSeconds: number, eventID: number): number; 11 | twr_timer_cancel(callingMod: IWasmModule | IWasmModuleAsync, timerID: number): void; 12 | twr_sleep_async(callingMod: IWasmModuleAsync, milliSeconds: number): Promise; 13 | } 14 | //# sourceMappingURL=twrlibtimer.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrlibtimer.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrlibtimer.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrlibtimer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAC,UAAU,EAAE,WAAW,EAA6B,MAAM,iBAAiB,CAAA;AAGnF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAC,WAAW,CAKjB;IAEF,aAAa,SAAqC;;IAQlD,qBAAqB,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,YAAY,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM;IAMlG,gBAAgB,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,YAAY,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM;IAM7F,gBAAgB,CAAC,UAAU,EAAC,WAAW,GAAC,gBAAgB,EAAE,OAAO,EAAC,MAAM;IAIlE,eAAe,CAAC,UAAU,EAAC,gBAAgB,EAAE,YAAY,EAAC,MAAM;CAQxE"} -------------------------------------------------------------------------------- /azure/lib-js/twrmodasyncproxy.d.ts: -------------------------------------------------------------------------------- 1 | import { twrWasmBase } from "./twrwasmbase.js"; 2 | import { TLibraryProxyParams } from "./twrlibrary.js"; 3 | import { twrEventQueueReceive } from "./twreventqueue.js"; 4 | export interface IAllProxyParams { 5 | libProxyParams: TLibraryProxyParams[]; 6 | ioNamesToID: { 7 | [key: string]: number; 8 | }; 9 | eventQueueBuffer: SharedArrayBuffer; 10 | } 11 | export declare class twrWasmModuleAsyncProxy extends twrWasmBase { 12 | allProxyParams: IAllProxyParams; 13 | ioNamesToID: { 14 | [key: string]: number; 15 | }; 16 | libimports: WebAssembly.ModuleImports; 17 | eventQueueReceive: twrEventQueueReceive; 18 | constructor(allProxyParams: IAllProxyParams); 19 | loadWasm(pathToLoad: string): Promise; 20 | } 21 | //# sourceMappingURL=twrmodasyncproxy.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrmodasyncproxy.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrmodasyncproxy.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrmodasyncproxy.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAC,mBAAmB,EAAmD,MAAM,iBAAiB,CAAA;AACrG,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AACvD,MAAM,WAAW,eAAe;IAC7B,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,WAAW,EAAE;QAAC,CAAC,GAAG,EAAC,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;IACpC,gBAAgB,EAAE,iBAAiB,CAAA;CACrC;AA2CD,qBAAa,uBAAwB,SAAQ,WAAW;IACrD,cAAc,EAAC,eAAe,CAAC;IAC/B,WAAW,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;IACrC,UAAU,EAAC,WAAW,CAAC,aAAa,CAAK;IACzC,iBAAiB,EAAE,oBAAoB,CAAC;gBAE5B,cAAc,EAAC,eAAe;IAQpC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAuCnD"} -------------------------------------------------------------------------------- /azure/lib-js/twrmodutil.d.ts: -------------------------------------------------------------------------------- 1 | import { IConsole, IConsoleBase, IConsoleStreamOut, IConsoleCanvas } from "./twrcon.js"; 2 | export interface IModOpts { 3 | stdio?: IConsoleStreamOut & IConsoleBase; 4 | d2dcanvas?: IConsoleCanvas & IConsoleBase; 5 | io?: { 6 | [key: string]: IConsole; 7 | }; 8 | windim?: [number, number]; 9 | forecolor?: string; 10 | backcolor?: string; 11 | fontsize?: number; 12 | imports?: {}; 13 | } 14 | export type IParseModOptsResult = [{ 15 | [key: string]: IConsole; 16 | }, { 17 | [key: string]: number; 18 | }]; 19 | export declare function parseModOptions(opts?: IModOpts): IParseModOptsResult; 20 | //# sourceMappingURL=twrmodutil.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrmodutil.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrmodutil.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrmodutil.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAC,MAAM,aAAa,CAAA;AAQrF,MAAM,WAAW,QAAQ;IACxB,KAAK,CAAC,EAAE,iBAAiB,GAAC,YAAY,CAAC;IACrC,SAAS,CAAC,EAAE,cAAc,GAAC,YAAY,CAAC;IAC1C,EAAE,CAAC,EAAE;QAAC,CAAC,GAAG,EAAC,MAAM,GAAG,QAAQ,CAAA;KAAC,CAAC;IAC9B,MAAM,CAAC,EAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAC,MAAM,CAAC;IACjB,OAAO,CAAC,EAAC,EAAE,CAAC;CACZ;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC;IAAC,CAAC,GAAG,EAAC,MAAM,GAAG,QAAQ,CAAA;CAAC,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC,CAAC;AAEtF,wBAAgB,eAAe,CAAC,IAAI,GAAC,QAAW,GAAE,mBAAmB,CA+DpE"} -------------------------------------------------------------------------------- /azure/lib-js/twrsignal.d.ts: -------------------------------------------------------------------------------- 1 | export declare class twrSignal { 2 | saBuffer: SharedArrayBuffer; 3 | i32Array: Int32Array; 4 | constructor(sa?: SharedArrayBuffer); 5 | signal(): void; 6 | wait(): void; 7 | isSignaled(): boolean; 8 | reset(): void; 9 | } 10 | //# sourceMappingURL=twrsignal.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrsignal.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrsignal.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrsignal.ts"],"names":[],"mappings":"AAUA,qBAAa,SAAS;IACrB,QAAQ,EAAC,iBAAiB,CAAC;IAC3B,QAAQ,EAAC,UAAU,CAAC;gBAEN,EAAE,CAAC,EAAC,iBAAiB;IAWnC,MAAM;IAMH,IAAI;IAQJ,UAAU,IAAG,OAAO;IAIpB,KAAK;CAGR"} -------------------------------------------------------------------------------- /azure/lib-js/twrwasmbase.d.ts: -------------------------------------------------------------------------------- 1 | import { IWasmMemory } from './twrwasmmem.js'; 2 | import { twrWasmCall } from "./twrwasmcall.js"; 3 | export type TOnEventCallback = (eventID: number, ...args: number[]) => void; 4 | export declare class twrWasmBase { 5 | exports: WebAssembly.Exports; 6 | wasmMem: IWasmMemory; 7 | wasmCall: twrWasmCall; 8 | callC: twrWasmCall["callC"]; 9 | /*********************************************************************/ 10 | private getImports; 11 | loadWasm(pathToLoad: string, imports: WebAssembly.ModuleImports): Promise; 12 | registerCallback(funcNameIdx: number): number; 13 | } 14 | //# sourceMappingURL=twrwasmbase.d.ts.map -------------------------------------------------------------------------------- /azure/lib-js/twrwasmbase.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"twrwasmbase.d.ts","sourceRoot":"","sources":["../source/twr-ts/twrwasmbase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAS5C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAC,MAAM,EAAE,GAAG,IAAI,EAAC,MAAM,EAAE,KAAG,IAAI,CAAC;AAExE,qBAAa,WAAW;IACrB,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC;IAC7B,OAAO,EAAG,WAAW,CAAC;IACtB,QAAQ,EAAG,WAAW,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAE5B,uEAAuE;IAEvE,OAAO,CAAC,UAAU;IAOZ,QAAQ,CAAC,UAAU,EAAC,MAAM,EAAE,OAAO,EAAC,WAAW,CAAC,aAAa;IAmCnE,gBAAgB,CAAC,WAAW,EAAC,MAAM;CAMrC"} -------------------------------------------------------------------------------- /azure/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Sitemap: https://twiddlingbits.dev/docsite/sitemap.xml 3 | Sitemap: https://twiddlingbits.dev/handsitemap.txt 4 | 5 | -------------------------------------------------------------------------------- /azure/source/twr-ts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./twrwasmbase.js" 2 | export * from "./twrmod.js" 3 | export * from "./twrwasmmem.js" 4 | export * from "./twrmodasync.js" 5 | export * from "./twrcondiv.js" 6 | export * from "./twrconterm.js" 7 | export * from "./twrcon.js" 8 | export * from "./twrcondebug.js" 9 | export * from "./twrconcanvas.js" 10 | export * from "./twrlibrary.js" 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /azure/source/twr-ts/twrlibbuiltin.ts: -------------------------------------------------------------------------------- 1 | // pre-installed libraries go in this file 2 | 3 | import {twrLibraryInstanceRegistry} from "./twrlibrary" 4 | 5 | import twrLibMathMod from "./twrlibmath.js"; 6 | import twrLibLocaleMod from "./twrliblocale.js" 7 | import twrLibTimerMod from "./twrlibtimer.js" 8 | 9 | import twrLibAudio from "./twrlibaudio.js"; 10 | import twrLibDateMod from "./twrlibdate.js" 11 | import twrConsoleDummy from "./twrcondummy.js" 12 | 13 | // currently, libraries can only have one instance 14 | let defaultLibsAreRegistered=false; 15 | 16 | export async function twrLibBuiltIns() { 17 | if (!defaultLibsAreRegistered) { 18 | 19 | // add builtin libraries here: 20 | new twrLibMathMod; // will register self in twrLibraryInstanceRegistry 21 | new twrLibLocaleMod; 22 | new twrLibTimerMod; 23 | new twrLibAudio; 24 | new twrLibDateMod; 25 | new twrConsoleDummy; 26 | 27 | defaultLibsAreRegistered=true; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /azure/source/twr-ts/twrlibdate.ts: -------------------------------------------------------------------------------- 1 | import {IWasmModule} from "./twrmod.js" 2 | import {twrWasmBase} from "./twrwasmbase.js" 3 | import {twrLibrary, TLibImports, twrLibraryInstanceRegistry} from "./twrlibrary.js"; 4 | 5 | //TODO!! Add more Date functions (as alternatives to std c lib)? 6 | 7 | // add built-in Libraries (like this one) to twrLibBultins 8 | // libraries use the default export 9 | export default class twrLibDate extends twrLibrary { 10 | id:number; 11 | 12 | imports:TLibImports = { 13 | twrTimeEpoch:{isCommonCode: true} 14 | } 15 | 16 | libSourcePath = new URL(import.meta.url).pathname; 17 | 18 | constructor() { 19 | // all library constructors should start with these two lines 20 | super(); 21 | this.id=twrLibraryInstanceRegistry.register(this); 22 | } 23 | 24 | // return ms since epoch as int64_t 25 | twrTimeEpoch(callingMod:IWasmModule|twrWasmBase) { 26 | 27 | return BigInt(Date.now()); 28 | 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /azure/staticwebapp.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalHeaders": { 3 | "Access-Control-Allow-Origin": "*", 4 | "Cross-Origin-Embedder-Policy": "require-corp", 5 | "Cross-Origin-Opener-Policy": "same-origin" 6 | } 7 | } -------------------------------------------------------------------------------- /docs/examples/examples-balls.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bouncing Balls - WebAssembly C++ 2D Draw Example 3 | description: A 2D drawing WebAssembly C/C++ example of bouncing and dividing balls using Canvas like 2D API with twr-wasm 4 | --- 5 | 6 | # Bouncing Balls - 2D Draw API Wasm Example 7 | This example uses twr-wasm's 2D Draw API and a C++ Canvas class with WebAssembly and C++ to bounce balls around your HTML page. 8 | 9 | * [View bouncing balls](/examples/dist/balls/index.html) 10 | * [Source for balls](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/balls) 11 | 12 | The bouncing balls example demonstrates 13 | 14 | * C++ 15 | * Using the twr-wasm draw 2D APIs that match Javascript Canvas APIs. 16 | * Using the twr-wasm canvas.cpp wrapper class. 17 | 18 | 19 | This example does not use libc++, which results in smaller code size. For an example that uses libc++ see [tests-libcxx](examples-libcxx.md). 20 | 21 | ## Screen Grab of Balls Example 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/examples/examples-callc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: callC - Calling WebAssembly Functions Example 3 | description: Demonstration of how to pass and return values between TypeScript/JavaScript and C/C++ when you are using WebAssembly 4 | --- 5 | 6 | # callC - Calling WebAssembly Functions Example 7 | This example demonstrates how to pass and return values between TypeScript/JavaScript and C/C++ when you are using WebAssembly with twr-wasm. 8 | 9 | [This article explains the key concepts](../gettingstarted/parameters.md) to pass arguments between JavaScript/TypeScript and Wasm C/C++. 10 | 11 | - [View callC example running live](/examples/dist/callc/index.html) 12 | - [View callC example source](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/callc) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/examples/examples-helloworld.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello World - A simple C example using WebAssembly 3 | description: Simple C example prints to an HTML div tag using WebAssembly with twr-wasm 4 | --- 5 | 6 | # Hello World - WebAssembly C Example 7 | This example is a very simple twr-wasm program. It uses WebAssembly and C to print "hello, world!" to an HTML `
` tag. 8 | 9 | Also see: [Hello World - Step-by-Step C to Wasm](../gettingstarted/helloworld.md). 10 | 11 | - [View helloworld example running live](/examples/dist/helloworld/index.html) 12 | - [View helloworld source code](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/helloworld) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/examples/examples-lib.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: lib - Example of adding TypeScript APIs to C/C++ 3 | description: This example demos how to implement code in TypeScript that can be called by your twr-wasm C/C++ code. Uses class twrLibrary. 4 | --- 5 | 6 | # class twrLibrary Example 7 | ## What It Does 8 | This example is a twr-wasm Library that implements functions that can be called by your C/C++ code. A twr-wasm Library is written in TypeScript, and derives from the class twrLibrary. 9 | 10 | The lib example demos: 11 | 12 | * Creating functions in TypeScript that can be called from C/C++ 13 | * Posting Events to C 14 | * Implementing blocking as well as non-blocking functions 15 | 16 | ## Running Examples and Source: 17 | 18 | - [View lib output](/examples/dist/lib/index.html) 19 | - [Source for lib](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/lib) 20 | 21 | Also see [twr-wasm Libraries Documentation](./../api/api-ts-library.md) 22 | -------------------------------------------------------------------------------- /docs/examples/examples-libcxx.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: libc++ WebAssembly Smoke Test 3 | description: Simple test of various libc++ functions using WebAssembly with twr-wasm 4 | --- 5 | 6 | # tests-libcxx - WebAssembly libc++ Smoke Test 7 | This is a simple test of various libc++ functions using WebAssembly with twr-wasm. The C++ program links with libc++. An example makefile is provided. 8 | 9 | - [view tests-libcxx example running live](/examples/dist/tests-libcxx/index.html) 10 | - [View tests-libcxx source code](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/tests-libcxx) 11 | 12 | Also see this WebAssembly program that uses libc++ with twr-wasm to implement a CLI console. 13 | 14 | - [tests-user Live](/examples/dist/tests-user/index.html) 15 | - [tests-user Source](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/tests-user) 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/examples/examples-terminal.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: WebAssembly Example of a Terminal Using a Canvas Tag 3 | description: This WebAssembly C example demos a character 'terminal' with input and output direct to a tag using twr-wasm 4 | --- 5 | 6 | # Terminal Console Demo 7 | A simple WebAssembly C "terminal" is demoed with input and output directed to an HTML `` tag. 8 | 9 | ## What it Does 10 | 11 | - uses class twrConsoleTerminal, a Console 12 | - moves a string up or down in the terminal window when you press the u or d or arrow keys. 13 | - shows basic color usage 14 | - draws a graphic box around the terminal window. 15 | 16 | ## Run and View the Code 17 | - [View terminal example running live](/examples/dist/terminal/index.html) 18 | - [View terminal source code](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/terminal) 19 | - For another 'terminal' demo [View tests-user](/examples/dist/tests-user/index.html) 20 | 21 | ## Screen Grab of Terminal 22 | 23 | -------------------------------------------------------------------------------- /docs/examples/examples-tests-audio.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Audio API WebAssembly Unit Tests 3 | description: Simple unit tests of the various Audio functions 4 | --- 5 | 6 | # tests-audio - Unit tests for Audio Library 7 | This is a simple set of Unit Tests for testing the Audio API functions. It includes a test for each Audio function. WARNING: Some of the audio played can be loud, so turn down your volume before playing. 8 | 9 | - [view tests-audio example running live](/examples/dist/tests-audio/index.html) 10 | - [View tests-audio source code](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/tests-audio) 11 | 12 | Also see these WebAssembly programs that use this API 13 | 14 | - [Pong](examples-pong.md) 15 | -------------------------------------------------------------------------------- /docs/examples/examples-tests-d2d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: D2D canvas API WebAssembly Unit Tests 3 | description: Simple unit tests of the various d2d functions 4 | --- 5 | 6 | # tests-d2d - Unit tests for Draw 2D canvas console 7 | This is a simple set of Unit Tests for testing the D2D API functions. It includes a test for each D2D function as well as a test for memory leaks within the API itself. 8 | 9 | - [view tests-d2d example running live](/examples/dist/tests-d2d/index.html) 10 | - [View tests-d2d source code](https://github.com/twiddlingbits/twr-wasm/tree/main/examples/tests-d2d) 11 | 12 | Also see these WebAssembly programs that use this API 13 | 14 | - [Balls](examples-balls.md) 15 | - [Pong](examples-pong.md) 16 | -------------------------------------------------------------------------------- /docs/img/readme-img-2-player-pong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-2-player-pong.png -------------------------------------------------------------------------------- /docs/img/readme-img-balls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-balls.png -------------------------------------------------------------------------------- /docs/img/readme-img-fft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-fft.png -------------------------------------------------------------------------------- /docs/img/readme-img-maze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-maze.png -------------------------------------------------------------------------------- /docs/img/readme-img-menu-pong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-menu-pong.png -------------------------------------------------------------------------------- /docs/img/readme-img-single-player-pong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-single-player-pong.png -------------------------------------------------------------------------------- /docs/img/readme-img-square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-square.png -------------------------------------------------------------------------------- /docs/img/readme-img-terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/docs/img/readme-img-terminal.png -------------------------------------------------------------------------------- /examples/.npmignore: -------------------------------------------------------------------------------- 1 | .parcel-cache/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /examples/balls/balls-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/balls/balls-a.wasm -------------------------------------------------------------------------------- /examples/balls/balls-dbg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/balls/balls-dbg.wasm -------------------------------------------------------------------------------- /examples/balls/balls.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/balls/balls.wasm -------------------------------------------------------------------------------- /examples/balls/heart.cpp: -------------------------------------------------------------------------------- 1 | #include "canvas.h" 2 | 3 | void drawAsHeart(twrCanvas& canvas, short x, short y) { 4 | canvas.beginPath(); 5 | canvas.setFillStyleRGBA(0xFF0000FF); 6 | canvas.moveTo(x, y); 7 | canvas.bezierCurveTo(x, y-40+37, x-75+70, y-40+25, x-75+50, y-40+25); 8 | canvas.bezierCurveTo(x+20-75, y-40+25, x-75+20, y-40+62.5, x-75+20, y-40+62.5); 9 | canvas.bezierCurveTo(x+20-75, y-40+80, x-75+40, y-40+102, x-75+75, y-40+120); 10 | canvas.bezierCurveTo(x+110-75, y-40+102, x-75+130, y-40+80, x-75+130, y-40+62.5); 11 | canvas.bezierCurveTo(x+130-75, y-40+62.5, x-75+130, y-40+25, x-75+100, y-40+25); 12 | canvas.bezierCurveTo(x+10, y-40+25, x, y-40+37, x, y-40+40); 13 | canvas.fill(); 14 | } 15 | -------------------------------------------------------------------------------- /examples/balls/newop.cpp: -------------------------------------------------------------------------------- 1 | // new & delete operators are defined in libc++, which is not used in this example 2 | 3 | #include 4 | #include 5 | #include // twr_trap() 6 | 7 | void* operator new (size_t sz) 8 | { 9 | void *p; 10 | 11 | if (__builtin_expect (sz == 0, false)) 12 | sz = 1; 13 | 14 | if ((p = malloc (sz)) == 0) 15 | twr_trap(); 16 | 17 | return p; 18 | } 19 | 20 | void operator delete(void* ptr) noexcept 21 | { 22 | free(ptr); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /examples/balls/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/callc/callc-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/callc/callc-a.wasm -------------------------------------------------------------------------------- /examples/callc/callc.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/callc/callc.wasm -------------------------------------------------------------------------------- /examples/callc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/callc/test-file.txt: -------------------------------------------------------------------------------- 1 | Hello! I am a file with Text. -------------------------------------------------------------------------------- /examples/divcon/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # tested with mingw32-make using windows 3 | 4 | CC := clang 5 | 6 | # -nostdinc Disable standard #include directories, provided by twr-wasm 7 | # -nostdlib Disable standard c library, provided by twr-wasm 8 | TWRCFLAGS := --target=wasm32 -nostdinc -nostdlib -isystem ../../include 9 | 10 | # -O0 Optimization off 11 | # -O3 Optimization level 3 12 | # -Wall Warn all 13 | # -c compile w/o linking 14 | # -g for debug symbols (also good to use twrd.a -- debug twr.a lib -- and optimization off -- in this case) 15 | # -v verbose 16 | CFLAGS := -c -Wall -O3 $(TWRCFLAGS) 17 | CFLAGS_DEBUG := -c -Wall -g -O0 $(TWRCFLAGS) 18 | 19 | .PHONY: wasm 20 | 21 | wasm: divcon.wasm 22 | 23 | divcon.o: divcon.c 24 | $(CC) $(CFLAGS_DEBUG) $< -o $@ 25 | 26 | divcon.wasm: divcon.o 27 | wasm-ld divcon.o ../../lib-c/twrd.a -o divcon.wasm \ 28 | --no-entry --shared-memory --no-check-features --initial-memory=1048576 --max-memory=1048576 \ 29 | --export=demo_divcon 30 | 31 | clean: 32 | rm -f *.o 33 | rm -f *.wasm 34 | -------------------------------------------------------------------------------- /examples/divcon/divcon.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "twr-crt.h" 4 | 5 | void demo_divcon() { 6 | char inbuf[64]; 7 | char *r; 8 | int i; 9 | 10 | printf("Square Calculator\n\n"); 11 | 12 | while (1) { 13 | printf("Enter an integer: "); 14 | r=twr_mbgets(inbuf); // r is NULL if esc entered. Otherwise r == inbuf 15 | if (r) { 16 | i=atoi(inbuf); 17 | printf("%d squared is %d\n\n",i,i*i); 18 | } 19 | else { 20 | printf("\n"); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /examples/divcon/divcon.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/divcon/divcon.wasm -------------------------------------------------------------------------------- /examples/divcon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/fft/kiss_fft.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/fft/kiss_fft.wasm -------------------------------------------------------------------------------- /examples/fft/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "dependencies": { 6 | "twr-wasm": "^2.0.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/helloworld-b/helloworld.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void hello() { 4 | printf("hello world\n"); 5 | } -------------------------------------------------------------------------------- /examples/helloworld-b/helloworld.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/helloworld-b/helloworld.wasm -------------------------------------------------------------------------------- /examples/helloworld-b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/helloworld/helloworld.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void hello() { 4 | printf("hello world\n"); 5 | } -------------------------------------------------------------------------------- /examples/helloworld/helloworld.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/helloworld/helloworld.wasm -------------------------------------------------------------------------------- /examples/helloworld/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello World using WebAssembly 5 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 |
20 | 21 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/helloworld/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/lib/testex-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/lib/testex-a.wasm -------------------------------------------------------------------------------- /examples/lib/testex.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/lib/testex.wasm -------------------------------------------------------------------------------- /examples/lib/twr-ex.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // These functions are defined in twrlibex.ts 4 | __attribute__((import_name("ex_listen_key_events"))) void ex_listen_key_events(int event_id); 5 | __attribute__((import_name("ex_single_shot_timer"))) void ex_single_shot_timer(int ms, int event_id); 6 | __attribute__((import_name("ex_get_epoch"))) unsigned long ex_get_epoch(void); 7 | __attribute__((import_name("ex_append_two_strings"))) char* ex_append_two_strings(const char*s1, const char*s2); 8 | __attribute__((import_name("ex_sleep"))) void ex_sleep(int ms); 9 | __attribute__((import_name("return_a_float"))) float return_a_float(void); 10 | __attribute__((import_name("return_a_double"))) double return_a_double(void); 11 | __attribute__((import_name("return_a_int"))) int return_a_int(void); 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/maze/cyberman.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/maze/cyberman.bmp -------------------------------------------------------------------------------- /examples/maze/inarrow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/maze/inarrow.bmp -------------------------------------------------------------------------------- /examples/maze/maze-script.js: -------------------------------------------------------------------------------- 1 | // The Javascript side of my C maze program 2 | // My maze code was written along time ago in C for the Amiga, then ported some years later as a Windows screen saver. 3 | // Now, 20+ years later, running on the web! 4 | // 5 | // The C code is more or less untouched. I wrote a simple Win32 to twr-wasm 2D drawing APIs layer. 6 | // 7 | import { twrWasmModuleAsync } from "twr-wasm"; 8 | export async function mazeRunner() { 9 | const amod = new twrWasmModuleAsync(); 10 | await amod.loadWasm('maze.wasm'); 11 | //void CalcMaze(HWND hWnd, LONG cell_size, LONG is_black_bg, LONG isd - slow draw) 12 | await amod.callC(["CalcMaze", 0, 7, 0, 1]); 13 | await amod.callC(["SolveBegin"]); 14 | let timer = setInterval(async () => { 15 | let isdone = await amod.callC(["SolveStep", 0]); //SolveStep(hwnd)) 16 | if (isdone) 17 | clearInterval(timer); 18 | }, 50); 19 | } 20 | //# sourceMappingURL=maze-script.js.map -------------------------------------------------------------------------------- /examples/maze/maze-script.ts: -------------------------------------------------------------------------------- 1 | // The Javascript side of my C maze program 2 | // My maze code was written along time ago in C for the Amiga, then ported some years later as a Windows screen saver. 3 | // Now, 20+ years later, running on the web! 4 | // 5 | // The C code is more or less untouched. I wrote a simple Win32 to twr-wasm 2D drawing APIs layer. 6 | // 7 | 8 | import {twrWasmModuleAsync} from "twr-wasm"; 9 | 10 | export async function mazeRunner() { 11 | 12 | const amod=new twrWasmModuleAsync(); 13 | 14 | await amod.loadWasm('maze.wasm'); 15 | 16 | //void CalcMaze(HWND hWnd, LONG cell_size, LONG is_black_bg, LONG isd - slow draw) 17 | await amod.callC(["CalcMaze", 0, 7, 0, 1]); 18 | await amod.callC(["SolveBegin"]); 19 | 20 | let timer = setInterval(async ()=>{ 21 | let isdone=await amod.callC(["SolveStep", 0]); //SolveStep(hwnd)) 22 | if (isdone) clearInterval(timer); 23 | }, 50); 24 | } 25 | -------------------------------------------------------------------------------- /examples/maze/maze.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/maze/maze.wasm -------------------------------------------------------------------------------- /examples/maze/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "dependencies": { 6 | "twr-wasm": "^2.0.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/maze/stack.c: -------------------------------------------------------------------------------- 1 | #include "stack.h" 2 | 3 | /* 4 | * For all Stack routines, SP points to an empty entry that is 5 | * the next entry to use when pushing on to the stack. 6 | */ 7 | 8 | bool PushStack(struct Stack* stack, unsigned short x, unsigned short y) 9 | { 10 | if (stack->sp == MAX_STACKSIZE) 11 | return false; 12 | 13 | stack->x[stack->sp] = x; 14 | stack->y[stack->sp++] = y; 15 | return true; 16 | } 17 | 18 | 19 | bool PopStack(struct Stack* stack, unsigned short *x, unsigned short *y) 20 | { 21 | if (stack->sp == 0) 22 | return false; 23 | 24 | --stack->sp; 25 | 26 | *x = stack->x[stack->sp]; 27 | *y = stack->y[stack->sp]; 28 | return true; 29 | } 30 | 31 | void InitStack(struct Stack* stack) 32 | { 33 | stack->sp=0; 34 | } 35 | -------------------------------------------------------------------------------- /examples/maze/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef __STACK_H__ 2 | #define __STACK_H__ 3 | 4 | #include 5 | 6 | #define MAX_STACKSIZE 5000 7 | 8 | struct Stack { 9 | unsigned short sp; 10 | unsigned short x[MAX_STACKSIZE]; 11 | unsigned short y[MAX_STACKSIZE]; 12 | }; 13 | 14 | 15 | bool PushStack(struct Stack* stack, unsigned short x, unsigned short y); 16 | bool PopStack(struct Stack* stack, unsigned short *x, unsigned short *y); 17 | void InitStack(struct Stack* stack); 18 | 19 | #endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/multi-io/multi-io-mod.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/multi-io/multi-io-mod.wasm -------------------------------------------------------------------------------- /examples/multi-io/multi-io.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/multi-io/multi-io.wasm -------------------------------------------------------------------------------- /examples/multi-io/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twr-wasm-examples", 3 | "description": "The Examples for twr-wasm", 4 | "source": "index.html", 5 | "devDependencies": { 6 | "parcel": "latest" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/pong/entry-point-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/pong/entry-point-a.wasm -------------------------------------------------------------------------------- /examples/pong/entry-point.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/pong/entry-point.wasm -------------------------------------------------------------------------------- /examples/pong/extra.cpp: -------------------------------------------------------------------------------- 1 | #include "extra.h" 2 | #include 3 | #include 4 | 5 | #define M_PI 3.14159265358979323846 6 | 7 | float* generate_square_wave(double frequency, double duration, long sample_rate) { 8 | long length = (long)ceil(duration * sample_rate); 9 | float* wave = (float*)malloc(sizeof(float) * length); 10 | for (long i = 0; i < length; i++) { 11 | wave[i] = cos(2*M_PI*frequency*(i/(float)sample_rate)) > 0 ? 1 : -1; 12 | } 13 | return wave; 14 | } 15 | 16 | long load_square_wave(double frequency, double duration, long sample_rate) { 17 | float* wave = generate_square_wave(frequency, duration, sample_rate); 18 | long node_id = twr_audio_from_float_pcm(1, sample_rate, wave, (long)ceil(duration * sample_rate)); 19 | free(wave); 20 | return node_id; 21 | } -------------------------------------------------------------------------------- /examples/pong/extra.h: -------------------------------------------------------------------------------- 1 | #include "twr-audio.h" 2 | 3 | float* generate_square_wave(double frequency, double duration, long sample_rate); 4 | long load_square_wave(double frequency, double duration, long sample_rate); -------------------------------------------------------------------------------- /examples/pong/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from http import server # Python 3 3 | 4 | class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler): 5 | def end_headers(self): 6 | self.send_my_headers() 7 | server.SimpleHTTPRequestHandler.end_headers(self) 8 | 9 | def send_my_headers(self): 10 | self.send_header("Access-Control-Allow-Origin", "*") 11 | self.send_header("Cross-Origin-Embedder-Policy", "require-corp") 12 | self.send_header("Cross-Origin-Opener-Policy", "same-origin") 13 | # Turn off caching 14 | self.send_header("Cache-Control", "no-cache, no-store, must-revalidate") 15 | self.send_header("Pragma", "no-cache") 16 | self.send_header("Expires", "0") 17 | 18 | if __name__ == '__main__': 19 | server.test(HandlerClass=MyHTTPRequestHandler) 20 | 21 | -------------------------------------------------------------------------------- /examples/terminal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/terminal/terminal.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/terminal/terminal.wasm -------------------------------------------------------------------------------- /examples/tests-audio/Makefile: -------------------------------------------------------------------------------- 1 | CC := clang 2 | TWRCFLAGS := --target=wasm32 -nostdinc -nostdlib -isystem ../../include 3 | CPPLIB := ../twr-cpp 4 | CFLAGS := -c -Wall -O3 $(TWRCFLAGS) -I $(CPPLIB) 5 | CFLAGS_DEBUG := -c -Wall -g -O0 $(TWRCFLAGS) -I $(CPPLIB) 6 | 7 | $(info $(shell mkdir -p out)) 8 | 9 | .PHONY: default 10 | 11 | default: tests-audio.wasm tests-audio-a.wasm clearIODiv.js 12 | 13 | clearIODiv.js: index.html clearIODiv.ts 14 | tsc 15 | 16 | tests-audio.o: tests-audio.c 17 | $(CC) $(CFLAGS) $< -o $@ 18 | 19 | tests-audio-a.o: tests-audio.c 20 | $(CC) $(CFLAGS) $< -o $@ -DASYNC 21 | 22 | tests-audio.wasm: tests-audio.o 23 | wasm-ld tests-audio.o ../../lib-c/twr.a -o tests-audio.wasm \ 24 | --no-entry --initial-memory=4063232 --max-memory=4063232 \ 25 | 26 | tests-audio-a.wasm: tests-audio-a.o 27 | wasm-ld tests-audio-a.o ../../lib-c/twr.a -o tests-audio-a.wasm \ 28 | --no-entry --shared-memory --no-check-features --initial-memory=4063232 --max-memory=4063232 \ 29 | 30 | clean: 31 | rm -f *.o 32 | rm -f *.wasm 33 | rm -f out/* -------------------------------------------------------------------------------- /examples/tests-audio/clearIODiv.ts: -------------------------------------------------------------------------------- 1 | import {IWasmModule, IWasmModuleAsync, twrLibrary, keyEventToCodePoint, TLibImports, twrLibraryInstanceRegistry} from "twr-wasm" 2 | 3 | // Libraries use default export 4 | export default class clearIODivLib extends twrLibrary { 5 | id: number; 6 | 7 | imports:TLibImports = { 8 | clearIODiv: {}, 9 | }; 10 | 11 | // every library should have this line 12 | libSourcePath = new URL(import.meta.url).pathname; 13 | 14 | constructor() { 15 | // all library constructors should start with these two lines 16 | super(); 17 | this.id=twrLibraryInstanceRegistry.register(this); 18 | } 19 | 20 | clearIODiv(mod: IWasmModule|IWasmModuleAsync) { 21 | const ioDiv = document.getElementById("twr_iodiv"); 22 | if (!ioDiv) throw new Error("clearIODiv couldn't find twr_iodiv!"); 23 | 24 | ioDiv.innerText = ""; 25 | } 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/tests-audio/croud.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-audio/croud.mp3 -------------------------------------------------------------------------------- /examples/tests-audio/out/clearIODiv.d.ts: -------------------------------------------------------------------------------- 1 | import { IWasmModule, IWasmModuleAsync, twrLibrary, TLibImports } from "twr-wasm"; 2 | export default class clearIODivLib extends twrLibrary { 3 | id: number; 4 | imports: TLibImports; 5 | libSourcePath: string; 6 | constructor(); 7 | clearIODiv(mod: IWasmModule | IWasmModuleAsync): void; 8 | } 9 | //# sourceMappingURL=clearIODiv.d.ts.map -------------------------------------------------------------------------------- /examples/tests-audio/out/clearIODiv.js: -------------------------------------------------------------------------------- 1 | import { twrLibrary, twrLibraryInstanceRegistry } from "twr-wasm"; 2 | // Libraries use default export 3 | export default class clearIODivLib extends twrLibrary { 4 | id; 5 | imports = { 6 | clearIODiv: {}, 7 | }; 8 | // every library should have this line 9 | libSourcePath = new URL(import.meta.url).pathname; 10 | constructor() { 11 | // all library constructors should start with these two lines 12 | super(); 13 | this.id = twrLibraryInstanceRegistry.register(this); 14 | } 15 | clearIODiv(mod) { 16 | const ioDiv = document.getElementById("twr_iodiv"); 17 | if (!ioDiv) 18 | throw new Error("clearIODiv couldn't find twr_iodiv!"); 19 | ioDiv.innerText = ""; 20 | } 21 | } 22 | //# sourceMappingURL=clearIODiv.js.map -------------------------------------------------------------------------------- /examples/tests-audio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/tests-audio/ping.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-audio/ping.mp3 -------------------------------------------------------------------------------- /examples/tests-audio/tests-audio-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-audio/tests-audio-a.wasm -------------------------------------------------------------------------------- /examples/tests-audio/tests-audio.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-audio/tests-audio.wasm -------------------------------------------------------------------------------- /examples/tests-d2d/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/tests-d2d/test-img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-d2d/test-img.jpg -------------------------------------------------------------------------------- /examples/tests-d2d/tests-d2d-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-d2d/tests-d2d-a.wasm -------------------------------------------------------------------------------- /examples/tests-d2d/tests-d2d.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-d2d/tests-d2d.wasm -------------------------------------------------------------------------------- /examples/tests-libcxx/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libcxx WebAssembly Smoke tests 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 |
19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/tests-libcxx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/tests-libcxx/tests-libcxx.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-libcxx/tests-libcxx.wasm -------------------------------------------------------------------------------- /examples/tests-timer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.5.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/tests-timer/tests-timer-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-timer/tests-timer-a.wasm -------------------------------------------------------------------------------- /examples/tests-timer/tests-timer.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-timer/tests-timer.wasm -------------------------------------------------------------------------------- /examples/tests-user/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/tests-user/parsecmd.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | class parseCommand { 5 | public: 6 | parseCommand(const char* cmdLine); 7 | parseCommand(std::string& cmdLine) : parseCommand(cmdLine.c_str()) {}; 8 | 9 | bool isFlagSet(const char* flag); 10 | bool isFlagSet(std::string flag); 11 | std::string& getFlagValue(const char* flag); 12 | std::string trim(const std::string& str); 13 | std::string removeQuotes(const std::string& str); 14 | 15 | public: 16 | std::string m_cmd; 17 | std::string m_rest; 18 | std::vector m_options; 19 | private: 20 | std::string m_empty; 21 | std::map m_flags; 22 | }; 23 | -------------------------------------------------------------------------------- /examples/tests-user/terminal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "terminal.h" 4 | 5 | 6 | twrTerminal::twrTerminal() { 7 | m_io=twr_get_stdio_con(); 8 | assert(m_io->header.type&IO_TYPE_ADDRESSABLE_DISPLAY); 9 | //setlocale(LC_ALL, ""); // turn on UTF-8. 10 | } 11 | 12 | std::string& twrTerminal::getInputLine() { 13 | char buf[160]; 14 | 15 | io_mbgets(m_io, buf); 16 | m_lastInputLine=buf; 17 | return m_lastInputLine; 18 | } 19 | 20 | void twrTerminal::cls() { 21 | io_cls(m_io); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/tests-user/terminal.h: -------------------------------------------------------------------------------- 1 | #include "twr-io.h" 2 | #include 3 | 4 | 5 | class twrTerminal { 6 | public: 7 | twrTerminal(); 8 | 9 | std::string& getInputLine(void); 10 | void cls(void); 11 | 12 | private: 13 | twr_ioconsole_t* m_io; 14 | std::string m_lastInputLine; 15 | }; 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tests-user/tests-user.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests-user/tests-user.wasm -------------------------------------------------------------------------------- /examples/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "@parcel/resolver-default": { 3 | "packageExports": true 4 | }, 5 | "alias": { 6 | "twr-wasm": "../../lib-js/index.js" 7 | }, 8 | "dependencies": { 9 | "twr-wasm": "^2.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/tests/tests-dbg-a.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests/tests-dbg-a.wasm -------------------------------------------------------------------------------- /examples/tests/tests-dbg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests/tests-dbg.wasm -------------------------------------------------------------------------------- /examples/tests/tests.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twiddlingbits/twr-wasm/b804245cb85b69741dae3ed87ea163900ecc36f6/examples/tests/tests.wasm -------------------------------------------------------------------------------- /include/_stdtypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __TWR__STDTYPES_H__ 2 | #define __TWR__STDTYPES_H__ 3 | 4 | typedef unsigned long size_t; 5 | #define MAX_SIZE_T 2147483647 6 | 7 | #ifdef __cplusplus 8 | #define NULL __null 9 | #else 10 | #define NULL ((void*)0) 11 | #endif 12 | 13 | typedef struct __locale_t_struct * locale_t; 14 | 15 | #endif //__TWR__STDTYPES_H__ 16 | -------------------------------------------------------------------------------- /include/assert.h: -------------------------------------------------------------------------------- 1 | /** derived from mingw-w64 runtime package */ 2 | 3 | #undef assert 4 | 5 | #ifndef __ASSERT_H_ 6 | #define __ASSERT_H_ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | void _assert (const char *_Message, const char *_File, unsigned _Line); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif /* !defined (__ASSERT_H_) */ 19 | 20 | #ifdef NDEBUG 21 | #define assert(_Expression) ((void)0) 22 | #else /* !defined (NDEBUG) */ 23 | #define assert(_Expression) \ 24 | (void) \ 25 | ((!!(_Expression)) || \ 26 | (_assert(#_Expression,__FILE__,__LINE__),0)) 27 | #endif /* !defined (NDEBUG) */ 28 | 29 | -------------------------------------------------------------------------------- /include/c++/v1/__atomic/is_always_lock_free.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H 10 | #define _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct __libcpp_is_always_lock_free { 22 | // __atomic_always_lock_free is available in all Standard modes 23 | static const bool __value = __atomic_always_lock_free(sizeof(_Tp), 0); 24 | }; 25 | 26 | _LIBCPP_END_NAMESPACE_STD 27 | 28 | #endif // _LIBCPP___ATOMIC_IS_ALWAYS_LOCK_FREE_H 29 | -------------------------------------------------------------------------------- /include/c++/v1/__atomic/kill_dependency.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___ATOMIC_KILL_DEPENDENCY_H 10 | #define _LIBCPP___ATOMIC_KILL_DEPENDENCY_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | _LIBCPP_HIDE_FROM_ABI 22 | _Tp kill_dependency(_Tp __y) _NOEXCEPT 23 | { 24 | return __y; 25 | } 26 | 27 | _LIBCPP_END_NAMESPACE_STD 28 | 29 | #endif // _LIBCPP___ATOMIC_KILL_DEPENDENCY_H 30 | -------------------------------------------------------------------------------- /include/c++/v1/__charconv/to_chars.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___CHARCONV_TO_CHARS 11 | #define _LIBCPP___CHARCONV_TO_CHARS 12 | 13 | #include <__charconv/to_chars_floating_point.h> 14 | #include <__charconv/to_chars_integral.h> 15 | #include <__config> 16 | 17 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 18 | # pragma GCC system_header 19 | #endif 20 | 21 | _LIBCPP_BEGIN_NAMESPACE_STD 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___CHARCONV_TO_CHARS 26 | -------------------------------------------------------------------------------- /include/c++/v1/__concepts/destructible.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___CONCEPTS_DESTRUCTIBLE_H 10 | #define _LIBCPP___CONCEPTS_DESTRUCTIBLE_H 11 | 12 | #include <__config> 13 | #include <__type_traits/is_nothrow_destructible.h> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | #if _LIBCPP_STD_VER >= 20 22 | 23 | // [concept.destructible] 24 | 25 | template 26 | concept destructible = is_nothrow_destructible_v<_Tp>; 27 | 28 | #endif // _LIBCPP_STD_VER >= 20 29 | 30 | _LIBCPP_END_NAMESPACE_STD 31 | 32 | #endif // _LIBCPP___CONCEPTS_DESTRUCTIBLE_H 33 | -------------------------------------------------------------------------------- /include/c++/v1/__concepts/regular.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___CONCEPTS_REGULAR_H 10 | #define _LIBCPP___CONCEPTS_REGULAR_H 11 | 12 | #include <__concepts/equality_comparable.h> 13 | #include <__concepts/semiregular.h> 14 | #include <__config> 15 | 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17 | # pragma GCC system_header 18 | #endif 19 | 20 | _LIBCPP_BEGIN_NAMESPACE_STD 21 | 22 | #if _LIBCPP_STD_VER >= 20 23 | 24 | // [concept.object] 25 | 26 | template 27 | concept regular = semiregular<_Tp> && equality_comparable<_Tp>; 28 | 29 | #endif // _LIBCPP_STD_VER >= 20 30 | 31 | _LIBCPP_END_NAMESPACE_STD 32 | 33 | #endif // _LIBCPP___CONCEPTS_REGULAR_H 34 | -------------------------------------------------------------------------------- /include/c++/v1/__concepts/semiregular.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___CONCEPTS_SEMIREGULAR_H 10 | #define _LIBCPP___CONCEPTS_SEMIREGULAR_H 11 | 12 | #include <__concepts/constructible.h> 13 | #include <__concepts/copyable.h> 14 | #include <__config> 15 | 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17 | # pragma GCC system_header 18 | #endif 19 | 20 | _LIBCPP_BEGIN_NAMESPACE_STD 21 | 22 | #if _LIBCPP_STD_VER >= 20 23 | 24 | // [concept.object] 25 | 26 | template 27 | concept semiregular = copyable<_Tp> && default_initializable<_Tp>; 28 | 29 | #endif // _LIBCPP_STD_VER >= 20 30 | 31 | _LIBCPP_END_NAMESPACE_STD 32 | 33 | #endif // _LIBCPP___CONCEPTS_SEMIREGULAR_H 34 | -------------------------------------------------------------------------------- /include/c++/v1/__exception/terminate.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___EXCEPTION_TERMINATE_H 10 | #define _LIBCPP___EXCEPTION_TERMINATE_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | namespace std { // purposefully not using versioning namespace 19 | _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void terminate() _NOEXCEPT; 20 | } // namespace std 21 | 22 | #endif // _LIBCPP___EXCEPTION_TERMINATE_H 23 | -------------------------------------------------------------------------------- /include/c++/v1/__expected/unexpect.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | #ifndef _LIBCPP___EXPECTED_UNEXPECT_H 10 | #define _LIBCPP___EXPECTED_UNEXPECT_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | #if _LIBCPP_STD_VER >= 23 19 | 20 | _LIBCPP_BEGIN_NAMESPACE_STD 21 | 22 | struct unexpect_t { 23 | explicit unexpect_t() = default; 24 | }; 25 | 26 | inline constexpr unexpect_t unexpect{}; 27 | 28 | _LIBCPP_END_NAMESPACE_STD 29 | 30 | #endif // _LIBCPP_STD_VER >= 23 31 | 32 | #endif // _LIBCPP___EXPECTED_UNEXPECT_H 33 | -------------------------------------------------------------------------------- /include/c++/v1/__fwd/array.h: -------------------------------------------------------------------------------- 1 | //===---------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===---------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___FWD_ARRAY_H 10 | #define _LIBCPP___FWD_ARRAY_H 11 | 12 | #include <__config> 13 | #include 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | template 22 | struct _LIBCPP_TEMPLATE_VIS array; 23 | 24 | _LIBCPP_END_NAMESPACE_STD 25 | 26 | #endif // _LIBCPP___FWD_ARRAY_H 27 | -------------------------------------------------------------------------------- /include/c++/v1/__fwd/hash.h: -------------------------------------------------------------------------------- 1 | //===---------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===---------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___FWD_HASH_H 10 | #define _LIBCPP___FWD_HASH_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS hash; 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___FWD_HASH_H 26 | -------------------------------------------------------------------------------- /include/c++/v1/__fwd/memory_resource.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___FWD_MEMORY_RESOURCE_H 10 | #define _LIBCPP___FWD_MEMORY_RESOURCE_H 11 | 12 | #include <__availability> 13 | #include <__config> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | namespace pmr { 22 | template 23 | class _LIBCPP_AVAILABILITY_PMR _LIBCPP_TEMPLATE_VIS polymorphic_allocator; 24 | } // namespace pmr 25 | 26 | _LIBCPP_END_NAMESPACE_STD 27 | 28 | #endif // _LIBCPP___FWD_MEMORY_RESOURCE_H 29 | -------------------------------------------------------------------------------- /include/c++/v1/__fwd/pair.h: -------------------------------------------------------------------------------- 1 | //===---------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===---------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___FWD_PAIR_H 10 | #define _LIBCPP___FWD_PAIR_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS pair; 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___FWD_PAIR_H 26 | -------------------------------------------------------------------------------- /include/c++/v1/__fwd/tuple.h: -------------------------------------------------------------------------------- 1 | //===---------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===---------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___FWD_TUPLE_H 10 | #define _LIBCPP___FWD_TUPLE_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | #ifndef _LIBCPP_CXX03_LANG 21 | 22 | template 23 | class _LIBCPP_TEMPLATE_VIS tuple; 24 | 25 | #endif // _LIBCPP_CXX03_LANG 26 | 27 | _LIBCPP_END_NAMESPACE_STD 28 | 29 | #endif // _LIBCPP___FWD_TUPLE_H 30 | -------------------------------------------------------------------------------- /include/c++/v1/__iterator/default_sentinel.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H 11 | #define _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H 12 | 13 | #include <__config> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | #if _LIBCPP_STD_VER >= 20 22 | 23 | struct default_sentinel_t { }; 24 | inline constexpr default_sentinel_t default_sentinel{}; 25 | 26 | #endif // _LIBCPP_STD_VER >= 20 27 | 28 | _LIBCPP_END_NAMESPACE_STD 29 | 30 | #endif // _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H 31 | -------------------------------------------------------------------------------- /include/c++/v1/__memory/align.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___MEMORY_ALIGN_H 10 | #define _LIBCPP___MEMORY_ALIGN_H 11 | 12 | #include <__config> 13 | #include 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | _LIBCPP_EXPORTED_FROM_ABI void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space); 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___MEMORY_ALIGN_H 26 | -------------------------------------------------------------------------------- /include/c++/v1/__pstl_algorithm: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef __PSTL_ALGORITHM 11 | #define __PSTL_ALGORITHM 12 | 13 | #include 14 | 15 | #endif /* __PSTL_ALGORITHM */ 16 | -------------------------------------------------------------------------------- /include/c++/v1/__pstl_memory: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef __PSTL_MEMORY 11 | #define __PSTL_MEMORY 12 | 13 | #include 14 | 15 | #endif /* __PSTL_MEMORY */ 16 | -------------------------------------------------------------------------------- /include/c++/v1/__pstl_numeric: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef __PSTL_NUMERIC 11 | #define __PSTL_NUMERIC 12 | 13 | #include 14 | 15 | #endif /* __PSTL_NUMERIC */ 16 | -------------------------------------------------------------------------------- /include/c++/v1/__random/default_random_engine.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H 10 | #define _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H 11 | 12 | #include <__config> 13 | #include <__random/linear_congruential_engine.h> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | typedef minstd_rand default_random_engine; 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H 26 | -------------------------------------------------------------------------------- /include/c++/v1/__random/knuth_b.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___RANDOM_KNUTH_B_H 10 | #define _LIBCPP___RANDOM_KNUTH_B_H 11 | 12 | #include <__config> 13 | #include <__random/linear_congruential_engine.h> 14 | #include <__random/shuffle_order_engine.h> 15 | 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17 | # pragma GCC system_header 18 | #endif 19 | 20 | _LIBCPP_BEGIN_NAMESPACE_STD 21 | 22 | typedef shuffle_order_engine knuth_b; 23 | 24 | _LIBCPP_END_NAMESPACE_STD 25 | 26 | #endif // _LIBCPP___RANDOM_KNUTH_B_H 27 | -------------------------------------------------------------------------------- /include/c++/v1/__ranges/from_range.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___RANGES_FROM_RANGE_H 11 | #define _LIBCPP___RANGES_FROM_RANGE_H 12 | 13 | #include <__config> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | #if _LIBCPP_STD_VER >= 23 22 | 23 | struct from_range_t { 24 | explicit from_range_t() = default; 25 | }; 26 | 27 | inline constexpr from_range_t from_range{}; 28 | 29 | #endif // _LIBCPP_STD_VER >= 23 30 | 31 | _LIBCPP_END_NAMESPACE_STD 32 | 33 | #endif // _LIBCPP___RANGES_FROM_RANGE_H 34 | -------------------------------------------------------------------------------- /include/c++/v1/__ranges/views.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___RANGES_VIEWS 11 | #define _LIBCPP___RANGES_VIEWS 12 | 13 | #include <__config> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | #if _LIBCPP_STD_VER >= 20 22 | 23 | namespace ranges { 24 | 25 | namespace views { } 26 | 27 | } // namespace ranges 28 | 29 | namespace views = ranges::views; 30 | 31 | #endif // _LIBCPP_STD_VER >= 20 32 | 33 | _LIBCPP_END_NAMESPACE_STD 34 | 35 | #endif // _LIBCPP___RANGES_VIEWS 36 | -------------------------------------------------------------------------------- /include/c++/v1/__std_mbstate_t.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___STD_MBSTATE_T_H 11 | #define _LIBCPP___STD_MBSTATE_T_H 12 | 13 | #include <__config> 14 | #include <__mbstate_t.h> 15 | 16 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17 | # pragma GCC system_header 18 | #endif 19 | 20 | // The goal of this header is to provide std::mbstate_t without requiring all 21 | // of or . 22 | 23 | _LIBCPP_BEGIN_NAMESPACE_STD 24 | 25 | using ::mbstate_t _LIBCPP_USING_IF_EXISTS; 26 | 27 | _LIBCPP_END_NAMESPACE_STD 28 | 29 | #endif // _LIBCPP___STD_MBSTATE_T_H 30 | -------------------------------------------------------------------------------- /include/c++/v1/__support/fuchsia/xlocale.h: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | //===-----------------------------------------------------------------------===// 3 | // 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 | // See https://llvm.org/LICENSE.txt for license information. 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 | // 8 | //===----------------------------------------------------------------------===// 9 | 10 | #ifndef _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H 11 | #define _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H 12 | 13 | #if defined(__Fuchsia__) 14 | 15 | #include 16 | #include 17 | #include <__support/xlocale/__posix_l_fallback.h> 18 | #include <__support/xlocale/__strtonum_fallback.h> 19 | 20 | #endif // defined(__Fuchsia__) 21 | 22 | #endif // _LIBCPP___SUPPORT_FUCHSIA_XLOCALE_H 23 | -------------------------------------------------------------------------------- /include/c++/v1/__support/newlib/xlocale.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___SUPPORT_NEWLIB_XLOCALE_H 10 | #define _LIBCPP___SUPPORT_NEWLIB_XLOCALE_H 11 | 12 | #if defined(_NEWLIB_VERSION) 13 | 14 | #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \ 15 | __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5 16 | #include <__support/xlocale/__nop_locale_mgmt.h> 17 | #include <__support/xlocale/__posix_l_fallback.h> 18 | #include <__support/xlocale/__strtonum_fallback.h> 19 | #endif 20 | 21 | #endif // _NEWLIB_VERSION 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/c++/v1/__tuple/tuple_types.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TUPLE_TUPLE_TYPES_H 10 | #define _LIBCPP___TUPLE_TUPLE_TYPES_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template struct __tuple_types {}; 21 | 22 | _LIBCPP_END_NAMESPACE_STD 23 | 24 | #endif // _LIBCPP___TUPLE_TUPLE_TYPES_H 25 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/add_const.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_ADD_CONST_H 10 | #define _LIBCPP___TYPE_TRAITS_ADD_CONST_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS add_const { 22 | typedef _LIBCPP_NODEBUG const _Tp type; 23 | }; 24 | 25 | #if _LIBCPP_STD_VER >= 14 26 | template 27 | using add_const_t = typename add_const<_Tp>::type; 28 | #endif 29 | 30 | _LIBCPP_END_NAMESPACE_STD 31 | 32 | #endif // _LIBCPP___TYPE_TRAITS_ADD_CONST_H 33 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/add_cv.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_ADD_CV_H 10 | #define _LIBCPP___TYPE_TRAITS_ADD_CV_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS add_cv { 22 | typedef _LIBCPP_NODEBUG const volatile _Tp type; 23 | }; 24 | 25 | #if _LIBCPP_STD_VER >= 14 26 | template 27 | using add_cv_t = typename add_cv<_Tp>::type; 28 | #endif 29 | 30 | _LIBCPP_END_NAMESPACE_STD 31 | 32 | #endif // _LIBCPP___TYPE_TRAITS_ADD_CV_H 33 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/add_volatile.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H 10 | #define _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS add_volatile { 22 | typedef _LIBCPP_NODEBUG volatile _Tp type; 23 | }; 24 | 25 | #if _LIBCPP_STD_VER >= 14 26 | template 27 | using add_volatile_t = typename add_volatile<_Tp>::type; 28 | #endif 29 | 30 | _LIBCPP_END_NAMESPACE_STD 31 | 32 | #endif // _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H 33 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/dependent_type.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H 10 | #define _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template 21 | struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {}; 22 | 23 | _LIBCPP_END_NAMESPACE_STD 24 | 25 | #endif // _LIBCPP___TYPE_TRAITS_DEPENDENT_TYPE_H 26 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/is_char_like_type.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H 10 | #define _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H 11 | 12 | #include <__config> 13 | #include <__type_traits/conjunction.h> 14 | #include <__type_traits/is_standard_layout.h> 15 | #include <__type_traits/is_trivial.h> 16 | 17 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 18 | # pragma GCC system_header 19 | #endif 20 | 21 | _LIBCPP_BEGIN_NAMESPACE_STD 22 | 23 | template 24 | using _IsCharLikeType = _And, is_trivial<_CharT> >; 25 | 26 | _LIBCPP_END_NAMESPACE_STD 27 | 28 | #endif // _LIBCPP___TYPE_TRAITS_IS_CHAR_LIKE_TYPE_H 29 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/is_pod.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_IS_POD_H 10 | #define _LIBCPP___TYPE_TRAITS_IS_POD_H 11 | 12 | #include <__config> 13 | #include <__type_traits/integral_constant.h> 14 | 15 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 16 | # pragma GCC system_header 17 | #endif 18 | 19 | _LIBCPP_BEGIN_NAMESPACE_STD 20 | 21 | template 22 | struct _LIBCPP_TEMPLATE_VIS is_pod : public integral_constant {}; 23 | 24 | #if _LIBCPP_STD_VER >= 17 25 | template 26 | inline constexpr bool is_pod_v = __is_pod(_Tp); 27 | #endif 28 | 29 | _LIBCPP_END_NAMESPACE_STD 30 | 31 | #endif // _LIBCPP___TYPE_TRAITS_IS_POD_H 32 | -------------------------------------------------------------------------------- /include/c++/v1/__type_traits/lazy.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | // See https://llvm.org/LICENSE.txt for license information. 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef _LIBCPP___TYPE_TRAITS_LAZY_H 10 | #define _LIBCPP___TYPE_TRAITS_LAZY_H 11 | 12 | #include <__config> 13 | 14 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 15 | # pragma GCC system_header 16 | #endif 17 | 18 | _LIBCPP_BEGIN_NAMESPACE_STD 19 | 20 | template