Repository navigation
Hangar 2.0: the native tab (0.2.0) - #1
Merged
Merged
Conversation
dotenv.js, answer.js, validate.js, diff.js, gitignore.js and logic.js as modules of a native/ crate, on Hangar's kit SDK, each with the cases of its test file. The ignore rules match the page's patterns without a regular expression, the JSON walk has no depth limit, and no cut of a text can panic: a panic's message is logged, and Rust's would quote the text.
controller.js becomes the Kit's update: each await is a call answered by a message, measured against the generation as the page's were. view.js becomes its view, in Hangar's widgets: values dotted until revealed, a multi-line one a dotted one-line field until shown, a numbered editor marking the asked and the broken line, the diff given in parts, the conflict key by key. Ctrl+S saves the form and reviews the text. The tests of controller.test.js, view.test.js and no-value-reaches-an-agent.test.js are ported through the SDK's harness, on a fake Hangar that holds the tab to the manifest's three permissions; the fuzz also reads the tab's log.
scripts/build-native.sh builds native/ for wasm32-unknown-unknown into tabs/editor.wasm, committed since Hangar never builds a kit. The paths of the machine are taken out of the module and native/rust-toolchain.toml pins Rust, so the same source makes the same bytes anywhere. The manifest stays at schema 1 with its HTML entry, and adds native: Hangar 1.x opens the page, the native Hangar the module. The manifest tests check the field, and that the module imports only hangar.log and hangar.now.
The README says the tab is native on the native Hangar, how the module is built and tested, and what the native tab does otherwise than the page. CI gets a native job: the Rust tests, then the module built again and compared with the committed one, failing when it is stale.
… page and its Node tests deleted
…s rust-rewrite branch
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
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.
Brings rust-rewrite to main for Hangar 2.0: the tab is Rust compiled to WebAssembly (manifest schema 2,
hangar >=2.0.0), the HTML tab is gone. Version 0.2.0. Hangar 1.x refuses schema 2 with "needs a newer Hangar".