Candid: the interface description language of the Internet Computer smart contracts - 陈研
contracts Yan Chen DFINITY Foundation Rust China Conf 2023 −− How DFINITY uses procedure macro to extend Rust Overview • Macro system is a hidden gem in Rust. • We share our experience in safely extending • Export interface description • How to simulate monomorphization and share states across procedure macro • Import interface description • How to control generated code How to serialize a Candid Candid type • Possible solutions • Add a new phase in rustc or rust-analyzer • Procedure macro Derive types with procedure macro • Deriving types from token stream directly • No def-use info, cannot handle0 码力 | 35 页 | 1.35 MB | 1 年前3PlantUML 1.2020.22 语言参考指引
sorry [ok] } }} " @enduml It can also be combined with define macro. @startuml !unquoted procedure SALT($x) "{{ salt %invoke_procedure("_"+$x) }}" as $x !endprocedure PlantUML 语言参考指引 (1.2020.22) 219 SALT !procedure _choose() {+ an example choose one option ()one ()two [ok] } !endprocedure !procedure _wait() {+ please wait operation in progress <&clock> [cancel] } !endprocedure !procedure _success() _success() {+ success congratulations! [ok] } !endprocedure !procedure _error() {+ error failed, sorry [ok] } !endprocedure (*) --> SALT(choose) -right-> SALT(wait) wait -right-> SALT(success) wait0 码力 | 295 页 | 3.08 MB | 1 年前3使用 PlantUML 绘制 UML - PlantUML 语言参考指引(Version 1.2020.23)
sorry [ok] } }} " @enduml It can also be combined with define macro. @startuml !unquoted procedure SALT($x) "{{ salt %invoke_procedure("_"+$x) }}" as $x !endprocedure PlantUML 语言参考指引 (1.2020.23) 231 SALT !procedure _choose() {+ an example choose one option ()one ()two [ok] } !endprocedure !procedure _wait() {+ please wait operation in progress <&clock> [cancel] } !endprocedure !procedure _success() _success() {+ success congratulations! [ok] } !endprocedure !procedure _error() {+ error failed, sorry [ok] } !endprocedure (*) --> SALT(choose) -right-> SALT(wait) wait -right-> SALT(success) wait0 码力 | 307 页 | 3.17 MB | 1 年前3使用 PlantUML 绘制 UML - PlantUML 语言参考指引(Version 1.2021.2)
@enduml It can also be combined with define macro. @startuml !unquoted procedure SALT($x) "{{ salt %invoke_procedure("_"+$x) }}" as $x !endprocedure !procedure _choose() {+ PlantUML 语言参考指引 (1.2021.2) 219 endprocedure !procedure _wait() {+ please wait operation in progress <&clock> [cancel] } !endprocedure !procedure _success() {+ success congratulations! [ok] } !endprocedure !procedure _error() {+ definelong anymore. Use !function, !procedure or variable definition instead. !define should be replaced by return !function and !definelong should be replaced by !procedure. • 你不应该再使用 !define 和 !definelong0 码力 | 381 页 | 4.05 MB | 1 年前3PlantUML 1.2021.1 语言参考指引
@enduml It can also be combined with define macro. @startuml !unquoted procedure SALT($x) "{{ salt %invoke_procedure("_"+$x) }}" as $x !endprocedure !procedure _choose() {+ PlantUML 语言参考指引 (1.2021.1) 214 endprocedure !procedure _wait() {+ please wait operation in progress <&clock> [cancel] } !endprocedure !procedure _success() {+ success congratulations! [ok] } !endprocedure !procedure _error() {+ definelong anymore. Use !function, !procedure or variable definition instead. !define should be replaced by return !function and !definelong should be replaced by !procedure. • 你不应该再使用 !define 和 !definelong0 码力 | 376 页 | 4.00 MB | 1 年前3PlantUML 1.2021.3 语言参考指引
@enduml It can also be combined with define macro. @startuml !unquoted procedure SALT($x) "{{ salt %invoke_procedure("_"+$x) }}" as $x !endprocedure !procedure _choose() {+ PlantUML 语言参考指引 (1.2021.2) 233 endprocedure !procedure _wait() {+ please wait operation in progress <&clock> [cancel] } !endprocedure !procedure _success() {+ success congratulations! [ok] } !endprocedure !procedure _error() {+ definelong anymore. Use !function, !procedure or variable definition instead. !define should be replaced by return !function and !definelong should be replaced by !procedure. • 你不应该再使用 !define 和 !definelong0 码力 | 398 页 | 4.22 MB | 1 年前3使用 PlantUML 绘制 UML - PlantUML 语言参考指引(Version 1.2023.11)
@enduml 6.21 SDL(规范和描述语言) 6.21.1 SDL 形状名称表 名称 旧语法 定型语法 输入 < <> 输出 > <0 码力 | 539 页 | 7.74 MB | 1 年前3Rust在物理引擎研发中的应用 崔汉青
ultraviolet Generic, procedure macro, or… Generic 表达力不足 不容易做精细性能优化 Procedure Macro 过于复杂 结果不可见 那么,用代码生成代码?Web 开发用的模板引擎, 也可以用于生成 Rust 代码 tera 模板生成分指令集优化的 Rust 代码 提供远超 Procedure Macro 的可读性和易用性 mathbench0 码力 | 22 页 | 1.18 MB | 1 年前3Zabbix 5.4 中文手册
nextcheck and restart the server/proxy. 11. Q: Text item values in frontend (when using {ITEM.VALUE} macro and in other cases) are cut/trimmed to 20 symbols. Is that normal? A: Yes, there is a hardcoded innodb_strict_mode = OFF; CALL zbx_convert_utf8(); If MariaDB → set innodb_strict_mode = ON; drop procedure zbx_convert_utf8; Note that data encoding will be changed on disk. For example, when converting 或更高版本的 Elasticsearch,某些功能可能无法按预期工作。 Attention: Elasticsearch support is experimental! Setup procedure considered in this section is applicable to the following Elasticsearch versions: 5.0.x -→ 6.1.x0 码力 | 2339 页 | 19.57 MB | 1 年前3Zabbix 4.4 中文手册
nextcheck and restart the server/proxy. 11. Q: Text item values in frontend (when using {ITEM.VALUE} macro and in other cases) are cut/trimmed to 20 symbols. Is that normal? A: Yes, there is a hardcoded 或更高版本的 Elasticsearch,某些功能可能无法按预期工作。 Attention: Elasticsearch support is experimental! Setup procedure considered in this section is applicable to the following Elasticsearch versions: 5.0.x -→ 6.1.x 也可参见运行控制 选 项。 23 HousekeepingFrequency no 0-24 1 How often Zabbix will perform housekeeping procedure (in hours). Housekeeping is removing outdated information from the database. Note: To prevent0 码力 | 1850 页 | 13.52 MB | 1 年前3
共 147 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15