Cairo Library Projects
-
alexandria
Community maintained Cairo libraries and set of well maintained, optimised and secure components. (by keep-starknet-strange)
Searching over the codebase of Cairo - and here it is. What does it generate? In Cairo defining methods for a type requires a trait as methods are defined only for a trait. So #[generate_trait] reduces a boilerplate generating a corresponding trait definition out of the implementation for a type. You can always define a corresponding trait manually (e.g. check the library-implemented Queue). Thus the associated (i.e. doesn't require an instance) method new is called on ArrayTrait. Let's come back to the output. We do specify the output as Array. And the output of 2 numbers instead of 4 suggests that we deal with some compact serialization scheme. Let's test this hypothesis with a bigger int and larger array:
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Cairo Libraries discussion
Index
Project | Stars | |
---|---|---|
1 | alexandria | 230 |