-
Notifications
You must be signed in to change notification settings - Fork 12
Add Template: Native Simulator Debug #14
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
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
23f8e89
Support add debugger
1346f63
remove default_alloc
1304d24
Auto add feature simulator to contract
dce5def
Optimize the process of adding simulator
c77a4f3
Add load_binary_dbg and support native simulator debug
6bbadcd
Fix error
7a7e7cc
revert tests/lib.rs
b5697f6
test add feature simulator
c946ef2
Optimizing Makefile dependencies
756ddb2
Fix some bugs in add-debugger
d45d74a
ckb-testtool version update to 0.12.0
41aa9e3
Some dependencies are replaced with those in git
e903a59
Update ckb-testtool version
490b0c2
Rename add-debugger to native-simulator
c283df9
Add doc: debugging contract
9b983f1
Update docs
5fc5cb6
Fix CI error
295bf10
Refactore: Native simulator debug project move to native-simulator
a90a243
Delete unused code in workspace/Makefile
997b5c2
Revert contract/src/main.rs
0d7e913
Fix bug about generate native simulator
0052926
Remove documentation about debugging
ec8e3a1
Allow warning (stack-reorder-contract)
d556ad9
Refactore generate native-simulator
3228683
ckb-std lock specific version
0c25da1
Update the description about native simulator
6517a72
Fix make check error when add native simulator
aa8a2f0
Add a comment about profile.ckb-debug
b98b2a3
Delete the commented out code
8403fce
build-simulator merge to build
d30d2e3
The built contract has symbols and is deleted using objcopy
30f44d6
ckb-std update to 0.15.3
39da951
Contract add feature: native-simulator
e19c9b3
Fix error: x64-simulator-crate simulator rename to native-simulator
09fdcde
Optiomization workspace/Makefile build
1ff8ac9
Using Liquid to process templates
d81d8d0
Optimize cargo-generate rules
a0a0d4e
Optimize cargo-generate rules in native-simulator lib.rs
3215d67
Update ckb-std rev
2ea0734
Update dependencies: ckb-std and ckb-testtool
ab116fa
Fix CI
8e8a9d9
Fix CI: on Makfile about CUSTOM_RUSTFLAGS
9db520e
Update ckb-std to 0.16.3
b6d79b9
Typos: Makefile CUSTOM_RUSTFLAGS
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #![no_std] | ||
| #![cfg_attr(not(test), no_std)] | ||
| #![cfg_attr(not(test), no_main)] | ||
|
|
||
| #[cfg(test)] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #![cfg_attr(not(feature = "native-simulator"), no_std)] | ||
| #![allow(special_module_name)] | ||
| #![allow(unused_attributes)] | ||
| #[cfg(feature = "native-simulator")] | ||
| mod main; | ||
| #[cfg(feature = "native-simulator")] | ||
| pub use main::program_entry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /build | ||
| /target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [package] | ||
| name = "{{project-name}}" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
| [dependencies] | ||
| {{project-name | append: "@@SIMULATOR_PLACEHOLDER@@" | remove: "-sim@@SIMULATOR_PLACEHOLDER@@"}} = { path = "../../contracts/{{project-name | append: "@@SIMULATOR_PLACEHOLDER@@" | remove: "-sim@@SIMULATOR_PLACEHOLDER@@"}}", features = ["native-simulator"] } | ||
| ckb-std = { version = "0.16.3", features = ["native-simulator"] } | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # {{project-name}} | ||
|
|
||
| TODO: Write this readme | ||
|
|
||
| *This template is used to provide native simulator for a particular contract, and is not designed to be used on its own.* | ||
|
|
||
| *This project was bootstrapped with [ckb-script-templates].* | ||
|
|
||
|
|
||
| [ckb-script-templates]: https://github.com/cryptape/ckb-script-templates | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [template] | ||
| cargo_generate_version = ">=0.16.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ckb_std::entry_simulator!({{project-name | append: "@@SIMULATOR_PLACEHOLDER@@" | remove: "-sim@@SIMULATOR_PLACEHOLDER@@" | replace: "-", "_"}}::program_entry); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please state it clearly that this template is used to provide native simulator for a particular contract, and is not designed to be used on its own.
Right now this README resembles the README for a typical contract too much.