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

feat: web crypto intrinsics / cli serving #320

Merged
merged 44 commits into from
Jul 28, 2023
Merged

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Jul 27, 2023

Ready for review

Summary

Adds support for the top-level Web Crypto API to Elide JS VMs. Notably does not include support for the full SubtleCrypto interface; that's coming later.

  • feat(crypto): support for randomUuid
  • feat(crypto): support for generating random bytes
  • feat(cli): ability to serve through run or shell entrypoint
  • feat(cli): update with new express/crypto intrinsic facade

Related work

Changelog

  • feat(js): randomUuid intrinsic
  • feat(js): web crypto getRandomValues intrinsic
  • feat: add api interfaces for Web Crypto API
  • feat: add initial intrinsic impl
  • feat: thin UUIDValue wrapper

@sgammon sgammon added ✋ embargoed PRs and issues that can't proceed because of some non-code condition module:graalvm Modules, changes, and issues relating to GraalVM feature Large PRs or issues with full-blown features 🚧 WIP Works-in-progress. Blocks merge javascript Features and issues relating to JS labels Jul 27, 2023
@sgammon sgammon self-assigned this Jul 27, 2023
@github-actions github-actions bot added platform:jvm PRs and issues relating to JVM support. and removed module:graalvm Modules, changes, and issues relating to GraalVM labels Jul 27, 2023
@sgammon sgammon added 🧪 labs Experimental work module:graalvm Modules, changes, and issues relating to GraalVM labels Jul 27, 2023
@sgammon sgammon force-pushed the labs/express-opt branch from d8df287 to 6309be3 Compare July 27, 2023 09:28
@sgammon sgammon force-pushed the intrinsics/crypto branch from 8340124 to eb2773d Compare July 27, 2023 09:32
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #320 (be43c5e) into release/alpha4 (9cde291) will increase coverage by 0.52%.
The diff coverage is 56.64%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           release/alpha4     #320      +/-   ##
==================================================
+ Coverage           45.35%   45.88%   +0.52%     
==================================================
  Files                 266      271       +5     
  Lines                8960     9071     +111     
  Branches             1218     1232      +14     
==================================================
+ Hits                 4064     4162      +98     
- Misses               4632     4642      +10     
- Partials              264      267       +3     
Flag Coverage Δ
jvm 45.88% <56.64%> (+0.52%) ⬆️
lib 47.08% <56.64%> (+0.52%) ⬆️
substrate 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...es/cli/src/main/kotlin/elide/tool/cli/ElideTool.kt 29.72% <0.00%> (-0.41%) ⬇️
...nternals/intrinsics/js/express/ExpressIntrinsic.kt 28.57% <ø> (+3.57%) ⬆️
.../main/kotlin/elide/runtime/intrinsics/js/Crypto.kt 0.00% <0.00%> (ø)
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 4.71% <4.76%> (+0.09%) ⬆️
...gvm/internals/intrinsics/js/crypto/WebCryptoKey.kt 50.00% <50.00%> (ø)
...kotlin/elide/runtime/gvm/internals/js/JsRuntime.kt 68.96% <60.00%> (+0.21%) ⬆️
...li/src/main/kotlin/elide/tool/cli/GuestLanguage.kt 80.70% <85.36%> (+15.99%) ⬆️
...ime/gvm/internals/intrinsics/js/typed/UUIDValue.kt 95.83% <95.83%> (ø)
...ages/cli/src/main/kotlin/elide/tool/cli/Statics.kt 100.00% <100.00%> (ø)
...ternals/intrinsics/js/crypto/WebCryptoIntrinsic.kt 100.00% <100.00%> (ø)
... and 2 more

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cde291...be43c5e. Read the comment docs.

@sgammon sgammon added this to the Release R2: Alpha 4 milestone Jul 27, 2023
@sgammon sgammon force-pushed the labs/express-opt branch from 6309be3 to 0840875 Compare July 27, 2023 22:35
@sgammon sgammon force-pushed the intrinsics/crypto branch from 37bf79d to 6fe4030 Compare July 27, 2023 23:11
Base automatically changed from labs/express-opt to release/alpha4 July 27, 2023 23:50
@sgammon sgammon marked this pull request as ready for review July 28, 2023 00:40
@sgammon sgammon changed the title feat: web crypto api intrinsics feat: web crypto intrinsics / cli serving Jul 28, 2023
@sgammon sgammon removed ✋ embargoed PRs and issues that can't proceed because of some non-code condition 🚧 WIP Works-in-progress. Blocks merge labels Jul 28, 2023
@sgammon sgammon merged commit aeb5aca into release/alpha4 Jul 28, 2023
@sgammon sgammon deleted the intrinsics/crypto branch July 28, 2023 07:22
@sgammon sgammon mentioned this pull request Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large PRs or issues with full-blown features javascript Features and issues relating to JS 🧪 labs Experimental work module:graalvm Modules, changes, and issues relating to GraalVM platform:jvm PRs and issues relating to JVM support.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant