{"id":23951104,"url":"https://github.com/grakshith/crust","last_synced_at":"2025-10-29T17:50:54.714Z","repository":{"id":93396150,"uuid":"255494940","full_name":"grakshith/crust","owner":"grakshith","description":"CS 263 project","archived":false,"fork":false,"pushed_at":"2020-06-09T05:10:44.000Z","size":2348,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T05:43:38.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","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/grakshith.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,"zenodo":null}},"created_at":"2020-04-14T02:53:39.000Z","updated_at":"2020-06-15T18:56:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ad8ac54-af48-478a-8516-34bdba0a0db5","html_url":"https://github.com/grakshith/crust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grakshith/crust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grakshith%2Fcrust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grakshith%2Fcrust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grakshith%2Fcrust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grakshith%2Fcrust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grakshith","download_url":"https://codeload.github.com/grakshith/crust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grakshith%2Fcrust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281669346,"owners_count":26541403,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-01-06T12:58:46.214Z","updated_at":"2025-10-29T17:50:54.677Z","avatar_url":"https://github.com/grakshith.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crust\n\n## About\nA small project to compare different features of Rust and C++ as a systems programming language.\n\n## Instructions to Compile\n### Rust installation\n`rustc` is the compiler that is used. To install Rust on a Unix-like OS run the following command\n```bash\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\nFor all the ways to install rust please visit this site: https://www.rust-lang.org/tools/install\n### Code Compilation\n#### Rust\nAll the Rust implementations are present in the directory [src/rs/src](https://github.com/grakshith/crust/tree/master/src/rs/src). Run the following instructions to go to that directory from the root of this project and compile all the Rust codes\n```bash\ncd src/rs/src\n./compile.sh\n```\nThis will compile all the Rust src and put the executables in the directory [src/rs/bin](https://github.com/grakshith/crust/tree/master/src/rs/bin) (path wrt project root)\n```bash\ncd ../bin\n```\n#### C++\nAll the C++ src files are present in the directory [src/cxx](https://github.com/grakshith/crust/tree/master/src/cxx). Run the following instructions to go to that directory from the root of this project and compile all the C++ codes\n```bash\ncd src/cxx\nmake\n```\nThis will compile all the C++ src and put the executables in the directory src/cxx/bin (path wrt project root)\n```bash\ncd bin\n```\n## Instructions to benchmark\nThe [benchmark.py](https://github.com/grakshith/crust/tree/master/src/benchmark.py) in the `src` directory, contains the Python script which runs the all the executables. It uses the `config.json` as a guide to run which executables. After it runs it stores the output in the file called `results-{date}_{time}.json` in the directory [src/results](https://github.com/grakshith/crust/tree/master/src/results) (path wrt to project root).\n\n### config.json\nEdit the [config.json](https://github.com/grakshith/crust/tree/master/src/config.json) inside the src folder as follows.\n\nTo add an executable to compare with the others add an object like the following\n```JavaScript\n{\n    \"binaries\": [\n    {...},\n    {\n        \"name\": \"An easy name to identify in the result.json\",\n        \"command\": \"Location of the binary along with its argument like how you would run from the terminal\",\n        \"iterations\": 10 //An integer value specifying the number of times the code will be run\n    },\n    {\n        \"name\": \"Linked list in Rust\",\n        \"command\": \"rs/bin/linked_list\",\n        \"iterations\": 100\n    }\n    {...}\n    ]\n}\n```\n\n### Running the benchmark\nWe used Python 3.5 version of Python. To run the benchmark simply run the following command\n```bash\npython benchmark.py\n```\nAfter executing all the binaries the result will be stored in the `results-{date}_{time}.json` file. It has the following structure\n```JavaScript\n{\n    \"results\": [\n    {...},\n    {\n        \"name\": \"The same you used in config.json\",\n        \"iterations\": 100, // An integer specifying the number of times the code was run\n        \"time_unit\": \"us\", // Represents micro-seconds\n        \"mean\": 1234.56, // mean time taken by the executable across all the runs\n        \"median\": 1234.56, // the median of all the times taken by the executable\n        \"stddiv\": 123.56 // the standard deviation of execution times across all the runs\n    }\n    {...}\n    ]\n}\n```\n\n### Requirements\nTested on a new anaconda environment with Python 3.5, the only required package was `psutil`. Run the following command to install this requirement\n```bash\npip install -r requirements.txt\n# or simply\npip install psutil\n```\nIf it shows any other dependency required just install them using `pip`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrakshith%2Fcrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrakshith%2Fcrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrakshith%2Fcrust/lists"}