{"id":15138139,"url":"https://github.com/hardworking-toptal-dev/rust-rocket","last_synced_at":"2026-01-19T07:32:47.095Z","repository":{"id":239257055,"uuid":"786357147","full_name":"hardworking-toptal-dev/rust-rocket","owner":"hardworking-toptal-dev","description":"Example of using Rust/Rocket","archived":false,"fork":false,"pushed_at":"2024-04-14T07:50:05.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T03:03:41.985Z","etag":null,"topics":["javascript","rocket","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/hardworking-toptal-dev.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-04-14T07:49:47.000Z","updated_at":"2024-09-10T13:26:36.000Z","dependencies_parsed_at":"2024-05-11T03:35:19.630Z","dependency_job_id":null,"html_url":"https://github.com/hardworking-toptal-dev/rust-rocket","commit_stats":null,"previous_names":["hardworking-toptal-dev/rust-rocket"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2Frust-rocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2Frust-rocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2Frust-rocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2Frust-rocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardworking-toptal-dev","download_url":"https://codeload.github.com/hardworking-toptal-dev/rust-rocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445651,"owners_count":20939953,"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":["javascript","rocket","rust"],"created_at":"2024-09-26T07:20:51.700Z","updated_at":"2026-01-19T07:32:47.089Z","avatar_url":"https://github.com/hardworking-toptal-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Rust-Svelte-on-Rust\n\nStarter template for [Svelte](https://svelte.dev) frontend apps with Rust [Rocket](https://rocket.rs) backend server.\n\n## Requirements\n\n* Rust  - [Install](https://www.rust-lang.org/tools/install)\n* Svelte\n* Rocket\n* NodeJs - [Install](https://nodejs.org/en/download/)\n\nWe will use Rust nightly.\n\n## Background\n\nCreate a new project based on this example:\n[Mozilla Developer Network, Getting Started with Svelte](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Svelte_getting_started)\n\n## Starting from scratch\n\nOptional: Assuming you are not using this repository, to start with a clean slate for Rust/Svelte\n\n```bash\nnpx degit sveltejs/template moz-todo-svelte\ncd moz-todo-svelte\ncargo new myproject\n#now move stuff around\n```\n\n## Installation\n\n### Install github CLI tool\n\n[Using these instructions](https://github.com/cli/cli/blob/trunk/docs/install_linux.md)\n\n```bash\ncurl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list \u003e /dev/null\nsudo apt update\nsudo apt install gh\n```\n\n```bash\necho \"Install rust and cargo (Rust's package manager)\"\ncurl https://sh.rustup.rs -sSf | sh\necho \"clone, or better yet your github cli tool\"\ngit clone https://github.com/joemooney/rust-rocket-svelte\nor\ngh repo clone joemooney/rust-rocket-svelte\nrustup override set nightly\nnpm install\n```\n\nThese are the steps to get to the initial point for starting development.\nThen we move the svelte related files into the `client` directory etc.\n\n## Getting Started\n\nStart Rocket server and [Rollup](https://rollupjs.org) in two different terminals\n\n### Terminal #1\n\nTo build and hot reload svelte components, this will not launch a http server.\n\n```bash\nnpm run dev  \n```\n\n### Terminal #2\n\nCompile and run the rust rocket http server:\n\n```bash\ncargo run  \n```\n\n* Navigate to [localhost:8000](http://localhost:8000). You should see your app running.\n* Svelte client code is in `client` directory.\n** Upon saving changes live-reloading via rollup will be rendered in the browser.\n* Rust server Rocket code is in `src` directory.\n** To rebuild Rust code use cargo run after saving your changes.\n* All static files are served from `public` direcotry. Including the JS code compiled by Svelte Compiler.\n\n## Building and running in production mode\n\nTo create an optimised version of the app:\n\n```bash\nnpm run build\ncargo build\n```\n\n## Built With\n\n[Rocket](https://rocket.rs/)\n\n[Svelte](https://svelte.dev/)\n\n[Svelte Material UI](https://github.com/hperrin/svelte-material-ui)\n\n[Svelte Material Icons](https://github.com/ramiroaisen/svelte-material-icons)\n\n## Change Log\n\n### Step 1\n\nInitial barebones Rust/Rocket/Svelte page working.\n\n### Step 2\n\nGot communication working from Svelete client calling Rust asynchronously.\n\n### Step 3\n\nAdded Material UI components to create a first draft user interface.\n\nTODO: I did not keep track of all that I did, need to repeat the process.\n\n```bash\nnpm i svelte-material-ui\nnpm i -D @smui/data-table\nnpm i -D @smui/tab\nnpm i -D @smui/tab-bar\nnpm i svelte-material-icons\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Frust-rocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardworking-toptal-dev%2Frust-rocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Frust-rocket/lists"}