-
Notifications
You must be signed in to change notification settings - Fork 9
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 Template: Native Simulator Debug #14
Merged
Merged
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
23f8e89
Support add debugger
joii2020 1346f63
remove default_alloc
joii2020 1304d24
Auto add feature simulator to contract
joii2020 dce5def
Optimize the process of adding simulator
joii2020 c77a4f3
Add load_binary_dbg and support native simulator debug
joii2020 6bbadcd
Fix error
joii2020 7a7e7cc
revert tests/lib.rs
joii2020 b5697f6
test add feature simulator
joii2020 c946ef2
Optimizing Makefile dependencies
joii2020 756ddb2
Fix some bugs in add-debugger
joii2020 d45d74a
ckb-testtool version update to 0.12.0
joii2020 41aa9e3
Some dependencies are replaced with those in git
joii2020 e903a59
Update ckb-testtool version
joii2020 490b0c2
Rename add-debugger to native-simulator
joii2020 c283df9
Add doc: debugging contract
joii2020 9b983f1
Update docs
joii2020 5fc5cb6
Fix CI error
joii2020 295bf10
Refactore: Native simulator debug project move to native-simulator
joii2020 a90a243
Delete unused code in workspace/Makefile
joii2020 997b5c2
Revert contract/src/main.rs
joii2020 0d7e913
Fix bug about generate native simulator
joii2020 0052926
Remove documentation about debugging
joii2020 ec8e3a1
Allow warning (stack-reorder-contract)
joii2020 d556ad9
Refactore generate native-simulator
joii2020 3228683
ckb-std lock specific version
joii2020 0c25da1
Update the description about native simulator
joii2020 6517a72
Fix make check error when add native simulator
joii2020 aa8a2f0
Add a comment about profile.ckb-debug
joii2020 b98b2a3
Delete the commented out code
joii2020 8403fce
build-simulator merge to build
joii2020 d30d2e3
The built contract has symbols and is deleted using objcopy
joii2020 30f44d6
ckb-std update to 0.15.3
joii2020 39da951
Contract add feature: native-simulator
joii2020 e19c9b3
Fix error: x64-simulator-crate simulator rename to native-simulator
joii2020 09fdcde
Optiomization workspace/Makefile build
joii2020 1ff8ac9
Using Liquid to process templates
joii2020 d81d8d0
Optimize cargo-generate rules
joii2020 a0a0d4e
Optimize cargo-generate rules in native-simulator lib.rs
joii2020 3215d67
Update ckb-std rev
joii2020 2ea0734
Update dependencies: ckb-std and ckb-testtool
joii2020 ab116fa
Fix CI
joii2020 8e8a9d9
Fix CI: on Makfile about CUSTOM_RUSTFLAGS
joii2020 9db520e
Update ckb-std to 0.16.3
joii2020 b6d79b9
Typos: Makefile CUSTOM_RUSTFLAGS
joii2020 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 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 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 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 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 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 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 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 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.15.3", features = ["native-simulator"] } | ||
|
||
[lib] | ||
crate-type = ["cdylib"] |
This file contains 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 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 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 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 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 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.
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.