I hereby claim:
- I am maennchen on github.
- I am maennchen (https://keybase.io/maennchen) on keybase.
- I have a public key ASBgYnFi6nFzi1CvGeuF-09XLdcERWU8xaYYLOs3mZvoZgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This post explores how you can write and publish a library that can be used directly in Erlang without the need to install Elixir, but also provide convenient Elixir bindings.
Writing a multi-language library comes with some complexity. It therefore makes sense to ask yourself first, if the additional work & complexity is worth the effort.
Any library written in Erlang and published to Hex, can also be used in Elixir.
Instead of calling SomeModule.function(...)
, you can also call :some_module.function(...)
directly.
Language | Search Phrase | Hits | Link |
---|---|---|---|
Erlang | public_key:decrypt_private |
342 | https://github.com/search?type=code&auto_enroll=true&q=%22public_key%3Adecrypt_private%22+language%3AErlang&l=Erlang |
Erlang | crypto:private_decrypt |
337 | https://github.com/search?type=code&auto_enroll=true&q=%22crypto%3Aprivate_decrypt%22+language%3AErlang+ |
Erlang | public_key:encrypt_public |
330 | https://github.com/search?type=code&auto_enroll=true&q=%22public_key%3Aencrypt_public%22+language%3AErlang |
Erlang | crypto:public_encrypt |
203 | https://github.com/search?type=code&auto_enroll=true&q=%22crypto%3Apublic_encrypt%22+language%3AErlang+ |
Elixir | :public_key.decrypt_private |
49 | https://github.com/search?type=code&auto_enroll=true&q=%22%3Apublic_key.decrypt_private%22+language%3AElixir |
Elixir | :crypto.private_decrypt |
8 | https://github.com/search?type=code&auto_enroll=true&q=%22%3Acrypto.private_decrypt%22+language%3AElixir |
Elixir | :public_key.encrypt_public |
#! /workspace/bin/elixir | |
require Logger | |
supported_extensions = ~w[.ex .exs .erl .md .cheatmd .yml .yrl .hrl .src .escript .jsonc] | |
root = Path.dirname(__ENV__.file) | |
{tracked_files, 0} = System.cmd("git", ["ls-files"], into: [], lines: 1024, cd: root) |