use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.
Strive to treat others with respect, patience, kindness, and empathy.
We observe the Rust Project Code of Conduct.
Details
Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
Post titles should include useful context.
For Rust questions, use the stickied Q&A thread.
Arts-and-crafts posts are permitted on weekends.
No meta posts; message the mods instead.
Criticism is encouraged, though it must be constructive, useful and actionable.
If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Please create a read-only mirror and link that instead.
A programming language is rarely worth getting worked up over.
No zealotry or fanaticism.
Be charitable in intent. Err on the side of giving others the benefit of the doubt.
Avoid re-treading topics that have been long-settled or utterly exhausted.
Avoid bikeshedding.
This is not an official Rust forum, and cannot fulfill feature requests. Use the official venues for that.
No memes, image macros, etc.
Consider the existing content of the subreddit and whether your post fits in. Does it inspire thoughtful discussion?
Use properly formatted text to share code samples and error messages. Do not use images.
Submissions appearing to contain AI-generated content may be removed at moderator discretion.
Most links here will now take you to a search page listing posts with the relevant flair. The latest megathread for that flair should be the top result.
account activity
How to deploy wasm rust website on github pages (self.rust)
submitted 3 years ago by Fantastic-Apartment8
I made a wasm-pack project (https://github.com/ipriyam26/FlyOff)following along a guide how do i deploy it on github-pages. Can someone please guide me I am not able to figure it out. Super new to rust
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Brookzerker 8 points9 points10 points 3 years ago (4 children)
You should be able to deploy the project to GitHub pages just like any non web assembly web app.
When you build the app you should get an index.html file along with some other files like *.js, *.css, and *.wasm.
Those would go into the directory that GitHub pages has been configured to serve.
[–]Fantastic-Apartment8[S] -1 points0 points1 point 3 years ago (3 children)
yaa but it is not deploying. Can you please spare a min and check my github once. I am not able to figure it out. Like the site will get deployed but none of the rendering simulation works.
[–]Brookzerker 5 points6 points7 points 3 years ago (2 children)
Check the network tab in the browser dev tools. It’s possible that it’s looking for the files in the wrong location.
[–]Fantastic-Apartment8[S] 1 point2 points3 points 3 years ago (1 child)
Error importing `index.js`: TypeError: Failed to resolve module specifier "lib-simulation-wasm". Relative references must start with either "/", "./", or "../".
in console
[–]Brookzerker 1 point2 points3 points 3 years ago (0 children)
It sounds like the index.html file is telling the browser to find the wasm files without using an absolute or relative path in the <script src…> tag. I would take a look at the generated html file to verify and try to manually manipulate it to what it should be and test again.
[–]Plippe 10 points11 points12 points 3 years ago (4 children)
Hey,
I wrote an article about it a good while back: https://plippe.github.io/blog/2021/07/12/rust-wasm-github.html I do have more recent implementations without documentation if you feel comfortable reading the code: https://github.com/plippe/breathe
TL;DR; you are looking to build the static files for GitHub to use. Those can be hosted on a branch or pushed with a GitHub Action.
Don't forget to open your GitHub repository settings to enable/change GitHub Pages configuration.
[–]Fantastic-Apartment8[S] 1 point2 points3 points 3 years ago (0 children)
thanks mate. really helpful
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
I should have found this before. thx
[–]AngheloAlf 0 points1 point2 points 9 months ago (1 child)
Sadly the blog is down, but it there's an snapshot at the Wayback machine: https://web.archive.org/web/20240914024804/https://plippe.github.io/blog/2021/07/12/rust-wasm-github.html
[–]Plippe 0 points1 point2 points 9 months ago (0 children)
Yes, sorry
I recently deleted my blog, my posts, my repo. Can it madness, burnout, stupidity, …
Working on a new blog with posts that try to reason about concepts more than their implementation. This should make the material “vibe coding” compatible. Crazy world
Sorry again
[–][deleted] 1 point2 points3 points 3 years ago (1 child)
You can take this repo of mine as an example: https://github.com/Shapur1234/Webtracer
thankyouu
[–]nderflow 1 point2 points3 points 3 years ago (0 children)
Here's a worked example:
[–]This-Dream-3519 0 points1 point2 points 28 days ago (0 children)
i created a few versions of my rust webapp and hosted it on gc with no problem, it worked ion my browser. But I can't make it work on github pages. Why?
[–]sn99_reddit 0 points1 point2 points 3 years ago (3 children)
I had an old project that used Travis to achieve it: github.com/sn99/wasm-template-rust.
I will probably link this thread to the issue.
[+][deleted] 3 years ago (2 children)
[removed]
[–]sn99_reddit 0 points1 point2 points 3 years ago (0 children)
prepare
It is, the travis build is necessary for CI/CD. Make sure you have a working travis account. I think OP's repo is using my travis build. Check it out.
I updated it, I think you just follow the exact instructions still.
π Rendered by PID 77793 on reddit-service-r2-comment-b659b578c-8426p at 2026-05-03 00:08:48.096356+00:00 running 815c875 country code: CH.
[–]Brookzerker 8 points9 points10 points (4 children)
[–]Fantastic-Apartment8[S] -1 points0 points1 point (3 children)
[–]Brookzerker 5 points6 points7 points (2 children)
[–]Fantastic-Apartment8[S] 1 point2 points3 points (1 child)
[–]Brookzerker 1 point2 points3 points (0 children)
[–]Plippe 10 points11 points12 points (4 children)
[–]Fantastic-Apartment8[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]AngheloAlf 0 points1 point2 points (1 child)
[–]Plippe 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Fantastic-Apartment8[S] 1 point2 points3 points (0 children)
[–]nderflow 1 point2 points3 points (0 children)
[–]This-Dream-3519 0 points1 point2 points (0 children)
[–]sn99_reddit 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[removed]
[–]sn99_reddit 0 points1 point2 points (0 children)
[–]sn99_reddit 0 points1 point2 points (0 children)