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

PoC: WebAssembly API #2760

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft

PoC: WebAssembly API #2760

wants to merge 49 commits into from

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Sep 1, 2023

Work towards #2853

Description

This PoC explores the idea of adding a WebAssembly API to Cadence, i.e. exposing a WebAssembly VM to Cadence programs.

The PRs adds:


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent self-assigned this Sep 1, 2023
@turbolent turbolent marked this pull request as draft September 1, 2023 17:46
Base automatically changed from bastian/type-code-generator-for-stdlib to feature/stable-cadence September 1, 2023 20:29
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit a56e521
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Attention: Patch coverage is 79.34272% with 88 lines in your changes missing coverage. Please review.

Project coverage is 80.33%. Comparing base (aeef038) to head (12b56a5).

Current head 12b56a5 differs from pull request most recent head e55b81e

Please upload reports for the commit e55b81e to get more accurate results.

Files Patch % Lines
runtime/webassembly.go 70.10% 45 Missing and 10 partials ⚠️
runtime/stdlib/webassembly.go 80.16% 16 Missing and 8 partials ⚠️
runtime/repl.go 0.00% 4 Missing ⚠️
runtime/environment.go 83.33% 2 Missing and 1 partial ⚠️
runtime/common/computationkind_string.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2760      +/-   ##
==========================================
- Coverage   80.33%   80.33%   -0.01%     
==========================================
  Files         390      393       +3     
  Lines       95921    96338     +417     
==========================================
+ Hits        77060    77390     +330     
- Misses      16138    16206      +68     
- Partials     2723     2742      +19     
Flag Coverage Δ
unittests 80.33% <79.34%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

runtime/webassembly_test.go Outdated Show resolved Hide resolved
@PratikDhanave
Copy link
Contributor

PratikDhanave commented Sep 25, 2023

hi @turbolent thank you for adding a WebAssembly API to Cadence.
I want to know that next task would exposing wasmtime type table ?

@turbolent turbolent removed the request for review from dsainati1 November 1, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants