home.social

#emscripten — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #emscripten, aggregated by home.social.

fetched live
  1. #AskFedi #c99 #gcc #raylib #emscripten

    i'm making a raylib game that needs to detect whether it's the desktop build (gcc) or the web build (emscripten) in c99 code. can i use some some compiler flags or config in order to define some macro or to hardcode main function args or something of the sort?

    this way i can connect the web build to the kongregate api and not do so (maybe not even include libcurl if it's a macro definition) on the desktop build. is this possible?

    thanks ilyyy <3

  2. #AskFedi #c99 #gcc #raylib #emscripten

    i'm making a raylib game that needs to detect whether it's the desktop build (gcc) or the web build (emscripten) in c99 code. can i use some some compiler flags or config in order to define some macro or to hardcode main function args or something of the sort?

    this way i can connect the web build to the kongregate api and not do so (maybe not even include libcurl if it's a macro definition) on the desktop build. is this possible?

    thanks ilyyy <3

  3. Look, ma, I'm in the #Emscripten release notes: github.com/emscripten-core/ems. New experimental `-sCROSS_ORIGIN_STORAGE` linker flag integrating the proposed Cross-Origin Storage browser API
    (github.com/WICG/cross-origin-s) as a progressive enhancement for #Wasm loading on the Web target: emscripten.org/docs/compiling/.

  4. Look, ma, I'm in the #Emscripten release notes: github.com/emscripten-core/ems. New experimental `-sCROSS_ORIGIN_STORAGE` linker flag integrating the proposed Cross-Origin Storage browser API
    (github.com/WICG/cross-origin-s) as a progressive enhancement for #Wasm loading on the Web target: emscripten.org/docs/compiling/.

  5. Как я портировал ретрошутер Redneck Rampage в браузер

    Всем привет! Я решил наконец то сам сделать пост на хабре. Обычно о всех моих веб проектах и команды DosZone Team пишет здесь многоуважаемый @denis-19 , за что ему огромное спасибо! Ведь нам просто лень или не хватает на это времени. И так! После шутера Blood мне было интересно попробовать также портировать Redneck Rampage как раз на основе того, что я уже сделал. Было ошибочно так думать, потому что RR в отличие от NBlood оказался совершенно на другом движке - RedNukem, и пришлось начинать всё с нуля. Да и сложность повысилась и всё это заняло в два раза больше времени, чуть больше недели.

    habr.com/ru/articles/1042108/

    #портирование #emscripten #ретроигры #redneck_rampage

  6. Oh, look! Another attempt to solve the monumental crisis of handling tarballs—this time with #WebAssembly and a sprinkle of #Emscripten magic. 🙄 Instead of just extracting a file like a normal person, let's generate an "index" to mount things because who doesn't love an overengineered solution to save a few bytes? 😂
    jeroen.github.io/notes/webasse #tarballs #overengineering #techhumor #HackerNews #ngated

  7. Oh, look! Another attempt to solve the monumental crisis of handling tarballs—this time with #WebAssembly and a sprinkle of #Emscripten magic. 🙄 Instead of just extracting a file like a normal person, let's generate an "index" to mount things because who doesn't love an overengineered solution to save a few bytes? 😂
    jeroen.github.io/notes/webasse #tarballs #overengineering #techhumor #HackerNews #ngated

  8. Just posted a new devlog for our C-based web engine, Archimedes!

    It's been a long road from Pygame to a custom C/Emscripten stack. I'm breaking down the architectural hurdles of moving away from our Daedalus library and how my collaborator @smattymatty has been stress-testing the engine with a vampire survivors clone and recent game jams.

    To celebrate the progress, I've rewritten my old ( and very broken ) Game of Life simulator from the ground up. It's a great feeling to see a legacy project running smoother than ever on new, custom-built foundations.

    Check out the devlog: jake-ster.itch.io/game-of-life

    #GameDev #WebAssembly #C #IndieDev #Emscripten #Archimedes #GameOfLife

  9. Just posted a new devlog for our C-based web engine, Archimedes!

    It's been a long road from Pygame to a custom C/Emscripten stack. I'm breaking down the architectural hurdles of moving away from our Daedalus library and how my collaborator @smattymatty has been stress-testing the engine with a vampire survivors clone and recent game jams.

    To celebrate the progress, I've rewritten my old ( and very broken ) Game of Life simulator from the ground up. It's a great feeling to see a legacy project running smoother than ever on new, custom-built foundations.

    Check out the devlog: jake-ster.itch.io/game-of-life

  10. Long shot, but is there anyone here who has used SDL3 and Emscripten or is familiar with building Emscripten from source?

    I had to get SDL3_TTF from a PR, and managed to build it with embuilder but so far when I try to build with -sUSE_SDL_TTF=3 it doesn't seem to acknowledge the option and if just complaining that it can't find SDL3/SDL_ttf.h

    What am I missing?

    (also if you don't know, sharing is caring)

    #sdl #sdl3 #emscripten #c #gamedev #programming

  11. Long shot, but is there anyone here who has used SDL3 and Emscripten or is familiar with building Emscripten from source?

    I had to get SDL3_TTF from a PR, and managed to build it with embuilder but so far when I try to build with -sUSE_SDL_TTF=3 it doesn't seem to acknowledge the option and if just complaining that it can't find SDL3/SDL_ttf.h

    What am I missing?

    (also if you don't know, sharing is caring)

    #sdl #sdl3 #emscripten #c #gamedev #programming

  12. emsdk-env makes public.

    This is a Vite plugin that automatically downloads and manages the Emscripten SDK, and makes it possible to automatically build WASM C/C++ code in your project.

    With this plugin, you can easily set up a WASM C/C++ development environment in your Vite project.

    github.com/kekyo/emsdk-env

    #emscripten #npm #wasm #vite

  13. emsdk-env makes public.

    This is a Vite plugin that automatically downloads and manages the Emscripten SDK, and makes it possible to automatically build WASM C/C++ code in your project.

    With this plugin, you can easily set up a WASM C/C++ development environment in your Vite project.

    github.com/kekyo/emsdk-env

    #emscripten #npm #wasm #vite

  14. Git в браузере. Расширяем возможности с помощью LFS

    Привет, Хабр! Я Паша, разработчик

    habr.com/ru/companies/gram_ax/

    #git #libgit2 #lfs #webassembly #rust #ffi #emscripten #docsascode #opensource #localfirst

  15. I recently gave a makeover to the project page for the first video game I ever made: fietkau.media/revelation_mentis

    The game itself is a small adventure/exploration game for DOS. It's not much to look at. But I touched up the game itself and the web-based player to make it a lot more approachable:

    - Full English translation
    - Nicer menu navigation
    - Touch controls on mobile! 🤯
    - A cute little optional CRT filter
    - Updated #DOSBox and #emscripten, it no longer hangs the page on load for a second

  16. I recently gave a makeover to the project page for the first video game I ever made: fietkau.media/revelation_mentis

    The game itself is a small adventure/exploration game for DOS. It's not much to look at. But I touched up the game itself and the web-based player to make it a lot more approachable:

    - Full English translation
    - Nicer menu navigation
    - Touch controls on mobile! 🤯
    - A cute little optional CRT filter
    - Updated #DOSBox and #emscripten, it no longer hangs the page on load for a second

  17. I tried pulling the procedure to change the main engine loop out of WASM's control (codeberg.org/indigoparadox/mau) but #numoon is still, like... skipping every other tick? Or something? Every other in-game script instruction seems to be ignored? And mobile animation isn't happening? Almost like it's just not showing those frames?

    But only in #WASM with #emscripten! The #SDL code on native Linux works perfectly!

    *Extremely* frustrating...

  18. I tried pulling the procedure to change the main engine loop out of WASM's control (codeberg.org/indigoparadox/mau) but #numoon is still, like... skipping every other tick? Or something? Every other in-game script instruction seems to be ignored? And mobile animation isn't happening? Almost like it's just not showing those frames?

    But only in #WASM with #emscripten! The #SDL code on native Linux works perfectly!

    *Extremely* frustrating...

  19. When your event agency gets the briefing wrong and you need to invent a new technology to save the message… You knew css-in-js, but now 📢 introducing CSS in C++, aka. css-in-cpp, compiled to #WebAssembly with #emscripten. (At Google I/O Connect in Bengaluru, India.)

  20. When your event agency gets the briefing wrong and you need to invent a new technology to save the message… You knew css-in-js, but now 📢 introducing CSS in C++, aka. css-in-cpp, compiled to #WebAssembly with #emscripten. (At Google I/O Connect in Bengaluru, India.)

  21. Как мы засунули Git в браузер (и чего нам это стоило)

    Привет, Хабр! Меня зовут Паша, я разработчик

    habr.com/ru/companies/gram_ax/

    #emscripten #rust #webassembly #libgit2 #wasm #git #wysiwyg #open_source #localfirst

  22. Oh, and I can confirm that `-Os` (i.e. optimize for size) does make a difference. #wasm #emscripten

  23. Playing with libav.js [1] (#ffmpeg in #javascript through #emscripten)

    TIL about "async functions" [2]. Seems like moving from "normal" to "async" is a one-way street - normal functions can be easily called in an async context, but it looks like there's no way to get the value of an async function in sync context.

    Yes, I can ".then(...)" on the return value, but then I'm back in callback hell and no longer "sync", am I...

    [1] github.com/Yahweasel/libav.js
    [2] developer.mozilla.org/en-US/do

  24. Playing with libav.js [1] (#ffmpeg in #javascript through #emscripten)

    TIL about "async functions" [2]. Seems like moving from "normal" to "async" is a one-way street - normal functions can be easily called in an async context, but it looks like there's no way to get the value of an async function in sync context.

    Yes, I can ".then(...)" on the return value, but then I'm back in callback hell and no longer "sync", am I...

    [1] github.com/Yahweasel/libav.js
    [2] developer.mozilla.org/en-US/do

  25. 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

  26. 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

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

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

    habr.com/ru/companies/globalsi

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

  28. 📢 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
    ```

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