| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore: update templates to use newer fuels SDK (#7024) ## Description ## Checklist - [ ] 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. | 1 年前 | |
chore: update templates to use newer fuels SDK (#7024) ## Description ## Checklist - [ ] 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. | 1 年前 | |
Verify all jumps on asm are using ControlFlowOp (#7563) ## Description This PR will be useful for https://github.com/FuelLabs/sway/pull/7550 testing. Currently, we expect all jumps to use `ControlFlowOp`. We have two exceptions at the moment: 1 - JAL when returning from functions; 2 - and `__jmp_mem()` used on `run_external`. This PR fixes both by removing all jumps from the `VirtualOp` enum. There is also another problem with `VirtualOp::successor`. Currently, `JAL` is reporting the next instruction as its successor, which is not true. ## New `patch-bin` and `fuel-vm` snapshot command One issue raised below was that removing jumps from the enum makes it harder to test/debug some applications. To solve that we now have one new snapshot test command: `patch-bin`. As the name implies it pacthes the binary and allow us to inject any instruction, even invalid ones, directly into `asm` blocks. Example: ```rust fn main() -> u64 { asm(r1, r0: 0) { addi r1 r0 i3; log r0 r0 r0 r0; // PATCH: 0x50 010000 010000 000000 000100 addi r1 r1 i5; r1: u64 } } ``` The command will search for the comment above, then it will search inside the `DWARF` file the instruction that is marked to this same line; then it will parse the command in the comments and patch the binary directly. After that we can run the patched binary directly with another new command: `fuel-vm`. Example: ```toml cmds = [ "forc build --path {root}", "patch-bin debug", "fuel-vm run {root}/out/debug/asm_patch.bin" ] ``` These commands need improvements. So let us consider them as POCs at this stage. I vote for leaving this test there, and it can even be the sandbox for tests directly. ## Removing templates tests from CI This PR is also removing templates tests from CI because we will move these tests to the Rust SDK repo, where makes more sense for them to be. In a future PR I will remove these templates from this repo and update the docs. ## Checklist - [x] I have linked to any relevant issues. - [x] 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) - [x] 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. - [x] 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). - [x] I have requested a review from the relevant team or maintainers. | 5 个月前 | |
feat: Add predicate and script templates (#5238) ## Description When DevRel creates more tutorials on predicates and scripts, it's not ideal to use the same template designed for contracts and ask developers to erase everything and start afresh. It's clearer to have developers use a template tailored for the respective program type. These templates are already compatible with existing `forc` commands like Predicate 1. `forc new --predicate MyPredicate` 2. `cargo generate --init fuellabs/sway templates/sway-predicate-test-rs --name MyPredicate` Script 1. `forc new --script MyScript` 2. `cargo generate --init fuellabs/sway templates/sway-script-test-rs --name MyScript` ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] 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). - [x] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: IGI-111 <igi-111@protonmail.com> Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com> | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 5 个月前 | ||
| 2 年前 |