8000 Odin.examples/wasm/js_wasm32 at master · brian-hmn/Odin.examples · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

js_wasm32

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Odin js_wasm32 example

This is an example of how to build an Odin program using the js_wasm32 target. The example features a website that can call an Odin procedure.

Building

Run build.bat (Windows) or build.sh (mac / Linux).

This builds the WASM module and also copies odin.js from the core Odin library as it's required for a js_wasm32 build.

Running

You need to run a local webserver in the web directory in order to serve the site. There are few, simple options for this.

  • Navigate to the web directory.
cd web
  • Run a webserver.
# If you have Python installed.
python -m http.server
# If you have Node.js installed.
npx http-server -p 8000 .
0