Skip to content

eharrow/uk-areacodes-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

uk-areacodes-wasm

Generates a WASM from uk-areacodes-rust.

Build Release

About

Packages up uk-areacodes-rust as a WASM package for use in webassembly runtimes such as a browser.

🚴 Usage

🛠️ Build with wasm-pack build

wasm-pack build

🔬 Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

🎁 Publish to NPM with wasm-pack publish

wasm-pack publish

☕️ Use from JS in a Browser

In js-example-use use NPM with webpack to build a sample page to use the API.

cd js-example-use
npm install
npm run build

Examine the dist directory. To spin up a test dev server to serve the file npx webpack serve and open http://localhost:8080

You can see it running at http://blog.ewanharrow.com/uk-areacodes-wasm/