{"id":16114879,"url":"https://github.com/asaaki/wargo","last_synced_at":"2025-03-16T08:32:42.602Z","repository":{"id":38032759,"uuid":"441260029","full_name":"asaaki/wargo","owner":"asaaki","description":"cargo's evil twin to work with projects in the twilight zone of WSL2","archived":false,"fork":false,"pushed_at":"2025-03-10T18:31:24.000Z","size":565,"stargazers_count":15,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T00:02:06.140Z","etag":null,"topics":["cargo","cargo-plugin","cargo-subcommand","rust","windows","windows-10","wsl2"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/wargo","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/asaaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-12-23T18:05:47.000Z","updated_at":"2025-03-10T18:31:28.000Z","dependencies_parsed_at":"2023-02-17T23:30:50.153Z","dependency_job_id":"c13beb8b-836c-4a4f-a950-98c05cca4ef2","html_url":"https://github.com/asaaki/wargo","commit_stats":{"total_commits":74,"total_committers":2,"mean_commits":37.0,"dds":"0.32432432432432434","last_synced_commit":"4aa56745078cbc9127fa15baaad4b61d2ba9eee1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Fwargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Fwargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Fwargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Fwargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asaaki","download_url":"https://codeload.github.com/asaaki/wargo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243807354,"owners_count":20350989,"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","cargo-plugin","cargo-subcommand","rust","windows","windows-10","wsl2"],"created_at":"2024-10-09T20:16:16.970Z","updated_at":"2025-03-16T08:32:42.237Z","avatar_url":"https://github.com/asaaki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\" title=\"wargo\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/asaaki/wargo/main/.assets/logo-temp@2x.png\" width=128 height=128 title=\"wargo\"\u003e\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n\n_cargo's evil twin to work with projects in the twilight zone of WSL2_\n\n\u003c/div\u003e\u003cbr /\u003e\n\n## Motivation\n\nThe gist of the issue is the following:\n\n\u003e You work with both Windows and WSL2.\n\u003e Your repositories live on a NTFS partition.\n\u003e Therefore the compilation performance within WSL2 will suffer,\n\u003e because the files have to cross the VM/file system boundaries.\n\nSlightly more elaborate background and reasoning can be found in my article on [how to speed up Rust compilation].\n\n## Solution\n\nOne approach is to copy the files into a location within WSL which is a Linux based filesystem (like ext4) and do the compilation from there. Optionally you need to copy the artifacts back to the origin.\n\n`wargo` does that as a wrapper around cargo:\n\n- copy the project into a Linux location\n- run the provided cargo command\n- copy back the artifacts\n\nCurrently it does this in a very simple and naive way; workspaces should work out of the box, but mostly I use single package projects.\nAlso tweaks with the target folder may or may not work properly, the defaults are usually fine for me anyway.\n\nThere are some optional features possible, but current state is pretty complete for my personal use cases.\n\nIf you believe there is a feature missing or a tweak necessary, feel free to open a pull request or an issue.\n\n## Usage\n\n### Installation\n\n```sh\ncargo install wargo --locked\n```\n\n### Wargo.toml (optional)\n\nAdd a basic `Wargo.toml` to your project if you want to configure the behaviour.\nThe wargo wrapper does not accept any CLI arguments on its own, so a config file is the only option for now.\n\n```toml\n# Wargo.toml\n\n# this is also the default\ndest_base_dir = \"~/tmp\"\n```\n\nThe file could be completely empty, but at least `dest_base_dir` is good to specify.\nUse either a location in your home dir (`~`) or any other absolute path, which is **not** an NTFS file system.\n\nSee a complete and commented example [here].\n\n### Run it\n\n```sh\n# instead of `cargo` just replace it with `wargo`:\nwargo check\nwargo build\nwargo build --release\nwargo run\n\n# alternatively also callable as a cargo subcommand `wsl`:\ncargo wsl build\n```\n\n## Safety\n\nThis crate uses ``#![forbid(unsafe_code)]`` to ensure everything is implemented in 100% Safe Rust.\n\n## License\n\n\u003csup\u003e\nLicensed under either of\n  \u003ca href=\"https://raw.githubusercontent.com/asaaki/wargo/main/LICENSE-APACHE\"\u003eApache License, Version 2.0\u003c/a\u003e or\n  \u003ca href=\"https://raw.githubusercontent.com/asaaki/wargo/main/LICENSE-MIT\"\u003eMIT license\u003c/a\u003e\nat your option.\n\u003c/sup\u003e\n\n\u003cbr/\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n\n\u003c!-- links --\u003e\n\n[how to speed up Rust compilation]: https://markentier.tech/posts/2022/01/speedy-rust-builds-under-wsl2/\n[here]: https://github.com/asaaki/wargo/blob/main/Wargo.toml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaaki%2Fwargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasaaki%2Fwargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaaki%2Fwargo/lists"}