Skip to content

KenHino/energy-unit-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

energy-unit-converter

how-to-use.mp4

Visit here: https://kenhino.github.io/energy-unit-converter/

A Rust-based energy unit converter that runs in the browser via WebAssembly. The UI can switch between the ase.units CODATA datasets (1986 through 2022), with 2018 selected by default.

Prerequisites

Setup (first time)

# Add the WASM compilation target
rustup target add wasm32-unknown-unknown

# Install wasm-pack
cargo install wasm-pack

# Install frontend dependencies
cd www && npm install

Running locally

# 1. Build the Rust WASM package (from repo root)
wasm-pack build --target web

# 2. Start the dev server
cd www
npm run dev

Open http://localhost:5173 in your browser.

Re-run wasm-pack build --target web whenever you change Rust source code.

Other commands

Command Description
cargo test Run Rust tests
cargo clippy Lint Rust code
cargo fmt Format Rust code
cd www && npm run build Build production assets
cd www && npm run preview Preview production build
cd www && npm test Run frontend tests

Releases

No releases published

Packages

 
 
 

Contributors