mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
[RFC] Extend bit/byte conversion RFC.
Add a paragraph clarifying what an adequate implementation strategy could be. In any case, we are likely to go with methods on scalar types directly.
This commit is contained in:
parent
6e264b86ef
commit
6047886446
@ -203,6 +203,14 @@ function i128_from_bytes_le(x: [u8; 16]) -> i128;
|
||||
function i128_from_bytes_be(x: [u8; 16]) -> i128;
|
||||
```
|
||||
|
||||
## Handling of the Native Functions
|
||||
|
||||
Given the relatively large number and regular structure of the functions above,
|
||||
it makes sense to generate them programmatically (e.g. via Rust macros),
|
||||
rather than enumerating all of them explicitly in the implementation.
|
||||
It may also makes sense, at R1CS generation time,
|
||||
to use generated or suitably parameterized code to recognize them and turn them into the corresponding gadgets.
|
||||
|
||||
## Transition to Methods
|
||||
|
||||
Once a separate proposal for adding methods to Leo scalar types is realized,
|
||||
|
Loading…
Reference in New Issue
Block a user