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

feature/desktop app #295

Merged
merged 43 commits into from
Sep 30, 2022
Merged

feature/desktop app #295

merged 43 commits into from
Sep 30, 2022

Conversation

whitphx
Copy link
Owner

@whitphx whitphx commented Sep 27, 2022

For #69

@whitphx
Copy link
Owner Author

whitphx commented Sep 28, 2022

We should switch to develop snapshotting.

  • Hack to bundle and load the wheels at the local FS (cc187a1) will be unnecessary
  • All dependencies will be bundled so that the app can bootstrap offline.

For snapshotting,

Saving phase

  1. Run the bootstrap phase
  2. Save /home/pyodide and /lib/python3.10/site-packages into files

Restoring and execution phase

  1. Restore the directories from the snapshot files
  2. Skip the normal bootstrap phase
  3. Run Streamlit process as usual

To do so,
1. Extract the bootstrap code in worker.ts into a reusable function
2. Convert @stlite/stlite-kernel module into a dual module for ESM and CJS so that we can use the bootstrap function on NodeJS
3. Implement the snapshotting.
To do so, at first, there would be duplicate code of bootstrapping in the kernel and desktop directories. One for runtime, one for snapshotting at build time.

@whitphx whitphx force-pushed the feature/desktop-app branch 2 times, most recently from bdc0c2d to 46478f1 Compare September 28, 2022 16:31
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

Successfully merging this pull request may close these issues.

1 participant