-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[draft] port to wasm32-unknown-unknown & web
#8607
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
Open
makemeunsee
wants to merge
46
commits into
helix-editor:master
Choose a base branch
from
makemeunsee:wasm32
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
8cc20a4
helix-core compiles to wasm32
makemeunsee a42389e
wip helix view wasm32
makemeunsee ea954e3
horrible feature gating
makemeunsee f2a647b
helix-view compiles to wasm32
makemeunsee 840a0be
fix for regular, global build
makemeunsee b83a156
better defaults; helix-tui wasm32 compilation
makemeunsee e185dc7
prev commit amend; helix-tui wasm32 compilation
makemeunsee 4a09826
`cargo build` works everywhere
makemeunsee d026459
restored dap&lsp for non wasm build
makemeunsee c7a8bc1
project builds as lib to wasm32; coarse doc
makemeunsee d6c14ba
minor steps torward wasm32 app
makemeunsee facc9dd
fixing runtime step by step
makemeunsee eec0b19
more wasm runtime compat
makemeunsee 46e1d09
more wasm runtime compat
makemeunsee bc111a3
crude webapp embedding helix as wasm32
makemeunsee 8e86a7a
poc xterm integration
makemeunsee 4982249
app runs! event loop too, somehow
makemeunsee 3639d8a
full integration, wip
makemeunsee 4083931
wip crossterm/xterm integration
makemeunsee fea0252
terminal.size() for wasm32 at last; to be tested
makemeunsee 4ae3331
it works O_o
makemeunsee 778e1e4
wasm32 build fix & GH pipeline
makemeunsee a361a3c
no history for GH pages
makemeunsee e81fc0e
cleanup & increased compliance with baseline
makemeunsee 22325d0
search in selection bug fix
makemeunsee 440017b
actually compatible with node 20
makemeunsee 38994d2
actually compatible with node 20
makemeunsee 978a1b8
issue with nucleo
makemeunsee cd5336b
README update
makemeunsee 241260d
fancy font
makemeunsee 879951c
correct rs-xterm-js
makemeunsee b4d25cc
wasm cosmetics: true color on, fallback font
makemeunsee 47751ce
rebased on master
makemeunsee f2dabe6
dependency bump
makemeunsee 68a1f9d
embed themes in wasm
makemeunsee 7c127ae
pickers are broken on wasm32, disabled
makemeunsee b147fe8
crude buffer read/write using Web Storage API
makemeunsee ee32fae
web storage write/read fixed; tutor embedded
makemeunsee 86b0dc9
'lightweight' embedding of some TS languages
makemeunsee 8356662
limited langs, CI fix maybe
makemeunsee 3c604df
CI fix maybe
makemeunsee ec7d154
CI debug logs
makemeunsee bb4d58c
avoid pointless rebuilds
makemeunsee e8f3ae1
fetch grammars for wasm32 builds too
makemeunsee 708bce5
build fix + optimisation
makemeunsee 3b4b5a7
prev. commit broke TS parsing
makemeunsee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Deploy web demo | ||
| on: | ||
| push: | ||
| branches: [ wasm32 ] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Install LLVM and Clang | ||
| uses: KyleMayes/install-llvm-action@v1 | ||
| with: | ||
| version: "16" | ||
|
|
||
| - name: Set up cache | ||
| uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Install wasm-pack | ||
| uses: jetli/wasm-pack-action@v0.4.0 | ||
| with: | ||
| version: 'latest' | ||
|
|
||
| - name: Build Helix webpack | ||
| run: | | ||
| cd helix-web | ||
| wasm-pack build | ||
| wasm-pack pack | ||
|
|
||
| - name: Install node modules and build static app | ||
| run: | | ||
| cd helix-web/www | ||
| npm install ../pkg/helix-web-0.1.0.tgz | ||
| NODE_OPTIONS=--openssl-legacy-provider npm run build | ||
| cp node_modules/xterm/css/xterm.css dist/ | ||
|
|
||
| - name: Deploy | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./helix-web/www/dist/ | ||
| destination_dir: ./demo | ||
| force_orphan: true | ||
Oops, something went wrong.
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.
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.
The action does so little it would be nice to just replace with the official invocation: https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/continuous-integration.html#github-actions
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.
I picked this one as they advertise much faster (seconds vs. minutes) set up times, but we can use the official one sure.
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.
From the docs should be equally as fast, it figures out the target architecture and downloads the release (rather than cargo-install-ing and compiling from source)