Skip to content

terasakisatoshi/WitchViewer.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WitchViewer.jl using WebAssemblyCompiler.jl

Screen.Recording.2023-12-07.at.22.04.44.mov

Description

This repository implements WitchViewer that exhibits some images represent Japanese anime-style witch dressed in a certain color outfit with lavish gold embroidery. You can select the image by modifying Index controller.

These images can be found at the following links:

Note that these image are originally generated by DALL·E 3 on ChatGPT with my handcrafted prompt.

WitchViewer is built on the work of tshort/WebAssemblyCompiler.jl that compiles Julia's IR to WebAssembly, which means you can write Julia's code to implement web applications while it does not require Julia's runtime.

How to use

Since this repository already created wasm file, you only have to run the following commands. It's easy.

$ git clone https://github.com/terasakisatoshi/WitchViewer.jl.git
$ cd WitchViewer.jl
$ python -m http.server 8000

Of course you can use julia -e 'using LiveServer; serve(port=8000)'.

Then, open your web browser and go to localhost:8000.

Building ./image/*.wasm file by yourself.

If you want to update WitchViewer, you have to modify code in index.html, image.jl. Then, run the following commands to update files in ./image directory:

$ julia --project -e 'using Pkg; Pkg.instantiate()'
$ julia --project image.jl

I recommend to use LiveServer.jl for debugging:

$ julia --project -e 'using LiveServer; serve(port=8000)'
✓ LiveServer listening on http://localhost:8000/ ...
  (use CTRL+C to shut down)