Skip to content

Conversation

@rvolosatovs
Copy link

@rvolosatovs rvolosatovs commented Nov 7, 2025

Implement support for component model via component module, which largely mimics the env module API.

Blocked on near/nearcore#14439

TODO:

  • tests, it seems that the only viable option is building a Wasm component using the new APIs and running that, since the "mock env" trick will not work for components, since wit-bindgen stubs out all imports with unreachable!() on native architectures. Even we were to change that, it would still not fully represent the Wasm environment, since we need to ensure that e.g. the platform is little-endian
  • AccountId -> String conversion requires a host call, which may be expensive. Perhaps we should introduce a wrapper, which holds a reference to the host (validated) AccountId and lazily queries the string representation on-demand. This should work, since, (I assume) the account ID is immutable

@github-project-automation github-project-automation bot moved this to NEW❗ in DevTools Nov 7, 2025
@rvolosatovs rvolosatovs force-pushed the feat/component-model branch 2 times, most recently from d6741a4 to ac3a8c7 Compare November 7, 2025 10:31
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.88%. Comparing base (5cc4fcf) to head (80845f4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1397      +/-   ##
==========================================
+ Coverage   80.87%   80.88%   +0.01%     
==========================================
  Files         104      104              
  Lines       15464    15472       +8     
==========================================
+ Hits        12506    12515       +9     
+ Misses       2958     2957       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: NEW❗

Development

Successfully merging this pull request may close these issues.

1 participant