-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for running the ANISE GUI in the browser #143
Add support for running the ANISE GUI in the browser #143
Conversation
Sweet, thanks! I'll need to test this. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #143 +/- ##
=======================================
Coverage 76.93% 76.94%
=======================================
Files 67 67
Lines 7595 7602 +7
=======================================
+ Hits 5843 5849 +6
- Misses 1752 1753 +1 ☔ View full report in Codecov by Sentry. |
b12d5a9
to
225eba9
Compare
I was trying to see if I could run this without the javascript time but it doesn't work. I'll need to make a new release of hifitime first, and I don't quite want to add the Updating hifitime isn't my highest priority at the moment, it's after both Nyx and ANISE Python support. Specifically, nyx-space/nyx#260, then #136, and then nyx-space/nyx#86. Hence I'm afraid I'll keep this PR open for a while, likely until late January. Sorry about that. |
225eba9
to
fa9bdd7
Compare
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.
Looks good, thanks!
I will update this PR once you create a new release for |
fa9bdd7
to
0d27b2a
Compare
Summary
This PR makes some changes that enable running the ANISE GUI in the browser. This could be deployed to a static HTML page and hosted on Github Pages for ease-of-access.
Running the web version locally is best done using Trunk. Install it by running
cargo install --locked trunk
(or follow instructions in the linked page above). The ANISE GUI can then be built and launched by runningThis will start up a web server (only used for local testing), at http://127.0.0.1:8080/.
Trunk can also be used for building the WASM binary and associated index.html and JS file by running:
The files generated in
dist/
can be published to Github pages or any other static web-host.Architectural Changes
An updated version of
hifitime
is required. See this PR: Adds support for using hifitime in WASM targets hifitime#262 . Currently,Cargo.toml
points to my branch ofhifitime
. Once that PR is merged, I can update it to point to the new version on crates.io.Almanac::load()
has been split up into two methods:Almanac::load()
andAlmanac::load_from_bytes()
. The latter is used when loading files from the GUI running in the browser.Additional logic in
ui.rs
for loading the file using a browser-based file picker instead of the native file picker. This required some additionalasync
stuff in the code. However, all of these new things are only built if compiled for thewasm32-unknown-unknown
targetThe browser does not have an implementation of memory-mapped IO. So loading large files might use up a bunch of memory.
New Features
This PR enables running the ANISE GUI from a web browser.
Testing and validation
Manually tested the GUI.