Package for zx #45

Merged
zxq9 merged 9 commits from zomp into master 2025-01-22 19:36:51 +09:00
Owner

This packages the library for deployment on zx (migrating from the old otpr-aeserialization-* line).

It also adds a native Erlang fallback to invokation of the Blake2 algorithm, picking enacl if it is present, but proceeding with eblake2 if not.

This packages the library for deployment on zx (migrating from the old otpr-aeserialization-* line). It also adds a native Erlang fallback to invokation of the Blake2 algorithm, picking enacl if it is present, but proceeding with eblake2 if not.
zxq9 added 6 commits 2025-01-22 14:35:15 +09:00
zxq9 added 1 commit 2025-01-22 14:39:32 +09:00
Merge branch 'master' into zomp
All checks were successful
Gajumaru Serialization Tests / tests (push) Successful in -4m22s
6fae7b4119
zxq9 requested review from dimitar.p.ivanov 2025-01-22 14:42:55 +09:00
zxq9 requested review from uwiger 2025-01-22 14:42:55 +09:00
zxq9 requested review from spivee 2025-01-22 14:43:17 +09:00
dimitar.p.ivanov reviewed 2025-01-22 14:58:08 +09:00
@ -6,6 +6,7 @@
%%% @end
%%%-------------------------------------------------------------------
-module(gmser_api_encoder).
-vsn("0.1.2").

I am wondering if we plan keeping all of those versions in sync somehow, ex. when we change the encoder version, do we also bump the chain objects one? How would we test for compatibility?

I am wondering if we plan keeping all of those versions in sync somehow, ex. when we change the encoder version, do we also bump the chain objects one? How would we test for compatibility?
Author
Owner

Those are added by zx but could be omitted. The versions are clearly not in sync across projects (the version of serialization has never been in sync with bytecode or the compiler, for example).

Those are added by zx but could be omitted. The versions are clearly not in sync across projects (the version of serialization has never been in sync with bytecode or the compiler, for example).
dimitar.p.ivanov approved these changes 2025-01-22 14:58:15 +09:00
uwiger approved these changes 2025-01-22 15:45:23 +09:00
@ -51,0 +58,4 @@
% syncing a new node, for example).
blake2(Size, Bin) ->
try
enacl:generichash(Size, Bin)
Owner

Actually, the slowest part of the error throwing machinery isn't the catch (it's actually very fast if not capturing stacktraces, and pretty fast even then), but the code:ensure_loaded/1 call needed before throwing an undef error.

If we can know (through initialization logic) that enacl will be loaded at this point, if present at all, we can use erlang:function_exported(enacl, generichash, 2).

Actually, the slowest part of the error throwing machinery isn't the `catch` (it's actually very fast if not capturing stacktraces, and pretty fast even then), but the `code:ensure_loaded/1` call needed before throwing an `undef` error. If we can know (through initialization logic) that `enacl` _will_ be loaded at this point, if present at all, we can use `erlang:function_exported(enacl, generichash, 2)`.
Author
Owner

Does that make the failed case more efficient?
I'm not sure where in initialization we could discover which case we're in, so I left it at call time.

Does that make the failed case more efficient? I'm not sure *where* in initialization we could discover which case we're in, so I left it at call time.
zomp.meta Outdated
@ -0,0 +9,4 @@
{key_name,none}.
{a_email,[]}.
{c_email,[]}.
{copyright,"Hans Svensson"}.
Owner

Is this correct?

Is this correct?
Author
Owner

Ah, copyright, no. I think.

Ah, copyright, no. I think.
zxq9 marked this conversation as resolved
zxq9 added 1 commit 2025-01-22 17:02:06 +09:00
Update zomp meta copyright
All checks were successful
Gajumaru Serialization Tests / tests (push) Successful in -4m22s
ece32da3e8
zxq9 added 1 commit 2025-01-22 19:36:26 +09:00
Add app file back
All checks were successful
Gajumaru Serialization Tests / tests (push) Successful in -4m21s
749f7943d8
zxq9 merged commit 2db9ea6134 into master 2025-01-22 19:36:51 +09:00
zxq9 deleted branch zomp 2025-01-22 19:36:51 +09:00
zxq9 referenced this issue from a commit 2025-01-22 19:36:51 +09:00
Sign in to join this conversation.
No description provided.