• Stars
    star
    243
  • Rank 166,489 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An HTTP server for testing Wasm

WasmServe

An HTTP server for Wasm testing like gopherjs serve

Installation

go install github.com/hajimehoshi/wasmserve@latest

Usage

Usage of wasmserve
  -allow-origin string
        Allow specified origin (or * for all origins) to make requests to this server
  -http string
        HTTP bind address to serve (default ":8080")
  -overlay string
        Overwrite source files with a JSON file (see https://pkg.go.dev/cmd/go for more details)
  -tags string
        Build tags

Trigger Refresh

Once the browser loads the page, you can trigger a reload by making a call to teh server at /_notify, like this:

curl localhost:8080/_notify

This will make the browser reload. You can add this command to a build script or to an IDE command, to have the browser automatically update without leaving your IDE.

Example

Running a remote package

wasmserve github.com/hajimehoshi/wasmserve/example

And open http://localhost:8080/ on your browser.

Example 2

Running a local package

git clone https://github.com/hajimehoshi/ebiten # This might take several minutes.
cd ebiten
wasmserve ./examples/sprites

And open http://localhost:8080/ on your browser.

Known issue with Windows Subsystem for Linux (WSL)

This application sometimes does not work under WSL, due to bugs in WSL, see #5 for details.

Tips

  • If you want to change the working directory to serve, you can use cd with parentheses:
(cd /path/to/working/dir; wasmserve github.com/yourname/yourpackage)
  • To trigger a browser reload from a script, make a call to /_notify, like this:
curl http://localhost:8080/_notify

This will make the browser refresh the page.

More Repositories

1

ebiten

Ebitengine - A dead simple 2D game engine for Go
Go
10,614
star
2

go-mp3

An MP3 decoder in pure Go
Go
745
star
3

go2cpp

A converter from Go to C++
Go
254
star
4

hitsumabushi

Run Go programs (almost) everywhere
C
175
star
5

goc

A C interpreter in Go
Go
119
star
6

file2byteslice

A dead simple tool to embed a file to Go
Go
92
star
7

go-steamworks

A Steamworks SDK binding for Go
Go
89
star
8

asobiba

A Go Playground in WebAssembly
JavaScript
67
star
9

go2dotnet

A converter from Go to .NET (C#)
Go
45
star
10

bitmapfont

Package bitmapfont offers a font.Face value of some bitmap fonts
Go
45
star
11

starruby

A 2D Game Library in Ruby
C
29
star
12

stbvorbis.js

A JavaScript port of stb_vorbis.c
C
27
star
13

gopherwasm

MOVED TO https://github.com/gopherjs/gopherwasm : A wrapper for GopherJS (`gopherjs/js`) and Wasm (`syscall/js`)
Go
18
star
14

cocoa_in_go

Cocoa application written in Go
Go
17
star
15

wasm-bench

Wasm Benchmark Experiment
JavaScript
16
star
16

chinesegamefonts

Chinese fonts for games: Compressed TTF binaries based on Source Han Sans (Noto Sans CJK).
Go
16
star
17

star-chat

StarChat
JavaScript
15
star
18

otto-gopherjs

Run JavaScript on browsers via Otto converted by GopherJS
Go
13
star
19

rpgmmv

Plugins for RPG Maker MV
JavaScript
11
star
20

ebitenguidemo

[WIP] A GUI demonstration in Ebiten
Go
10
star
21

ebitenginegamejam2022

Ebitengine Game Jam 2022
Go
10
star
22

hitozuma

Super IRC Bot Hitozuma (人妻)
Ruby
9
star
23

notarize

Package notarize provides APIs for Apple application notarization
Go
9
star
24

go-jisx0208

Converts a JIS X 0208 code to a rune
Go
9
star
25

ugoki

An animation editor?
Go
8
star
26

ebitenui

[WIP] A UI library based on Ebiten
Go
8
star
27

go-eossdk

An Epic Online Services SDK binding for Go
Go
8
star
28

oklab

Package oklab provides color.Color implementations for Oklab and Oklch.
Go
8
star
29

embeddll

An experiment to embed C DLL into Go program
Go
8
star
30

starruby-samplerpg

Sample RPG of Star Ruby
7
star
31

go-memorymodule

Go port of MemoryModule
C
7
star
32

macapp

A software to create a minimal *.app directory
Go
7
star
33

hajimehoshi

6
star
34

meiro

Software to generate mazes
Go
6
star
35

ebiten-suspended

Ebiten - A Simple 2D Game Library -
C++
5
star
36

starruby-launcher

Star Ruby Launcher for Windows
Ruby
5
star
37

unagi

An RPG Editor on a modern browser
TypeScript
5
star
38

ruby-php

Let's use PHP's == operator in Ruby!
Ruby
5
star
39

go-mplus-bitmap

DEPRECATED: Use https://github.com/hajimehoshi/go-mplusbitmap
Go
5
star
40

overlay-exp

Experiment with -overlay
Go
4
star
41

gopherwalk

[WIP] A game with Gophers
Go
4
star
42

go-libtess2

WIP: Go port of Mikko's libtess2
Go
4
star
43

hajimehoshi.com

hajimehoshi.com
Go
4
star
44

sugoimaze

Ebitengine Game Jam 2024
Go
4
star
45

ebiten-book-code

Code snippets in the Ebiten book
Go
4
star
46

ebitenginegamejam2023

Ebitengine Game Jam 2023
JavaScript
4
star
47

go-mplusbitmap

NO LONGER MAINTAINED: See https://github.com/hajimehoshi/bitmapfont
Go
4
star
48

ncs

Package ncs provides color in Natural Color System
Go
4
star
49

gophermv

An RPG Maker MV client written in Go
Go
3
star
50

go2carchive

[WIP] Go to C archive
Dockerfile
3
star
51

switches

Maze Game
Go
3
star
52

starrpg

An Web Site to Create RPGs
Go
3
star
53

directx-test

DirectX Test
C++
3
star
54

boxes

A Sokoban game for Ebiten tutorials
Go
3
star
55

niwatori

Dungeon Generator
Ruby
3
star
56

exp

Experimental things
JavaScript
3
star
57

fileserver

A dead simple HTTP server to serve files
Go
3
star
58

mplus-bitmap-images

Images generated from M+ fonts (bitmap)
Go
3
star
59

kakeibo

Household accounts application working on Google App Engine
Go
3
star
60

png2compressedrgba

A converter to convert a PNG file to a compressed RGBA binary
Go
3
star
61

shrimp-old

RPG Editor
C++
2
star
62

testhtml

test
HTML
2
star
63

kaiko-old

Something great
C++
2
star
64

shrimp

A Map Editor written in C#
C#
2
star
65

vivliostyle-test

Vivliostyle test
CSS
2
star
66

star-chat-irc-bridge

StarChat IRC Bridge
Ruby
2
star
67

ikiw

Something like Wiki
Ruby
2
star
68

ncspalette

WIP
Go
2
star
69

kaiko

A 2D game library written in D?
D
2
star
70

sandbox

A sandbox for me
HTML
2
star
71

egltest

EGL test
C++
2
star
72

anki_obsolete

Helper to memorize things for me
Python
2
star
73

dojin-style

同人誌用 TeX スタイル
TeX
2
star
74

oggloop

An Ogg/Vorbis meta data parser for LOOPSTART and LOOPLENGTH as RPG Maker does
Go
2
star
75

snippets

A simple storage on Google App Engine with hash keys for small and immutable data
Go
2
star
76

kagi

A simple password generator
Go
2
star
77

baseline-test

HTML
1
star
78

canvas_test

TypeScript
1
star
79

shirokuro

Go
1
star
80

project-euler

Project Euler (http://projecteuler.net/)
Haskell
1
star
81

ebiten.pagestorage

JavaScript files generated by GopherJS for http://hajimehoshi.github.io/ebiten/
1
star
82

hajimehoshi.github.com

hajimehoshi.github.com
1
star
83

serializer-bench

Go
1
star
84

ogvjs

Released files from https://github.com/brion/ogv.js/
JavaScript
1
star
85

playgroundtest

Go
1
star
86

darwin-wx-test

Experimental: Go + wxWidgets in OSX
C++
1
star
87

go-vorbis

WIP - Go port of stb_vorbis (http://nothings.org/stb_vorbis/)
Go
1
star
88

binpng

Converter to an two-valued PNG image
Go
1
star