{"id":15154138,"url":"https://github.com/altaks/tauri-remote-caching-plugin","last_synced_at":"2026-02-24T04:04:55.293Z","repository":{"id":256815394,"uuid":"851504600","full_name":"Altaks/Tauri-Remote-Caching-Plugin","owner":"Altaks","description":"A Tauri plugins that caches remote files","archived":false,"fork":false,"pushed_at":"2024-09-21T18:28:41.000Z","size":245,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T00:34:38.887Z","etag":null,"topics":["cache","cache-control","caching","file","files","remote","tauri","tauri-plugin"],"latest_commit_sha":null,"homepage":"","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/Altaks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-03T08:10:00.000Z","updated_at":"2024-09-21T18:28:43.000Z","dependencies_parsed_at":"2024-10-10T05:31:09.283Z","dependency_job_id":"79e50cb5-e54d-4644-8090-563ae8cd8354","html_url":"https://github.com/Altaks/Tauri-Remote-Caching-Plugin","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.4545454545454546,"last_synced_commit":"2f60c22bf08a2160392a88ac22c1e9e2c23b2a33"},"previous_names":["altaks/tauri-remote-caching-plugin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altaks%2FTauri-Remote-Caching-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altaks%2FTauri-Remote-Caching-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altaks%2FTauri-Remote-Caching-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Altaks%2FTauri-Remote-Caching-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Altaks","download_url":"https://codeload.github.com/Altaks/Tauri-Remote-Caching-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237944154,"owners_count":19391588,"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":["cache","cache-control","caching","file","files","remote","tauri","tauri-plugin"],"created_at":"2024-09-26T17:03:07.059Z","updated_at":"2025-10-24T09:30:47.163Z","avatar_url":"https://github.com/Altaks.png","language":"Rust","readme":"# Tauri Plugin | Remote caching\n\nCaches remote files in the user's application folder for a better bandwidth management.\n\n## Installation\n\n*This plugin requires a Rust version of at least 1.60*\n\nThere are three general methods of installation that we can recommend.\n\n- Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)\n- Pull sources directly from Github using git tags / revision hashes (most secure)\n- Git submodule install this repo in your tauri project and then use file protocol to ingest the source (most secure, but inconvenient to use)\n \nInstall the Core plugin by adding the following to your `Cargo.toml` file :\n\n```toml\n[dependencies]\ntauri-plugin-remote-caching = { git = \"https://github.com/Altaks/Tauri-Remote-Caching-Plugin/\"}\n```\n\nYou can install the JavaScript/TypeScript guest bindings using your preferred JavaScript package manager : \n\n\u003e Note: If your JavaScript package manager cannot install packages from git monorepos, you can still use the code by manually copying the Guest bindings into your source files\n\n```sh\npnpm add https://github.com/Altaks/Tauri-Remote-Caching-Plugin\n\n# or \nnpm add https://github.com/Altaks/Tauri-Remote-Caching-Plugin\n\n# or\nyarn add https://github.com/Altaks/Tauri-Remote-Caching-Plugin\n```\n\n## Usage\n\nFirst of all you need to register the plugin in the Rust part of you application : \n\n`src-tauri/src/main.rs` : \n\n```rust\nfn main() {\n    tauri::Builder::default()\n        .plugin(tauri_plugin_remote_caching::init())\n        .invoke_handler(tauri::generate_handler![greet])\n        .run(tauri::generate_context!())\n        .expect(\"error while running tauri application\");\n}\n```\n\nAfterward the whole plugin's API is available through the JavaScript Guest bindings : \n\n\u003e Warning : You must add the following inside your application config (`tauri.conf.json`) inside the `tauri` configuration part : \n\u003e \n\u003e ```json\n\u003e \"protocol\": {\n\u003e    \"asset\": true,\n\u003e    \"assetScope\": [\"**\"]\n\u003e }\n\u003e ```\n\u003e Furthermore, you must enable these features on your app's `tauri` dependency : \n\u003e \n\u003e ```toml\n\u003e tauri = { version = \"1\", features = [ \"protocol-asset\", \"fs-all\", \"shell-open\", \"path-all\"] }\n\u003e ```\n\n```tsx\nexport const CachedImage = ({src, className}: {src: string, className?: string}) =\u003e {\n    \n    // We set a default state of no-url to display nothing\n    const [url, setUrl] = useState(\"\");\n\n    // Loads the requested image\n    const loadImage = async () =\u003e {\n        console.log(`Searching cached image`)\n        const cachedImage = await cached(src)\n        console.log(`Found cached image : ${cachedImage}`)\n        setUrl(convertFileSrc(cachedImage));\n    }\n\n    // Start the image caching / retrieving\n    useEffect(() =\u003e {\n        loadImage().catch(console.error)\n    }, [src]);\n\n    return (\n        \u003c\u003e\n            \u003cimg src={url} alt={url} className={className} decoding={\"async\"}/\u003e\n        \u003c/\u003e\n    )\n}\n```\n\n## Contributing\n\nPR accepted. I might take time to make PR's reviews, feel free to contact me `altair61.dev@gmail.com`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltaks%2Ftauri-remote-caching-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltaks%2Ftauri-remote-caching-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltaks%2Ftauri-remote-caching-plugin/lists"}