mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-27 03:21:49 +03:00
[RFC] Extend the native functions RFC a bit more.
Explicate how the initially proposed design is consistent with Java, and how the native implementations live in separate files in that design. This better paves the way to the more recent variant of this proposal, currently discussed under alternatives but that may be eventually "swapped" if that's also the rest of the team's consensus.
This commit is contained in:
parent
16daa63dea
commit
1bc19d8b1c
@ -166,6 +166,10 @@ The compiler must know a mapping from native functions in the standard/core libr
|
||||
to the R1CS gadgets that implement them, so it should be just a matter of selecting the appropriate one.
|
||||
Some of this logic must be already present, in order to detect and select the BLAkE2s gadget.
|
||||
|
||||
This approach is used in Java, where Java files may declare certain methods as `native`,
|
||||
without a body but with a declaration of input and output types.
|
||||
The actual native implementations, i.e. the native method bodies live in different files, as they are written in C.
|
||||
|
||||
# Drawbacks
|
||||
|
||||
This does not seem to bring any drawbacks.
|
||||
|
Loading…
Reference in New Issue
Block a user