{"id":21500255,"url":"https://github.com/clucompany/cluconcatbytes","last_synced_at":"2025-03-17T13:15:37.297Z","repository":{"id":57606483,"uuid":"178850842","full_name":"clucompany/cluConcatBytes","owner":"clucompany","description":"Merges literals into a static array. Plugin for compiler.","archived":false,"fork":false,"pushed_at":"2019-08-23T17:17:06.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T06:55:55.871Z","etag":null,"topics":["clucompany","concat","concat-byte-array","concat-bytes","rust-library","rust-plugin"],"latest_commit_sha":null,"homepage":"","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/clucompany.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}},"created_at":"2019-04-01T11:41:45.000Z","updated_at":"2019-08-23T17:17:08.000Z","dependencies_parsed_at":"2022-09-21T02:01:09.967Z","dependency_job_id":null,"html_url":"https://github.com/clucompany/cluConcatBytes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clucompany%2FcluConcatBytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clucompany%2FcluConcatBytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clucompany%2FcluConcatBytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clucompany%2FcluConcatBytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clucompany","download_url":"https://codeload.github.com/clucompany/cluConcatBytes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244039241,"owners_count":20387835,"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":["clucompany","concat","concat-byte-array","concat-bytes","rust-library","rust-plugin"],"created_at":"2024-11-23T17:23:06.240Z","updated_at":"2025-03-17T13:15:37.276Z","avatar_url":"https://github.com/clucompany.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cluConcatBytes\n\n[![Build Status](https://travis-ci.org/clucompany/cluConcatBytes.svg?branch=master)](https://travis-ci.org/clucompany/cluConcatBytes)\n[![Apache licensed](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE)\n[![crates.io](http://meritbadge.herokuapp.com/cluConcatBytes)](https://crates.io/crates/cluConcatBytes)\n[![Documentation](https://docs.rs/cluConcatBytes/badge.svg)](https://docs.rs/cluConcatBytes)\n\nMerges literals into a static array. Plugin for compiler.\n\n\n# Use\n\n1. Easy use\n\n```rust\n#![feature(plugin)]\n#![plugin(cluConcatBytes)]\n\nfn main() {\n\tlet c_str = concat_bytes!(\"cluWorld\");\n\t//\u0026'static [u8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(c_str, b\"cluWorld\");\n\t\n\t\n\tlet c_str2 = concat_bytes!(\"clu\", b\"World\");\n\t//\u0026'static [u8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(c_str2, b\"cluWorld\");\n\t\n\tlet c_str3 = concat_bytes!(\n\t\tb'c', b'l', b'u',\n\t\tb'W', b'o', b'r', b'l', b'd'\n\t);\n\t//\u0026'static [u8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(c_str3, b\"cluWorld\");\n\t\n\tlet c_str4 = concat_bytes!(\n\t\t\"clu\", b'W', b'o', b'r', b'l', b\"d\"\n\t);\n\t//\u0026'static [u8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(c_str4, b\"cluWorld\");\n\t\n\tmy_function(c_str);\n\tmy_function(c_str2);\n\tmy_function(c_str3);\n\tmy_function(c_str4);\n}\n\nfn my_function(array:  \u0026'static [u8]) {\n\t//'static --\u003e it is possible not to write.\n\t\n\tprintln!(\"array: {:?}, len: {}\", array, array.len());\n}\n```\n\n2. Raw use\n\n```rust\n#![feature(plugin)]\n#![plugin(cluConcatBytes)]\n\nfn main() {\n\tlet c_str = concat_bytes!(@\"cluWorld\");\n\t//[u8; 8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(\u0026c_str, b\"cluWorld\");\n\t\n\t\n\tlet c_str2 = concat_bytes!(@\"cluWorld\");\n\t//[u8; 8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(\u0026c_str2, b\"cluWorld\");\n\t\n\t\n\tlet c_str3 = concat_bytes!(@\"clu\", b\"World\");\n\t//[u8; 8]\n\t//array: [99, 108, 117, 87, 111, 114, 108, 100], len: 8\n\tassert_eq!(\u0026c_str3, b\"cluWorld\");\n\t\n\tmy_function(c_str);\n\tmy_function(c_str2);\n\tmy_function(c_str3);\n}\n\nfn my_function(array:  [u8; 8]) {\n\t//'static --\u003e it is possible not to write.\n\t\n\tprintln!(\"array: {:?}, len: {}\", array, array.len());\n}\n```\n\n# License\n\nCopyright 2019 #UlinProject Denis Kotlyarov (Денис Котляров)\n\nLicensed under the Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclucompany%2Fcluconcatbytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclucompany%2Fcluconcatbytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclucompany%2Fcluconcatbytes/lists"}