🧾 | The main website of rust programming language [maintainer=@orzklv] https://rust-lang.uz/
  • Rust 89%
  • Nix 5%
  • HTML 3.4%
  • JavaScript 2.5%
Find a file
Sokhibjon Orzikulov 99895a12f9
Some checks failed
Deploy CI / build (push) Has been cancelled
Test CI / build (push) Has been cancelled
chore: replace name of Orzklv
2026-03-26 21:57:38 +05:00
.github/workflows chore: remove cachix caching 2026-03-26 21:50:31 +05:00
images chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
src chore: replace name of Orzklv 2026-03-26 21:57:38 +05:00
static moving to yew-rs 2023-11-15 10:47:48 +05:00
style removed unnecessary files and automated css compilation 2023-11-15 11:21:24 +05:00
.envrc chore: add direnv to repo 2025-09-18 11:37:53 +05:00
.gitignore chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
Cargo.lock chore: nix flake support 2024-12-22 06:49:09 +05:00
Cargo.toml chore: nix flake support 2024-12-22 06:49:09 +05:00
default.nix chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
flake.lock chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
flake.nix chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
index.html deplyo to gh pages 2024-06-19 23:32:36 +05:00
package.json internal css compilation 2023-11-16 17:58:39 +05:00
postcss.config.js [FIX] replacing prettier with rome 2023-05-03 10:44:34 +05:00
readme.md Update readme.md 2023-11-16 17:59:25 +05:00
rust-toolchain.toml chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
shell.nix chore: revive project and update to latest 2026-03-26 21:30:20 +05:00
tailwind.config.js moving to yew-rs 2023-11-15 10:47:48 +05:00
Trunk.toml chore: create Trunk.toml 2025-01-07 03:12:23 +05:00

Rust

This is a fairly minimal template for a Yew app that's built with Trunk.

Usage

For a more thorough explanation of Trunk and its features, please head over to the repository.

Installation

If you don't already have it installed, it's time to install Rust: https://www.rust-lang.org/tools/install. The rest of this guide assumes a typical Rust installation which contains both rustup and Cargo.

To compile Rust to WASM, we need to have the wasm32-unknown-unknown target installed. If you don't already have it, install it with the following command:

rustup target add wasm32-unknown-unknown

Now that we have our basics covered, it's time to install the star of the show: Trunk. Simply run the following command to install it:

cargo install trunk wasm-bindgen-cli

That's it, we're done!

Running

trunk serve

Rebuilds the app whenever a change is detected and runs a local server to host it.

There's also the trunk watch command which does the same thing but without hosting it.

Release

trunk build --release

This builds the app in release mode similar to cargo build --release. You can also pass the --release flag to trunk serve if you need to get every last drop of performance.

Unless overwritten, the output will be located in the dist directory.

Using this template

There are a few things you have to adjust when adopting this template.

Remove example code

The code in src/main.rs specific to the example is limited to only the view method. There is, however, a fair bit of Sass in index.scss you can remove.

Update metadata

Update the name, version, description and repository fields in the Cargo.toml file. The index.html file also contains a <title> tag that needs updating.

Finally, you should update this very README file to be about your app.

License

The template ships with both the Apache and MIT license. If you don't want to have your app dual licensed, just remove one (or both) of the files and update the license field in Cargo.toml.

There are two empty spaces in the MIT license you need to fill out: `` and Sokhibjon Orzikulov <sakhib@orzklv.uz>.