#emscripten

GripNewsGripNews
2025-06-07

🌕 網路開發者的自虐指南
➤ 從 C 程式碼到網頁應用程式:一場充滿挑戰的旅程
sebastiano.tronto.net/blog/202
本文探討了將 C/C++ 程式碼轉換為可在網頁瀏覽器中運行的 WebAssembly 的過程。作者分享了將一個 Rubik’s cube 最佳解算器轉為網頁應用程式的經驗,並詳細說明瞭設定環境、編譯程式碼、處理多線程、以及如何與 JavaScript 和 HTML 整合。文章坦承此過程複雜且令人沮喪,但最終成功並帶來了寶貴的學習經驗。這篇文章更適合有 C/C++ 基礎,想將程式移植到網路的開發者,而非尋找標準網路開發教學的初學者。
+ 這篇文章很誠實地描述了 WebAssembly 開發的困難,讓我對這個技術有更深入的瞭解。
+ 雖然過程聽起來很複雜,但如果能將現有的 C++ 程式碼移植到網路上,將會非常方便。
++

2025-06-02

seems I somehow got #MicroHs #Haskell interpreter compiled and working in a browser using #Emscripten #WebDev

used a require.js I found online (from Tarp pixelsvsbytes.com/2013/02/js-r ) and slighly patched for my use case / url layout, and some minimal #NodeModules folder (npm install --save path) with custom symlinks inside to choose the browser js.

the HTML from Emscripten is patched lightly to add the require script and a couple of require() calls. the standard library is included with preload file; the total size of the served folder is about 3.5MB.

the usability is terrible (have to enter input in a modal form with no history or completion etc, output goes to browser console) but it's a start!

desktop screenshot of firefox open at localhost : 8080 / mhs.html

there is a large Input: modal dialog, behind which is a default Emscripten HTML page.

mhs welcome banner is visible in the emscripten text area, but subsequent input and output is only echoed in the browser developer tools console, visible at the bottom, where you can see "hello world" and factorials from 1 to 10.
2025-05-03

I released an Emscripten port of Dawn, which is an open-source and cross-platform implementation of the WebGPU standard.

github.com/pongasoft/emscripte

#WebGPU #Emscripten #wasm #WebAssembly #cpp

st1nger :unverified: 🏴‍☠️ :linux: :freebsd:st1nger@infosec.exchange
2025-04-21

Proof-of-concept project, showing that it's possible to run an entire Large Language Model in nothing but a #PDF file.

It uses #Emscripten to compile #llama.cpp into asm.js, which can then be run in the PDF using an old PDF JS injection.

Combined with embedding the entire #LLM file into the PDF with base64, we are able to run LLM inference in nothing but a PDF

github.com/EvanZhouDev/llm.pdf

2025-04-06

Запуск Linux внутри PDF

По мнению некоторых пользователей, PDF — простой формат для обмена документами. На самом деле это очень сложный стандарт, который поддерживает выполнение практически любого кода. Неудивительно, что в прошлые годы энтузиастам удалось успешно запустить Doom внутри PDF и провести ряд других интересных экспериментов. Оказалось, что на этом возможности движка по рендерингу PDF не ограничиваются. Он способен запустить даже эмулятор полноценного процессора, а в нём — целую операционную систему .

habr.com/ru/companies/globalsi

#PDF #Linux #RISCV #LinuxPDF #Doom #DoomPDF #TinyEMU #Emscripten #asmjs #JSLinux #pdfsyntax

2025-03-23

I've ported Empty Clip, a 2D role-playing shooter #game from 2006, for the web with #Emscripten. Needs WebGL2!

midzer.de/wasm/emptyclip/

Jun Nergahak 🌺🌺🌺nergahak
2025-03-09

Boxedwine - Emulator that can run 32-bit Windows programs/games on multiple platforms via Wine.
github.com/danoon2/Boxedwine

2025-03-07

My latest contribution to the Emscripten project is now live with 4.0.4: a contrib port to easily embed Lua in any project

emscripten.org/docs/compiling/

#Lua #Emscripten #cpp #wasm #webassembly

A screenshot showing an example usage of Lua with Emscripten
2025-02-09

Released emscripten-glfw 3.4.0.20250209:

* Added support for touch (mobile)
* Added support for wasm64 (-sMEMORY64 Emscripten option)

github.com/pongasoft/emscripte

#wasm #wasm64 #GLFW #Emscripten

卡拉今天看了什麼ai_workspace@social.mikala.one
2025-02-02

GitHub - ading2210/linuxpdf: Linux running inside a PDF file via a RISC-V emulator

Link
📌 Summary: 本文介紹了一個名為 LinuxPDF 的專案,該專案使得 Linux 系統可以在 PDF 檔案內透過 RISC-V 模擬器運行。此技術運用到 PDF 檔案格式中所支持的 Javascript,並透過 Emscripten 將 C 程式碼編譯成 asm.js,進一步載入修改過的 TinyEMU 模擬器。雖然在 PDF 中運行 Linux 存在性能問題,但這一創新仍能展示 PDF 檔案的多元性及其潛力。

🎯 Key Points:
- LinuxPDF 專案能讓 Linux 在 PDF 內運行,基於 RISC-V 模擬器。
- PDF 格式支持 Javascript,但瀏覽器的 API 限制了其功能。
- 提供了 32 位和 64 位的根檔案系統,默認使用 32 位版本。
- RISC-V 模擬器運行速度較慢,Linux 核心啟動時間約需 30-60 秒。
- 使用者可透過克隆專案並運行指定指令來建置系統。

🔖 Keywords: #Linux #PDF #RISC-V #Emscripten #TinyEMU

Thomas Steiner :chrome:tomayac@toot.cafe
2025-01-31

📢 Scaling multithreaded #WebAssembly applications with mimalloc and WasmFS, by @kripken:
web.dev/articles/scaling-multi. If you have a multithreaded #Wasm application that does lots of allocations or uses files, then you may benefit greatly by using WasmFS and/or mimalloc. Usage in #Emscripten:

```bash
emcc -sWASMFS -sMALLOC=mimalloc
```

2025-01-16

I've ported Atomiks, remake of a classic puzzle game from 1990, for the web with #Emscripten. Even mobile friendly!

midzer.de/wasm/atomiks/

Thomas Steiner :chrome:tomayac@toot.cafe
2025-01-15

A port of Doom (1993) that runs inside a PDF file
github.com/ading2210/doompdf. Made possible through asm.js and #Emscripten. 🤯

2025-01-06

I have a new #programming playground: #WASM with #Emscripten
emscripten.org/

I explored this platform some time ago, but had no practical use for it.

But #HTML5 #canvas elements can act as a "screen" for stuff generated or managed in c or #cpp.
Posting user events to a "native" WASM worker and posting back images to the browser's thread makes the browser a virtual machine for classic C programs.

It's not very performant, but sufficient.
And it's pure fun to see that it just works 😁

2024-12-29

I've ported Simple Sokoban for the web with #Emscripten. Mobile friendly!

midzer.de/wasm/sokoban/

2024-12-29

I've ported Starfighter, a side-scrolling shoot 'em up space game for the web with #Emscripten. Even (somewhat) playable on mobile!

midzer.de/wasm/starfighter/

2024-12-29

I maintain the #Emscripten port of Brogue, a minimal roguelike game, now.

midzer.de/wasm/brogue/

2024-12-26

I've ported Powermanga, an oldschool shoot 'em up, for the web via #Emscripten. Works also on mobile!

midzer.de/wasm/powermanga/

2024-12-26

I've ported Help Hannah's Horse, a Pacman clone with ghosts, music and powerups for the web with #Emscripten. Even mobile friendly!

midzer.de/wasm/hannah/

I've been experimenting with emscripten lately, so I created a skeleton cmake project that prepares emsdk and use it to compile C code instead of using a C compiler #cmake #emscripten #webassembly github.com/pvmm/skeleton-emsdk

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst