-
-
Notifications
You must be signed in to change notification settings - Fork 28
Incorporate wasm changes #488
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… rebuild) to src/lde.html
…le phase Give emcc link-time flags only to the link phase not the compile phase Remove target "lde" which is not used in the emscripten configuration.
… periodic emscripten_sleep() call. There is no need for an additional Emscripten-specific counter to periodically call emscripten_sleep(). Make test for Emscripten environment check MAIKO_OS_EMSCRIPTEN rather than checking __EMSCRIPTEN__, which is localized in the maiko/platform.h include.
Moves the full.sysout from the root of tle system to /medley/loadups/full.sysout, adds /medley/lispusers/BACKGROUND-YIELD.LCOM and an Emscripten/WAsm specific site init file at /usr/local/lde/site-init.lisp Adjusts options so that the options are in the correct place for the compiler and loader.
Passes the window width/height as the requested geometry to lde at startup. Since we control the directory structure of the file-system, we can pass the known fixed location of the Medley directories in the MEDLEYDIR environment variable. Sets up the NetHub host as localhost - not currenty functional, but a WebSocket server could be added to communicate with the NetHub gateway to enable local networking from the browser version of Medley.
…AIKO_ENABLE_NETHUB Compiling with -DMAIKO_ENABLE_NETHUB makes it possible to test out having a WebSocket server that could pass packets back and forth to the Dodo NetHub. Setting Emscripten link-time option for EXIT_RUNTIME allows the runtime code to shutdown when you exit Medley via a (LOGOUT) Set up preloads for all the parts of the Medley directory that MEDLEYDIR-INIT expects to be there. The resulting ldesdl.data is (at this time) 128 MB. It can be installed gzipped if using nginx or some other web server that supports pre-zipped static files. It would be better to have these as lazy-loading files, but the setup for that is complicated. Another alternative to embedding all the data would be if a WebSocket to XNS/Nethub gateway were written and deployed.
masinter
approved these changes
Jan 26, 2024
Member
masinter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Integrates the WASM work done by others more fully into the system for building and packaging.
In order to build (from maiko/bin, ./makeright wasm) you need the emscripten package(s) installed, with a working emcc, which will also require a version of clang (this setup is system specific and not documented here). The "makeright" will generate, in the same style as other targets, the emscripten.wasm directory, containing ldesdl.js, ldesdl.wasm, and ldesdl.data. The HTML page that wraps these is (now) stored in maiko/src/lde.html. In order to run lde under wasm you need a web server in which you will install all 4 files. As it is currently set up, all the files go at the root of the web directory. If your web server is on a host named "lisp.local", you would then browse http://lisp.local/lde.html to run Medley. When the lde files for WASM are built they capture the state of the adjacent
medleydirectory -- all the files in docs, doctools, greetfiles, internal, sources, library, lispusers, fonts, as well as loadups/full.sysout, loadups/whereis.hash, and greetfiles/MEDLEYDIR-INIT.LCOM -- so you need to make sure you have built a native maiko, and done the medley loadup to get a full.sysout, before you build the WASM lde.I'd appreciate it if someone who has the capability of testing this would do so...