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

Add support for ECAL instruction #5239

Closed
IGI-111 opened this issue Oct 28, 2023 · 1 comment · Fixed by #6947
Closed

Add support for ECAL instruction #5239

IGI-111 opened this issue Oct 28, 2023 · 1 comment · Fixed by #6947
Assignees
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged good first issue Good for newcomers team:compiler Compiler Team team:tooling Tooling Team

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Oct 28, 2023

Add support for this instruction in asm blocks: https://specs.fuel.network/master/fuel-vm/instruction-set.html#ecal-call-external-function

Here's a usage example: https://github.com/FuelLabs/fuel-vm/blob/master/fuel-vm/examples/external.rs#L91

@IGI-111 IGI-111 added good first issue Good for newcomers compiler General compiler. Should eventually become more specific as the issue is triaged labels Nov 6, 2023
@IGI-111 IGI-111 added the team:compiler Compiler Team label Feb 10, 2025
@zees-dev zees-dev self-assigned this Feb 18, 2025
@zees-dev zees-dev added the team:tooling Tooling Team label Feb 18, 2025
@zees-dev
Copy link
Contributor

zees-dev commented Feb 18, 2025

@zees-dev zees-dev mentioned this issue Feb 21, 2025
8 tasks
zees-dev added a commit that referenced this issue Feb 22, 2025
## Description
The ECAL opcode is supported in `fuel-vm` to extend the capabilities of
the VM.
Users can implement rust code to interop with the VM using the ECAL
opcode.
This PR introduces support for the opcode in the sway repo - such that
sway assembly can be successfully compiled with the ECAL opcode.

Examples of how to utilize the `ECAL` opcode can be seen here:
https://github.com/FuelLabs/fuel-vm/blob/9478991db1ea8799fab47ebe1c195946a2698a7f/fuel-vm/examples/external.rs#L51

- Closes #5239
- Added an e2e test to validate compilation of ecall opcode in sway
assembly.

## Checklist

- [x] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: z <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged good first issue Good for newcomers team:compiler Compiler Team team:tooling Tooling Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants