feat: export wasm flake artifacts and demo apps#152
Merged
Conversation
Contributor
|
Verify demo (read side): https://lambdasistemi-haskell-mts-pr-152.surge.sh |
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.
Summary
This follow-up makes the WebAssembly surface exported by the flake match the actual artifacts we ship.
Before this branch,
packages.csmt-verify-wasmwas misleading: it exposed the full four-module WASM output directory, not the singlecsmt-verify.wasmbinary its name suggested. The repository also had nonix runentrypoints for serving the static demo bundles locally.This branch fixes that by exporting:
packages.wasm-artifactsfor the combined WASM output directorypackages.csmt-verify-wasmpackages.csmt-write-wasmpackages.mpf-verify-wasmpackages.mpf-write-wasmappsfor the static bundles:apps.csmt-verify-wasm-demoapps.csmt-wasm-write-demoapps.mpf-wasm-write-demoapps.docsWhat Changed
Flake packaging
nix/wasm-packages.nix.wasmfile out of the combinedmts-wasmbuild outputwasm-artifactsso downstream consumers can still fetch all four modules at onceappsbacked by a simple local Python HTTP serverDocumentation
README.mdwith the newnix buildandnix runentrypointsdocs/installation.mdso the install/tutorial path includes the exported WASM outputs and preview commandscsmt-write-wasm,mpf-write-wasm, etc.) instead of implying the demo bundle package is the module itselfReviewer Notes
The main thing to check is naming parity:
nix build .#csmt-verify-wasmnow yields onlycsmt-verify.wasmnix build .#wasm-artifactsyields the combined directory with all four modulesnix run .#mpf-wasm-write-demo(and the other demo apps) now serves the corresponding static bundle directly from the storeVerification
Locally verified:
nix develop github:paolino/dev-assets?dir=mkdocs --quiet -c mkdocs build --strictnix eval --json .#apps.x86_64-linux --apply 'apps: builtins.attrNames apps'nix eval --json .#packages.x86_64-linux --apply 'pkgs: builtins.filter (name: builtins.elem name ["wasm-artifacts" "csmt-verify-wasm" "csmt-write-wasm" "mpf-verify-wasm" "mpf-write-wasm" "csmt-verify-wasm-demo" "csmt-wasm-write-demo" "mpf-wasm-write-demo" "docs"]) (builtins.attrNames pkgs)'nix build --quiet .#wasm-artifacts .#csmt-verify-wasm .#csmt-write-wasm .#mpf-verify-wasm .#mpf-write-wasm .#csmt-verify-wasm-demo .#csmt-wasm-write-demo .#mpf-wasm-write-demo .#docsnix run .#mpf-wasm-write-demo:index.html,mpf-write.wasm, andmpf-verify.wasmall returned200CI is the remaining gate before merge.