{"id":13652737,"url":"https://github.com/nervosnetwork/molecule","last_synced_at":"2025-04-12T20:42:13.620Z","repository":{"id":35392023,"uuid":"193475722","full_name":"nervosnetwork/molecule","owner":"nervosnetwork","description":"Another serialization system: minimalist and canonicalization.","archived":false,"fork":false,"pushed_at":"2025-03-17T04:23:29.000Z","size":636,"stargazers_count":39,"open_issues_count":7,"forks_count":24,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-04T00:08:03.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nervosnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-24T09:32:27.000Z","updated_at":"2025-03-14T03:59:21.000Z","dependencies_parsed_at":"2024-02-01T04:22:13.900Z","dependency_job_id":"292e61e2-134b-4df8-b484-517f62a5ce08","html_url":"https://github.com/nervosnetwork/molecule","commit_stats":{"total_commits":207,"total_committers":18,"mean_commits":11.5,"dds":"0.34782608695652173","last_synced_commit":"4988418dd65c398b5eab2bc22bc125b72ceeb4b9"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fmolecule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fmolecule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fmolecule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervosnetwork%2Fmolecule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervosnetwork","download_url":"https://codeload.github.com/nervosnetwork/molecule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631668,"owners_count":21136554,"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":[],"created_at":"2024-08-02T02:01:02.166Z","updated_at":"2025-04-12T20:42:13.592Z","avatar_url":"https://github.com/nervosnetwork.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Other"],"readme":"# Molecule\n\n[![License]](#license)\n[![GitHub Actions]](https://github.com/nervosnetwork/molecule/actions)\n\nAnother serialization system: minimalist and canonicalization.\n\n[License]: https://img.shields.io/badge/License-MIT-blue.svg\n[GitHub Actions]: https://github.com/nervosnetwork/molecule/workflows/CI/badge.svg\n\n## Documents\n\n- [Encoding Spec](docs/encoding_spec.md)\n- [Schema Language](docs/schema_language.md)\n- [Real-World Examples](docs/real_world_examples.md)\n- [API](docs/molecule_api.md)\n\n## Features\n* `default` — Default features: `std`, utilizes `faster-hex` for hexadecimal operations and enables [bytes] standard features.\n* `std` (enabled by default)  — Default features: `std`, utilizes `faster-hex` for hexadecimal operations and enables [bytes] standard features.\n* `bytes_vec` - Introduced in version 0.8, the 0.8 molecule defaults to [bytes], which has implications for use in the CKB runtime. The `bytes_vec` feature provides users with a compatibility option to maintain consistency with previous versions.\n\n## Use in CKB scripts\nWhen used in CKB scripts, no-std needs to be specified.\n\n```toml\nmolecule = { version = \"0.7\", default-features = false }\n```\n\nParticularly, for versions later than 0.8, you need to additionally specify the bytes_vec feature.\n\n```toml\nmolecule = { version = \"0.8.0\", default-features = false, features = [\"bytes_vec\"] }\n```\n\n\n## Tools\n\n### Schema Compiler and Code Generator\n\n#### Install\n\nThe official schema compiler and code generator are written in [Rust], so\nyou can install it via [Cargo]:\n\n```sh\ncargo install moleculec --locked\n```\n\n**Note: the official code generator is only support two languages: [Rust] and [C].**\n\n#### Usage\n\n- You can use the follow command to generate the code:\n\n  ```sh\n  moleculec --language \u003clanguage\u003e --schema-file \u003cschema-file\u003e\n  ```\n\n- More details can be found by the follow command:\n\n  ```sh\n  moleculec --help\n  ```\n\n### Other Languages\n\nMolecule's reference implementation is in Rust and C.\n\nImplementations in other languages are maintained by respective authors.\n\n- [Go](https://github.com/driftluo/moleculec-go)\n- [Modern JavaScript](https://github.com/xxuejie/moleculec-es)\n\n### Plugins for Editors\n\n- [Emacs](https://github.com/yangby-cryptape/emacs-molecule)\n- [Vim](https://github.com/yangby-cryptape/vim-molecule)\n- [Sublime Text](https://github.com/yangby-cryptape/sublimetext-molecule)\n\n## Benchmark\n\n- [Benchmark in Rust with serde](https://github.com/nervosnetwork/serde_bench)\n\n## Supported Rust Versions\n\nThe minimum supported version is 1.75.0.\nThe current Molecule version is not guaranteed to build on Rust versions earlier than the\nminimum supported version.\n\n## License\n\nLicensed under [MIT License].\n\n[MIT License]: LICENSE\n\n[Rust]: https://www.rust-lang.org/\n[Cargo]: https://doc.rust-lang.org/cargo/\n[C]: https://en.wikipedia.org/wiki/C_%28programming_language%29\n[bytes]: https://github.com/tokio-rs/bytes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fmolecule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervosnetwork%2Fmolecule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervosnetwork%2Fmolecule/lists"}