{"id":23407665,"url":"https://github.com/bestia-dev/cargo_crev_web","last_synced_at":"2025-07-09T04:06:18.920Z","repository":{"id":105010800,"uuid":"259980973","full_name":"bestia-dev/cargo_crev_web","owner":"bestia-dev","description":"web server to query reviews from cargo-crev","archived":false,"fork":false,"pushed_at":"2025-04-01T19:59:01.000Z","size":12771,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T22:52:00.617Z","etag":null,"topics":["maintained","ready-for-use"],"latest_commit_sha":null,"homepage":"https://lucianobestia.github.io/cargo_crev_web","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/bestia-dev.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-29T16:31:23.000Z","updated_at":"2025-04-01T19:59:04.000Z","dependencies_parsed_at":"2024-03-29T20:30:09.373Z","dependency_job_id":"31e4d0f6-034b-4304-9c07-f87e889557cd","html_url":"https://github.com/bestia-dev/cargo_crev_web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bestia-dev/cargo_crev_web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestia-dev%2Fcargo_crev_web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestia-dev%2Fcargo_crev_web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestia-dev%2Fcargo_crev_web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestia-dev%2Fcargo_crev_web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestia-dev","download_url":"https://codeload.github.com/bestia-dev/cargo_crev_web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestia-dev%2Fcargo_crev_web/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264390709,"owners_count":23600563,"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":["maintained","ready-for-use"],"created_at":"2024-12-22T14:29:20.742Z","updated_at":"2025-07-09T04:06:18.898Z","avatar_url":"https://github.com/bestia-dev.png","language":"Rust","funding_links":["https://paypal.me/LucianoBestia"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD041 --\u003e\n[//]: # (auto_md_to_doc_comments segment start A)\n\n# Rust-reviews (working title cargo_crev_web)\n\n[//]: # (auto_cargo_toml_to_md start)\n\n**web server to query reviews from cargo-crev**  \n***version: 2020.822.1757 date: 2020-08-22 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/bestia-dev/cargo_crev_web)***  \n\n ![maintained](https://img.shields.io/badge/maintained-green) \n ![ready_for_use](https://img.shields.io/badge/ready_for_use-green) \n\n[//]: # (auto_cargo_toml_to_md end)\n\n[//]: # (auto_lines_of_code start)\n\n[![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-4270-green.svg)](https://github.com/bestia-dev/cargo_crev_web/)\n[![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-508-blue.svg)](https://github.com/bestia-dev/cargo_crev_web/)\n[![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-588-purple.svg)](https://github.com/bestia-dev/cargo_crev_web/)\n[![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/bestia-dev/cargo_crev_web/)\n[![Lines in tests](https://img.shields.io/badge/Lines_in_tests-57-orange.svg)](https://github.com/bestia-dev/cargo_crev_web/)\n\n[//]: # (auto_lines_of_code end)\n\n ![License](https://img.shields.io/badge/license-MIT-blue.svg)\n ![cargo_crev_web](https://bestia.dev/webpage_hit_counter/get_svg_image/489082694.svg)\n\nHashtags: #rustlang #buildtool #developmenttool #server #crev #review #web #html  \nMy projects on Github are more like a tutorial than a finished product: [bestia-dev tutorials](https://github.com/bestia-dev/tutorials_rust_wasm).\n\n\u003c!-- markdownlint-disable MD033 --\u003e\n\u003cimg src=\"https://github.com/bestia-dev/cargo_crev_web/raw/main/web_server_folder/web_content_folder/images/snip_01.png\" width=\"400\"/\u003e\u003cimg src=\"https://github.com/bestia-dev/cargo_crev_web/raw/main/web_server_folder/web_content_folder/images/snip_02.png\" width=\"400\"/\u003e\u003cimg src=\"https://github.com/bestia-dev/cargo_crev_web/raw/main/web_server_folder/web_content_folder/images/snip_03.png\" width=\"400\"/\u003e\u003cimg src=\"https://github.com/bestia-dev/cargo_crev_web/raw/main/web_server_folder/web_content_folder/images/snip_04.png\" width=\"400\"/\u003e\u003cimg src=\"https://github.com/bestia-dev/cargo_crev_web/raw/main/web_server_folder/web_content_folder/images/snip_05.png\" width=\"400\"/\u003e\n\u003c!-- markdownlint-enable MD033 --\u003e\n\n## Try it out\n\n\u003chttps://web.crev.dev/rust-reviews/crates\u003e  \n\n## Motivation\n\nCargo-crev is a system of review for Rust crates in crates.io.  \n\u003chttps://github.com/crev-dev/cargo-crev\u003e  \nOriginally it is a CLI that programmers use on their local machines while developing. The installation of cargo-crev is complicated and involving.  \nI would like to make a public cargo-crev web app to query reviews globally. Having a web app will be very good for promoting the crev system.  \nThis web app will try to show all publicly available reviews, so the community will have a broader understanding of the reviews and crates.  \nThe web server will use cargo-crev internally to fetch the reviews.  \n\n## CREV - Rust code reviews - Raise awareness\n\nPlease, spread this info !\\\nOpen source code needs a community effort to express trustworthiness.\\\nStart with reading the reviews of the crates on [web.crev.dev](https://web.crev.dev/rust-reviews/crates). \\\nThen install the GUI [cargo_crev_reviews](https://crates.io/crates/cargo_crev_reviews) or the CLI [cargo-crev](https://github.com/crev-dev/cargo-crev)\\.  \nYour personal reviews are most important. If you have a boss, he will sooner or later ask you if you reviewed all the dependencies. With [cargo_crev_reviews](https://crates.io/crates/cargo_crev_reviews) you have a basic tool to do that. \\\nWrite your reviews! Describe the crates you trust. Or warn about the crate versions you think are dangerous. Publish and share your opinion with other developers.\\\n\n## crates.io and lib.rs\n\nA similar web page is also created by @Kornelski at \u003chttps://lib.rs/crates/num-traits/crev\u003e.  \nlib.rs is an alternative index to crates.io.  \nCrates.io is the official Rust-lang storage of crates source code that is trusted and immutable.  \nLib.rs is focused on searching for crates in a categories with handy additional information.  \n\n## warp\n\nWarp is a web server written in Rust.  \n\u003chttps://github.com/seanmonstar/warp\u003e  \nIt will listen on port 8051 listens to http.  \n\n## Google vm\n\nA working web server is installed on my google vm.  \nThere is a nginx server reverse proxy that accepts https http2 on 443 and relay to internal 8051. Nginx also redirects all http 80 to https 443.  \nIn sites-available/default I added this lines:\n\n```nginx\n#region rust-reviews\n    #without the trailing / it is not a directory (for the server and for the browser)\n    #do the browser redirect 301\n    location = /rust-reviews {\n      return 301 /rust-reviews/;\n    }\n    #folder name only, pass to index.html on port 8051\n    location = /rust-reviews/ {\n      proxy_pass http://127.0.0.1:8051/index.html;\n      proxy_buffering off;\n    }\n    # the trailing / after both of these lines means this route is not appended to the forwarding\n    location /rust-reviews/ {\n      proxy_pass http://127.0.0.1:8051/;\n      proxy_buffering off;\n    }\n  #endregion\n```\n\n## screen (Linux program)\n\nMy application will run in background with the command \"screen\" with a session_name.  \nSo I can see all the stdout of the application easily.  \ncreate a new session  \n`screen -S cargo_crev_web_8051`,  \nconnect to an existing session  \n`screen -r cargo_crev_web_8051`,  \nSet the credentials for cargo-crev CLI in the env variable:  \n`(space) export CREV_PASSPHRASE=your_passphrase`  \nWarning: never write secrets in code or files that are published on Github.  \nAdd a space before the command to avoid it to be saved in bash history.\nstart the web server  \n`cd /var/www/webapps/cargo_crev_web; ./cargo_crev_web`  \nIf you want to scroll the screen session:  \n`ctrl+a ESC`  \nscroll with arrows or page-up, page-down. End scroll mode with:  \n`ESC`  \ndetach the session  \n`ctrl+a d`  \n\n## install cargo-crev to fetch reviews\n\nOn my web server I want to fetch the cargo-crev reviews from GitHub in regular intervals.  \nI need to install cargo-crev.  \nMy first attempt was to install Rust and cargo with rustup with minimal profile.\n`curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal`  \nThen I tried to install cargo-crev with cargo:  \n`cargo install cargo-crev`  \nIt was a disaster. I have the smallest, tiniest possible VM and it looks that compiling the source code of cargo-crev is too much for it. I tried 3 times, waited for a few hours and it didn't succeed. I then deleted the big folder `~/.cargo/registry/src` to free some disk space.  \nFortunately there is a binary release already compiled here:  \n`https://github.com/crev-dev/cargo-crev/releases/download/v0.16.1/cargo-crev-v0.16.1-x86_64-unknown-linux-musl.tar.gz`  \nI unzip it twice and saved the binary file `cargo-crev` in:  \n`~/.cargo/bin`  \n\n## GitHub crev-proofs\n\nI followed the instructions [getting_started](https://github.com/crev-dev/cargo-crev/raw/main/cargo-crev/src/doc/getting_started.md).  \nI created a new GitHub user: `cargo-crev-web`. I wanted to name it `cargo_crev_web`, but underscore is not allowed :-( So now I have inconsistent names :-(  \nI used my second email, because my first email is used for my personal GitHub bestia-dev.  \nOn the google vm web server I created an SSH key and copied the key to GitHub to have SSH access.  \nI forked the template \u003chttps://github.com/crev-dev/crev-proofs\u003e.  \nFor git fetch and reindex I will open a new screen session:  \n`screen -S cargo_crev_web_git`  \nto reconnect later:  \n`screen -r cargo_crev_web_git`  \nI will need the credentials for ssh for GitHub:  \n`eval $(ssh-agent -s)`  \n`ssh-add ~/.ssh/bestia2_for_github`  \ncreate new crev id with my new github repo:  \n`cargo crev id new --url https://github.com/cargo-crev-web/crev-proofs`  \nadd the trusted user `dpc`, the author of cargo-crev:  \n`cargo crev trust --level medium https://github.com/dpc/crev-proofs`  \nPush my crev data to github:  \n`cargo crev repo publish`  \n\n## trusted reviewers\n\nFor the purpose of showing all public reviews, `cargo_rev_web` will \"trust --level low\" everybody.  \nI will personally, manually maintain this list.  \nI have a function that searches Github for all crev-proofs repositories. Beside this, the command `cargo crev id query all` returns a list of all repos found in locally cached crev files (trusted people from trusted people).\nThen I manually check every repository if it's correct: it has to contain a crev-id and some reviews in the correct format.  \nIf the repo is correct then \"cargo crev trust --level low repo\". If not I add it to \"blocklisted repos\" with a description what is wrong.  \n\n## Linux scheduler\n\nI need to call every hour:  \n`cargo crev repo fetch trusted`\nto have fresh reviews available locally in `~/.cache/crev/`.  \nThe Linux scheduler `crontab` is ok, but I miss something more visual.  \nI wrote \u003chttps://github.com/bestia-dev/foreground_scheduler\u003e to do this.  \nIt is a normal CLI and it is easy to read the output on the screen.  \nTo make this run indefinitely in another terminal session I use `screen`.\nOpen a new screen session:  \n`screen -S cargo_crev_web_git`  \nto reconnect later:  \n`screen -r cargo_crev_web_git`  \nThe script is stored in `/var/www/scripts/cargo_crev_web_fetch_reindex.sh`\nI run it (every 5th minute of every hour):  \n`foreground_scheduler 05 /bin/bash \"/var/www/scripts/cargo_crev_web/cargo_crev_web_fetch_reindex.sh\"`  \nTo stop it:  \n`ctrl+c`  \n\n## testing .cache/crev\n\nNot all data is required in every review, so I need to test examples that contains different data.  \n\u003chttps://web.crev.dev/rust-reviews/crate/btoi\u003e  alternatives  \n\u003chttps://web.crev.dev/rust-reviews/crate/num-traits/\u003e  issues  \n\u003chttps://web.crev.dev/rust-reviews/crate/protobuf\u003e  advisory old  \n\u003chttps://web.crev.dev/rust-reviews/crate/inventory\u003e   advisories\n\nLocally in development is the same, just the server is 127.0.0.1:8051/.  \n\n## html templating\n\nLike many developers I also suffer from \"graphical designitis\".  \nIt is very hard for me to find the exact color variations and shape proportions and subtle font differences to make a web page beautiful. It is not lack of knowledge of html and css. It is lack of style and taste.  \nSimply unrepairable!  \nSo I created a simple html templating system to separate the graphical designer work from the developer work. As much as possible.  \nFirst the graphical designer prepares a nice html+css with static data, that looks awesome.  \nThe 2 files are on his local disk and don't need any server or configuration. The static data must be as realistic as possible.  \nThen I add comments that are commands where to insert the dynamic data. This comments don't destroy the original html. That html can still be visualized statically from the disk. It is easy to add to or modify the design. Just avoid to touch the comments.  \nOn the web server the HtmlTemplating trait takes the template and inserts the dynamic data.  \nThe result is normal html and is sent to the browser.\n\n## markdown md to html\n\nI use the Rust comrak lib to convert the review comment from md to html.  \n\n## Badges\n\nA service for SVG badges for `crev count of reviews for one crate` is on url:\\\n\u003chttps://web.crev.dev/rust-reviews/badge/crev_count/reader_for_microxml.svg\u003e\\\nExample how it looks like on GitHub:\\\n\u003chttps://github.com/bestia-dev/reader_for_microxml/\u003e  \n\n```markdown\n[![crev reviews](\nhttps://web.crev.dev/rust-reviews/badge/crev_count/reader_for_microxml.svg\n)](https://web.crev.dev/rust-reviews/crate/reader_for_microxml/)\n```\n\n### xhtml validator\n\nManually coded xhtml can be full of \"bugs\".\\\nThe validator will quickly find them out.\\\nI would like to have this tool inside VsCode.\\\n\u003chttps://www.liquid-technologies.com/online-xml-validator\u003e\n\n## CodeTour\n\nI like very much the VSCode extension CodeTour.  \nIt makes a special kind of documentation that shows the code flow.  \nNo other type of documentation is so useful as this.  \nIt works only in VSCode. I made an export to md utility because is so much easier to distribute the md file around.  \n\n## javascript Click to Copy\n\nI used \u003chttps://clipboardjs.com/\u003e for Click to Copy.  \nFor tooltips I used \u003chttps://chrisbracco.com/a-simple-css-tooltip/\u003e  \n\n## colors\n\nEvery person on this planet would like to have different colors. That is human nature. Or just nature's statistical dispersion to increase chance of survival when the environment changes dramatically...  \nTo build a website that satisfies everybody's taste for color is impossible.  \nEven hoping to satisfy a few close friends is mission impossible.  \nSo there is this Chrome extension named User Css:  \n\u003chttps://chrome.google.com/webstore/detail/user-css/okpjlejfhacmgjkmknjhadmkdbcldfcb\u003e  \nYou write a css in your browser and while you are typing it immediately changes the look of the webpage.  \nIn the webpage \u003chttps://web.crev.dev/rust-reviews/\u003e you can find a basic css for the color palette. Just Click-to-Copy and try it in User Css. Then change colors to your liking.  \nAt the end save the css for the next time you visit the website.  \nIf somebody is very happy with his/her user css, please send it to me. I will make it available to other users. They will be happy. Humans love colors - different colors.  \n\n## ideas\n\nThe same web server can easily run on the local machine of the developer.  \nIt is just one single binary executable file.  \nIt will read only the trusted reviews specific to that developer.  \nSo now we have a local web server and a browser. It means we have now the possibility to make a beautiful GUI for cargo-crev that works on any OS and remotely also. Good.  \nThis local server will ue crev-lib to access the crev functionality.  \n\n## Stats\n\n\u003chttps://github.com/bestia-dev/cargo_crev_web/issues/4\u003e\n\n## References\n\n\u003chttps://github.com/rustomax/rust-iterators\u003e  \n\n## Open-source and free as a beer\n\nMy open-source projects are free as a beer (MIT license).  \nI just love programming.  \nBut I need also to drink. If you find my projects and tutorials helpful, please buy me a beer by donating to my [PayPal](https://paypal.me/LucianoBestia).  \nYou know the price of a beer in your local bar ;-)  \nSo I can drink a free beer for your health :-)  \n[Na zdravje!](https://translate.google.com/?hl=en\u0026sl=sl\u0026tl=en\u0026text=Na%20zdravje\u0026op=translate) [Alla salute!](https://dictionary.cambridge.org/dictionary/italian-english/alla-salute) [Prost!](https://dictionary.cambridge.org/dictionary/german-english/prost) [Nazdravlje!](https://matadornetwork.com/nights/how-to-say-cheers-in-50-languages/) 🍻\n\n[//bestia.dev](https://bestia.dev)  \n[//github.com/bestia-dev](https://github.com/bestia-dev)  \n[//bestiadev.substack.com](https://bestiadev.substack.com)  \n[//youtube.com/@bestia-dev-tutorials](https://youtube.com/@bestia-dev-tutorials)  \n\n[//]: # (auto_md_to_doc_comments segment end A)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestia-dev%2Fcargo_crev_web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestia-dev%2Fcargo_crev_web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestia-dev%2Fcargo_crev_web/lists"}