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

Have a working browser #55

Open
tomaka opened this issue Nov 24, 2019 · 4 comments
Open

Have a working browser #55

tomaka opened this issue Nov 24, 2019 · 4 comments

Comments

@tomaka
Copy link
Owner

tomaka commented Nov 24, 2019

That's obviously the biggest milestone.
Compiling an existing browser engine to WASI and running.

@tomaka tomaka pinned this issue Dec 17, 2019
@tomaka tomaka unpinned this issue Dec 21, 2019
@tomaka tomaka pinned this issue Dec 21, 2019
@tomaka
Copy link
Owner Author

tomaka commented Dec 27, 2020

I've started a branch of servo that envisions to compile for wasi: https://github.com/tomaka/servo/tree/wasi-hack

Unfixed problems:

  • Wasi doesn't support sockets, and as such it's not possible to properly implement support in mio/tokio. Support for sockets will eventually happen.
  • All the OpenGL stack needs to be implemented, and it's unlikely for Wasi to ever support a graphics stack. Fortunately, Servo is organized as a library, and all we need to provide to the Servo library is OpenGL function pointers.
  • Servo needs a way to later query how much a pointer returned by malloc actually occupies memory: malloc_size_of. To implement this, they force usage of jemalloc on Linux, and use an API that does that on Windows.
  • Freetype (the C library) uses setjmp/longjmp. To make it compile, I've replaced them with dummy implementations.
  • Harfbuzz needs mutexes but there's no <pthread.h> in the Wasi SDK. Can be replaced with stubs, since Wasm is always single threaded at the moment.

Note that this concerns only compiling Servo. Actually running it will probably uncover a lot more issues, for example Servo trying to spawn threads or accessing files.

@tomaka
Copy link
Owner Author

tomaka commented Dec 31, 2020

The solution to having to support OpenGL could be to port the software renderer of mesa3d (used by osmesa).

@tomaka
Copy link
Owner Author

tomaka commented Jan 2, 2021

cc #701

@PaperPrototype
Copy link

PaperPrototype commented Aug 5, 2021

It will be cool to pass WebASM from websites directly to run on the OS WASI :P

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