Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Simc WebAssembly

Abierto
#4,341 15 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cmake, cpp, wasm
Área
build-system

Línea de trabajo

Start by reading the CMake scripts and the discussion about which branch to target; the issue proposes broad build-system changes rather than a defined task. It mentions concurrency.hpp, sc_profileset.cpp, and a proposed mock_concurrency.cpp as examples to investigate. Done would require agreeing on scope and branch, then delivering a working WebAssembly build, but the issue does not define acceptance criteria.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

I am currently experimenting with creating a web assembly module from the simulationcraft codebase by compiling it with emscripten. In the long run I want something that can be used to start a side like raidbots.com but without the need to have some costly server to run the simulations on. I also do not want the users to have some client to install and connect it to a side. Running simulationcraft as part of the side is the best of both worlds. What I basically want to create is an easy way to compile simulationcraft to an wasm file that can be included into a website and called into from javascript like this:

var simc = Simc()
simc.simulate("profile")

I managed to come up with some proof of concept where I have a simc running inside the browser and doing successful simulations. There is still a lot of work to do. I am interested in mainstreaming it.

Would that be something you are interested in merging even though that would mean to merge some larger patches that touch multiple and restructure the build system?

The largest part that need to change the build system that needs to be more flexible and needs to allow for enabling and disabling features. This is necessary because not all parts of simc are useful for the wasm target and we need a way to easily switch them on and off. Right now I removed all dependencies on phtreads because the threading support in the browser is highly unstable and only possible with Firefox Nightly.

I think the easiest thing would be to apply the needed changes only to the cmake system and make it to a first class citizen.
Therefore I would start with merging some patches where I add some missing functionality to the cmake scripts and and add some more #defines that are switchable through cmake options. For example:

  • SC_MULTITHREADING: Threading support is not mature in browsers. Should be disabled for the wasm target until browsers get better.

Other things can be removed too for wasm because we need fewer things and want to shrink the size of the binary since it must be transferred via network on page load.

I also would also remove the file globbing from the cmake script and replace it with explicitly defined *.cpp files to compile. In the process I might change the directory structure a bit. The reason is that I need to select different files based on selected options and wether I compile for wasm or for your computer. For example I implemented a mock_concurrency.cpp that does basically nothing and removed the sc_profileset.cpp files from the build since they use std::thread directly without the wrapper from concurrency.hpp.

There are some other issues that make this hard. For example I am not sure from which branch I should start my wasm branch. There is the default legion-dev branch and the bfa-dev feature branch. Problem is that non-bfa code changes (like improvements to cmake scripts) are merged to the feature branch instead of to the main branch.

Will bfa-devand legion-dev be merged into a new master on bfa release and should I wait for that before I start a pull request? And for right now should I branch off bfa-dev to have fewer merge conflicts later on?

Lenguaje dominante
C++
Estrellas
1.6k
Forks
789
Merge medio
8 h 18 min
PR fusionados (30 d)
63

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de simulationcraft/simc

Todos los issues de simulationcraft/simc

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.