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

WebAssembly target #23

Open
robert-w-gries opened this issue Nov 19, 2017 · 1 comment
Open

WebAssembly target #23

robert-w-gries opened this issue Nov 19, 2017 · 1 comment
Labels

Comments

@robert-w-gries
Copy link
Owner

robert-w-gries commented Nov 19, 2017

Tracking phil-opp/blog_os#368

Motivation

Rust has the ability to compile to WebAssembly and all relevant browsers now ship support for the WebAssembly standard

This WebAssembly target could have several use cases for blog_os

Run the kernel in a browser

Worth it for the cool factor alone :-)

Allow the compilation and running of the kernel at different stages of your blog posts

After you explain a complex topic, such as paging, you generally provide code as a reference. It'd be nice to be able to compile that code within the blog post's webpage and run the full kernel. The reader could even fiddle with the code, re-run it, and see how their modifications affect the kernel.

The Rust by Example website has the functionality I'm talking about.

Experiment with the concept of kernels hosted on browsers.

I know that javascript PC emulators exist, but WebAssembly seems to have more potential in terms of performance and codability.

Extremely portable emulation

Everyone has a browser and everyone could run the kernel regardless of which OS they're using.

Random Notes

@robert-w-gries
Copy link
Owner Author

More thoughts:

wasm arch could be a shim for running scheduler and interprocess code directly in browser. Printing and keyboard input would be done through javascript event listeners.

This feature would be useful for testing non-architecture specific code. Common code includes scheduling, interprocess comunnication, and userspace processes.

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

No branches or pull requests

1 participant