Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to complie this with Emscripten and run in the browser using WASM? #790

Open
RayBB opened this issue Jan 2, 2025 · 2 comments

Comments

@RayBB
Copy link

RayBB commented Jan 2, 2025

I have basically no experience with compiling programs and gave it a shot with Claude walking me through it but didn't have any luck. Kept getting hung up on an issue removing some part of boost that only works on windows/unix.

However, In theory it seems possible that with WebAssembly we could compile programs like this to run in the browser.

FYI this was the main issue I ran into compiling it:

/Users/rayberger/testmap/boost_1_87_0/boost/asio/detail/signal_blocker.hpp:27:3: error: Only Windows and POSIX are supported!
   27 | # error Only Windows and POSIX are supported!
      |   ^
In file included from src/geojson_processor.cpp:4:
In file included from /Users/rayberger/testmap/boost_1_87_0/boost/asio/thread_pool.hpp:20:
In file included from /Users/rayberger/testmap/boost_1_87_0/boost/asio/detail/scheduler.hpp:239:
In file included from /Users/rayberger/testmap/boost_1_87_0/boost/asio/detail/impl/scheduler.ipp:28:
/Users/rayberger/testmap/boost_1_87_0/boost/asio/detail/io_uring_service.hpp:22:10: fatal error: 'liburing.h' file not found
   22 | #include <liburing.h>
      |          ^~~~~~~~~~~~
2 errors generated.
make: *** [src/geojson_processor.o] Error 1

Update: I created a branch on my fork here with what I've tried so far if anyone wants to jump in and tell me what's going wrong. https://github.com/RayBB/tilemaker/blob/emscripten-support/emscripten_build.md

@systemed
Copy link
Owner

systemed commented Jan 2, 2025

I have no experience with emscripten but it seems a tall order tbh. Even if you can get past the compilation issues, tilemaker needs lots of working memory - either in RAM or on disk. Running in-browser, I'd guess you'd have less of that? But I'll leave this open in case anyone who knows more than me can advise!

@RayBB
Copy link
Author

RayBB commented Jan 3, 2025

Thanks for the input. I'm interested in using it for small areas like a town or a campus so hopefully wouldn't need too much ram in that case but it's a good question on if less ram is available in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants