![]() ![]() These macros allow you to focus on writing idiomatic Rust and application-specific logic instead of the common code required to interact with a runtime. MacrosĪs you learn how to use and write FRAME pallets, you'll see there are many macros available as reusable code to abstract common tasks or enforce runtime-specific requirements. Substrate has a lot of its of own primitive types and associated traits that make it possible to work around the no_std requirement. This implies that you can't rely on some typical standard library types and functions and must only use no_std compatible crates for the majority of runtime code. When building a Substrate node, we use the wasm32-unknown-unknown compilation target which means that Substrate runtime engineers are constrained to writing runtimes that must compile to Wasm. Asynchronous Rust (for more advanced developers working with outer node (client) code).Īlthough general familiarity with Rust is essential before diving into Substrate-and there are many resources available for learning Rust, including the Rust Language Programming Book and Rust by Example-the remainder of this section highlights ways Substrate uses some of Rust's core features for developers getting started with runtime engineering.Basic Rust idioms, working with no_std and what macros are used and why (for runtime engineering). ![]() Generally, depending on their focus, developers should expect to know: While more complex features in Rust such as multithreading and asynchronous Rust are used in the outer node code, they aren't directly exposed to runtime engineers, making it easier for runtime engineers to focus on the business logic of their node. ![]() In the Architecture section, you will learn that Substrate is made of two distinct architectural components: the outer node and the runtime.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |