{"id":19874097,"url":"https://github.com/pythoninthegrass/hello_rust","last_synced_at":"2025-03-01T01:22:57.085Z","repository":{"id":261689497,"uuid":"885048014","full_name":"pythoninthegrass/hello_rust","owner":"pythoninthegrass","description":"Toy app to test cargo builds","archived":false,"fork":false,"pushed_at":"2025-02-07T22:56:26.000Z","size":23,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T21:49:54.823Z","etag":null,"topics":["cargo","docker","rust"],"latest_commit_sha":null,"homepage":"","language":"Earthly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-07T21:26:34.000Z","updated_at":"2024-11-12T01:16:28.000Z","dependencies_parsed_at":"2024-11-07T22:33:49.516Z","dependency_job_id":"36578e19-d403-4215-b4fe-dc94743c0a35","html_url":"https://github.com/pythoninthegrass/hello_rust","commit_stats":null,"previous_names":["pythoninthegrass/hello_rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fhello_rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fhello_rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fhello_rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fhello_rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/hello_rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241301730,"owners_count":19940697,"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":["cargo","docker","rust"],"created_at":"2024-11-12T16:21:41.244Z","updated_at":"2025-03-01T01:22:57.066Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Earthly","readme":"# hello_rust\n\nToy app to test cargo builds\n\n## Minimum Requirements\n\n* [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n* [rust](https://www.rust-lang.org/tools/install)\n* [docker](https://docs.docker.com/get-docker/)\n\n## Quickstart\n\n```bash\ncargo build\ncargo run\n```\n\n## Docker\n\n```bash\ndocker build -t hello-rust .\ndocker run --name=hello-rust -it --rm \\\n    -p 8000:8000 \\\n    --env-file=.env \\\n    hello-rust\n```\n\n## Earthfile\n\n```bash\n# run a single target\nearthly +build\n\n# debug the build\nearthly -i +build\n\n# execute all targets needed to build the image\nearthly +docker\n\n# build for arm64 and amd64\nearthly +all\n\n# push to registry\nearthly --push +\u003ctarget\u003e \n\n# interactive shell\nearthly --interactive +\u003ctarget\u003e\n```\n\n## Benchmarks\n\n```bash\n# install hyperfine\nbrew install hyperfine\n\n# run benchmarks (native arch)\nhyperfine \\\n    --prepare 'docker rmi ghcr.io/pythoninthegrass/hello_rust || true' \\\n    --warmup 1 \\\n    --runs 2 \\\n    'earthly +build'\n    --export-markdown earthly_bench.md\n\n# run docker and earthly benchmarks via task\ntask benchmark\n```\n\n## TODO\n\n* benchmarks ([hyperfine](https://github.com/sharkdp/hyperfine?tab=readme-ov-file#warmup-runs-and-preparation-commands))\n  * cargo\n  * ~~docker~~\n  * ~~earthfile~~\n* earthly\n  * ~~enable push to registry~~\n  * ~~git credentials for private repo~~\n  * secrets / .env file\n\n## Further Reading\n\n* [Tips For Faster Rust Compile Times | corrode Rust Consulting](https://corrode.dev/blog/tips-for-faster-rust-compile-times/)\n* [Making Your Docker Builds Faster with cargo-chef - Earthly Blog](https://earthly.dev/blog/cargo-chef/)\n* [Fast multi-arch Docker build for Rust projects :: vnotes](https://vnotes.pages.dev/fast-multi-arch-docker-for-rust/)\n* [Kobzol/cargo-wizard: Cargo subcommand for configuring Cargo projects for best performance.](https://github.com/Kobzol/cargo-wizard?tab=readme-ov-file#usage)\n* [Speeding up the Rust edit-build-run cycle | David Lattimore](https://davidlattimore.github.io/posts/2024/02/04/speeding-up-the-rust-edit-build-run-cycle.html)\n* [How-to compile rust faster - Rust.Careers Rust Blog](https://blog.rust.careers/post/compile_rust_faster/)\n* [Accelerating Rust compilation times: Dynamic linking, code generation and cache](https://nicoan.github.io/posts/accelerating_compile_times/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fhello_rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Fhello_rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fhello_rust/lists"}