소스 검색

doc: Add small note on working with native contracts

parazyd 2 년 전
부모
커밋
14b4c96105
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      doc/src/SUMMARY.md
  2. 11 0
      doc/src/dev/native_contracts.md

+ 1 - 0
doc/src/SUMMARY.md

@@ -24,6 +24,7 @@
   - [Contribute](dev/contribute.md)
   - [Learn](dev/learn.md)
   - [API Rustdoc](dev/rustdoc.md)
+  - [Native Contracts](dev/native_contracts.md)
   - [Seminars](dev/seminars.md)
 - [Architecture](arch/arch.md)
   - [Overview](arch/overview.md)

+ 11 - 0
doc/src/dev/native_contracts.md

@@ -0,0 +1,11 @@
+Working on native smart contracts
+=================================
+
+The native network smart contracts are located in `src/contract/`.
+Each of the directories contains a `Makefile` which defines the rules
+of building the wasm binary, and target for running tests.
+
+The `Makefile` also contains a `clippy` target which will perform
+linting over the webassembly code using the `wasm32-unknown-unknown`
+target, and linting over the code (including tests) using `RUST_TARGET`
+defined in the `Makefile` or passed through env.