{"id":15176417,"url":"https://github.com/seriyps/rust-erl-ext","last_synced_at":"2025-09-20T13:32:09.230Z","repository":{"id":18907231,"uuid":"22125759","full_name":"seriyps/rust-erl-ext","owner":"seriyps","description":"Erlang external term format codec for Rust language.","archived":false,"fork":false,"pushed_at":"2016-04-06T11:57:51.000Z","size":68,"stargazers_count":46,"open_issues_count":1,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-02T10:11:43.836Z","etag":null,"topics":["bert","binary-to-term","codec","erlang","rust","term-to-binary"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seriyps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-23T00:16:19.000Z","updated_at":"2024-09-12T12:36:21.000Z","dependencies_parsed_at":"2022-08-05T01:15:33.047Z","dependency_job_id":null,"html_url":"https://github.com/seriyps/rust-erl-ext","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriyps%2Frust-erl-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriyps%2Frust-erl-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriyps%2Frust-erl-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriyps%2Frust-erl-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seriyps","download_url":"https://codeload.github.com/seriyps/rust-erl-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233665639,"owners_count":18710921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert","binary-to-term","codec","erlang","rust","term-to-binary"],"created_at":"2024-09-27T13:04:08.162Z","updated_at":"2025-09-20T13:32:03.944Z","avatar_url":"https://github.com/seriyps.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rust Erl Ext\n============\n\n[Erlang external term format](http://erlang.org/doc/apps/erts/erl_ext_dist.html)\nparser/serializer for Rust.\n\n[![Build Status](https://travis-ci.org/seriyps/rust-erl-ext.png?branch=master)](https://travis-ci.org/seriyps/rust-erl-ext)\n\nExamples\n-------\n\nDecoding\n\n```rust\nextern crate erl_ext;\nuse erl_ext::Decoder;\n\nfn main() {\n    let mut decoder = Decoder::new(\u0026mut io::stdin());\n    assert!(true == decoder.read_prelude().unwrap());\n    println!(\"{}\", decoder.decode_term().unwrap());\n}\n```\n\nEncoding\n\n```rust\nextern crate erl_ext;\nuse erl_ext::{Eterm, Encoder};\n\nfn main() {\n    let term = Eterm::List(vec!(Eterm::SmallInteger(1),\n                                Eterm::Integer(1000000),\n                                Eterm::Nil));\n    // this combination of options make it compatible with erlang:term_to_binary/1\n    let utf8_atoms = false;\n    let small_atoms = false;\n    let fair_new_fun = true;\n    let mut encoder = Encoder::new(\u0026mut io::stdout(),\n                                   utf8_atoms, small_atoms, fair_new_fun);\n    encoder.write_prelude();\n    encoder.encode_term(term);\n}\n```\n\nMore examples are in `examples` directory.\n\nTypes (all Erlang 17.1 types are supported):\n\n* SmallInteger (u8)     : `0..255`\n* Integer (i32)         : `integer()`\n* Float (f64)           : `float()`\n* Atom (String)         : `atom()`\n* Reference             : `reference()` `erlang:make_ref/0`\n* Port                  : `port()` eg, socket or raw file or `erlang:open_port/2`\n* Pid                   : `pid()`\n* Tuple (`Vec\u003cEterm\u003e`)  : `{ any() }`\n* Map (`Vec\u003c(Eterm, Eterm)\u003e`) : `#{any() := any()}`\n* Nil                   : `[]`\n* String (`Vec\u003cu8\u003e`)    : `[0..255]`\n* List (`Vec\u003cEterm\u003e`)   : `[ any() ]`\n* Binary (`Vec\u003cu8\u003e`)    : `binary()`\n* BigNum (`BigInt`)     : `integer() \u003e i32`\n* Fun                   : `fun(..) -\u003e ... end.` - deprecated variant\n* NewFun                : `fun(..) -\u003e ... end.`\n* Export                : `fun my_mod:my_fun/1`\n* BitBinary             : `\u003c\u003c128, 128:4\u003e\u003e`\n\n\nTODO\n----\n\n* `serialize::Decoder` and `serialize::Encoder` implementations (not so easy for containers)\n* Quick-Check - like tests (feed pseudo-random bytes to decoder, feed random Eterm's to encoder)\n\nKeywords\n--------\n\n* Rust\n* Erlang\n* BERT\n* External term format\n* term_to_binary, binary_to_term\n* parser, serializer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseriyps%2Frust-erl-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseriyps%2Frust-erl-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseriyps%2Frust-erl-ext/lists"}