-
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
Changes from 37 commits
23f8e89
1346f63
1304d24
dce5def
c77a4f3
6bbadcd
7a7e7cc
b5697f6
c946ef2
756ddb2
d45d74a
41aa9e3
e903a59
490b0c2
c283df9
9b983f1
5fc5cb6
295bf10
a90a243
997b5c2
0d7e913
0052926
ec8e3a1
d556ad9
3228683
0c25da1
6517a72
aa8a2f0
b98b2a3
8403fce
d30d2e3
30f44d6
39da951
e19c9b3
09fdcde
1ff8ac9
d81d8d0
a0a0d4e
3215d67
2ea0734
ab116fa
8e8a9d9
9db520e
b6d79b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/target |
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"] |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[template] | ||
cargo_generate_version = ">=0.16.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ckb_std::entry_simulator!({{project-name | remove: "-sim" | replace: "-", "_"}}::program_entry); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use the same technique above to append a placeholder first, then remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I neglected it, I will change it. |
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.