Skip to content

Commit

Permalink
📦 updates modules for v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
k33g committed Mar 24, 2023
1 parent 3207ce5 commit d76bbf2
Show file tree
Hide file tree
Showing 20 changed files with 130 additions and 46 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Capsule: the nano (wasm) functions runner

- 🖐 Issues: [https://github.com/bots-garden/capsule/issues](https://github.com/bots-garden/capsule/issues)
- 📦 Last release: `v0.3.1 🐊 [Tampa Bay]`
- 📦 Next release: `v0.3.2 TBD` *🚧 in progress*
- 📦 Last release: `v0.3.2 🤗 [WASM I/O 2023]`
- 📦 Next release: `v0.3.3 TBD` *🚧 in progress*
- 📝 Full documentation [https://bots-garden.github.io/capsule/](https://bots-garden.github.io/capsule/)

## What is **Capsule**?
Expand Down
42 changes: 23 additions & 19 deletions capsule-launcher/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,47 @@ replace (
)

require (
github.com/bots-garden/capsule/commons v0.2.9
github.com/bots-garden/capsule/mqttconn v0.0.0-20221027063202-a59dfbe32b65
github.com/bots-garden/capsule/natsconn v0.0.0-20221027063202-a59dfbe32b65
github.com/couchbase/gocb/v2 v2.6.0
github.com/bots-garden/capsule/commons v0.3.1
github.com/bots-garden/capsule/mqttconn v0.0.0-20230207102522-ad91242de694
github.com/bots-garden/capsule/natsconn v0.0.0-20230207102522-ad91242de694
github.com/couchbase/gocb/v2 v2.6.2
github.com/eclipse/paho.mqtt.golang v1.4.2
github.com/go-redis/redis/v9 v9.0.0-rc.1
github.com/go-redis/redis/v9 v9.0.0-rc.2
github.com/go-resty/resty/v2 v2.7.0
github.com/gofiber/fiber/v2 v2.39.0
github.com/gofiber/fiber/v2 v2.42.0
github.com/google/uuid v1.3.0
github.com/nats-io/nats.go v1.18.0
github.com/nats-io/nats.go v1.24.0
github.com/tetratelabs/wazero v1.0.0-rc.2
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/couchbase/gocbcore/v10 v10.2.0 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/couchbase/gocbcore/v10 v10.2.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.3.0 // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nkeys v0.4.4 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.41.0 // indirect
github.com/valyala/fasthttp v1.45.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/time v0.1.0 // indirect
)
81 changes: 81 additions & 0 deletions capsule-launcher/go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion capsulemodule/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ replace (
github.com/bots-garden/capsule v0.2.9 => ../
github.com/bots-garden/capsule v0.3.0 => ../
github.com/bots-garden/capsule v0.3.1 => ../
github.com/bots-garden/capsule v0.3.2 => ../
)

replace (
Expand All @@ -30,6 +31,7 @@ replace (
github.com/bots-garden/capsule/commons v0.2.9 => ../commons
github.com/bots-garden/capsule/commons v0.3.0 => ../commons
github.com/bots-garden/capsule/commons v0.3.1 => ../commons
github.com/bots-garden/capsule/commons v0.3.2 => ../commons
)

require github.com/bots-garden/capsule/commons v0.2.9
require github.com/bots-garden/capsule/commons v0.3.1
1 change: 1 addition & 0 deletions commons/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ replace (
github.com/bots-garden/capsule v0.2.9 => ../
github.com/bots-garden/capsule v0.3.0 => ../
github.com/bots-garden/capsule v0.3.1 => ../
github.com/bots-garden/capsule v0.3.2 => ../
)
2 changes: 1 addition & 1 deletion commons/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package commons

func CapsuleVersion() string {
return "v0.3.1 🐊 [Tampa Bay]"
return "v0.3.2 🤗 [WASM I/O 2023]"
}
2 changes: 1 addition & 1 deletion docs/getting-started-cabu-serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ capsule \
```bash
docker run \
-p 8080:8080 \
-v $(pwd):/app --rm k33g/capsule-launcher:0.3.1 \
-v $(pwd):/app --rm k33g/capsule-launcher:0.3.2 \
/capsule \
-wasm=./app/hello-world.wasm \
-mode=http \
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Capsule: the nano (wasm) functions runner

!!! info "What's new?"
- `v0.3.2 🤗 [WASM I/O 2023]`: dependencies updates: wazero to 1.0.0-pre.9 (Capsule is twice as fast 🚀)
- `v0.3.1 🐊 [Tampa Bay]`: dependencies updates: wazero to 1.0.0-pre.8
- `v0.3.0 🎄 [Christmas tree]`: Refactoring (Capsule is at least 4 times faster than the previous version).
- `v0.2.9 🦜 [parrot]`: Hot reloading of the wasm module [see the "Reload the module" section](getting-started-cabu-reload.md) and HTTP service refactoring.
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before executing or running a function, you need to install the last release of
🖐 **On Linux**:

```bash
export CAPSULE_VERSION="v0.3.1"
export CAPSULE_VERSION="v0.3.2"
wget -O - https://raw.githubusercontent.com/bots-garden/capsule/${CAPSULE_VERSION}/install-capsule-launcher.sh| bash
```

Expand All @@ -29,7 +29,7 @@ MESSAGE="👋 Hello World 🌍" capsule \
-httpPort=8080
```

> You can download the appropriate release of **Capsule** here: [`v0.3.1 🐊 [Tampa Bay]`](https://github.com/bots-garden/capsule/releases/tag/v0.3.1)
> You can download the appropriate release of **Capsule** here: [`v0.3.2 🤗 [WASM I/O 2023]`](https://github.com/bots-garden/capsule/releases/tag/v0.3.2)
## Using the Capsule Docker image
> The documentation is a wip 🚧
Expand Down
2 changes: 1 addition & 1 deletion install-capsule-launcher.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
LAST_CAPSULE_VERSION="v0.3.1"
LAST_CAPSULE_VERSION="v0.3.2"
echo "System: ${OSTYPE} $(uname -m)"

if [ -z "$CAPSULE_PATH" ]
Expand Down
2 changes: 1 addition & 1 deletion remove-tags.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TAG="v0.3.0"
TAG="v0.3.2"

git tag -d ${TAG}
git tag -d commons/${TAG}
Expand Down
2 changes: 1 addition & 1 deletion sudo.install-capsule-launcher.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
LAST_CAPSULE_VERSION="v0.3.1"
LAST_CAPSULE_VERSION="v0.3.2"
echo "System: ${OSTYPE} $(uname -m)"

if [[ $1 = "help" ]]
Expand Down
2 changes: 1 addition & 1 deletion update-modules-for-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TAG="v0.3.1"
TAG="v0.3.2"
cd commons
go mod edit -replace github.com/bots-garden/capsule@${TAG}=../

Expand Down
6 changes: 3 additions & 3 deletions wasm_modules/capsule-hello-post-fastjson/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ replace github.com/bots-garden/capsule/capsulemodule => ../../capsulemodule
replace github.com/bots-garden/capsule/commons => ../../commons

require (
github.com/bots-garden/capsule/capsulemodule v0.3.0
github.com/valyala/fastjson v1.6.3
github.com/bots-garden/capsule/capsulemodule v0.3.1
github.com/valyala/fastjson v1.6.4
)

require github.com/bots-garden/capsule/commons v0.3.0 // indirect
require github.com/bots-garden/capsule/commons v0.3.1 // indirect
4 changes: 2 additions & 2 deletions wasm_modules/capsule-hello-post-fastjson/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc=
github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
2 changes: 1 addition & 1 deletion wasm_modules/capsule-hello-post-fastjson/run-http-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
cd ../../capsule-launcher

DEBUG=true MESSAGE="💊 Capsule Rocks 🚀" go run main.go \
-wasm=../wasm_modules/capsule-hello-post/hello.wasm \
-wasm=../wasm_modules/capsule-hello-post-fastjson/hello.wasm \
-mode=http \
-httpPort=7070
8 changes: 1 addition & 7 deletions wasm_modules/capsule-hello-post-fastjson/stress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,4 @@ hey -n 300 -c 100 -m POST \
"http://localhost:7070"

# hey -n 300 -c 100 -m POST \
# Requests/sec: 30.5280
# Requests/sec: 32.1274
# Requests/sec: 31.5995
# Requests/sec: 117.4794 with wazero.NewRuntimeConfigInterpreter()
# Requests/sec: 123.6958 wasi_snapshot_preview1.MustInstantiate(ctx, wasmRuntime)
# Requests/sec: 84.0781 deps: updates wazero to 1.0.0-pre.4
# Requests/sec: 85.5523 use fastjson

2 changes: 1 addition & 1 deletion wasm_modules/capsule-hello-post-next/stress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ hey -n 300 -c 100 -m POST \
-d '{"message": "Golang 💚💜 wasm", "author": "Philippe"}' \
"http://localhost:7070"

# Requests/sec: 241.3615
# Requests/sec: 485.4062 deps: updates wazero to 1.0.0-pre.9
4 changes: 2 additions & 2 deletions wasm_modules/capsule-hello-post/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ replace github.com/bots-garden/capsule/capsulemodule => ../../capsulemodule
replace github.com/bots-garden/capsule/commons => ../../commons

require (
github.com/bots-garden/capsule/capsulemodule v0.3.0
github.com/bots-garden/capsule/capsulemodule v0.3.1
github.com/tidwall/gjson v1.14.4
github.com/tidwall/sjson v1.2.5
)

require (
github.com/bots-garden/capsule/commons v0.3.0 // indirect
github.com/bots-garden/capsule/commons v0.3.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
)
1 change: 1 addition & 0 deletions wasm_modules/capsule-hello-post/stress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ hey -n 300 -c 100 -m POST \
# Requests/sec: 117.4794 with wazero.NewRuntimeConfigInterpreter()
# Requests/sec: 123.6958 wasi_snapshot_preview1.MustInstantiate(ctx, wasmRuntime)
# Requests/sec: 84.0781 deps: updates wazero to 1.0.0-pre.4
# Requests/sec: 167.1686 deps: updates wazero to 1.0.0-pre.9

0 comments on commit d76bbf2

Please sign in to comment.