Commit Graph

10 Commits

Author SHA1 Message Date
Radu Matei 2028b6d9ee
fix: Go SDK integration tests
This commit updates the integration test build step to run `go mod
tidy`, since the Go SDK pulls in an external Go module for the router.

This commit also ignores `go.sum` for the Go examples from the
`examples/` directory.

Signed-off-by: Radu Matei <radu.matei@fermyon.com>
Co-authored-by: Rajat Jindal <rajat.jindal@fermyon.com>
2023-04-05 15:08:05 +03:00
Brian H 164e0a4b50
chore: update examples and templates to spin_manifest_version
Signed-off-by: Brian H <brian.hardock@fermyon.com>
2023-03-08 12:06:03 -05:00
Joel Dice 49721f2daf
grand Go SDK update (#1165)
* grand Go SDK update

- Add `outbound-redis` set operations and `execute` function
- Add `key-value` support
- Remove `*_free` calls since they were buggy and unnecessary given that we tell `tinygo` to leak anyway
- Remove `-wasm-abi=generic` option since it's been removed as of `tinygo` 0.27

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* fix Go CI issues

- Update Go and `tinygo` versions
- Use `interface{}` instead of `any` for broader compatibility
- Make `tinygo-outbound-redis` example sort the `SMEMBERS` result before comparing with the expected value

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* rename Go SDK key-value directory to key_value

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
2023-02-16 15:40:08 -07:00
Konstantin Shabanov f4a64fd196
chore: Unify TinyGo examples
Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>
2022-11-29 13:29:28 +06:00
Konstantin Shabanov 19331d6f31
feat(outbound-redis): Add DEL command (#828)
* chore(outbound-redis): Add basic integration test

Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>

* feat(outbound-redis): Add DEL command

Closes: #801.

Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>

* feat(go-sdk): Add INCR and DEL support

Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>

Signed-off-by: Konstantin Shabanov <mail@etehtsea.me>
2022-10-25 15:09:27 -06:00
Adam Reese 9a46649792
fix(examples): Update examples to use current go SDK 2022-04-27 19:29:22 -07:00
Radu Matei 892a239365
feat: add `spin build` command
This commit adds a new top level Spin command that simplifies building more
complex applications. Specifically, this command will execute the build commands
set in each local component configuration:

```toml
[component.build]
command = "cargo build --target wasm32-wasi --release --manifest-path http-rust/Cargo.toml"
```

The build commands for all components in the local application manifest are
currently run sequentially (running multiple resource-intensive compilation processes
concurrently does not seem to be the most efficient choice currently).

Optionally, after all compilation processes are finished, if the `--up` flag is
passed, the application can be started without calling `spin up`.

This means that the entire developer "inner loop" for working on a Spin application
can be `spin build --up`.

Signed-off-by: Radu Matei <radu.matei@fermyon.com>

feat

Signed-off-by: Radu Matei <radu.matei@fermyon.com>

feat

Signed-off-by: Radu Matei <radu.matei@fermyon.com>
2022-04-27 00:06:10 +03:00
Adam Reese da4e2c8bce
chore(tinygo): Add -no-debug build flag in examples
Adding the --no-debug build flag reduces the wasm binary file size
significantly.

For example building examples/http-tinygo before was 764K.  Now it's
reduced to 221K.
2022-04-22 07:59:21 -07:00
Radu Matei 98a64164fd
chore(sdk/go): consolidate `redis` and `outboun_redis` into single package
This commit consolidates the two new `redis` and `outbound_redis` packages
from the Go SDK into a single `redis` package that contains both the Redis
trigger implementation and the functionality to connect to an external Redis
instance.

Signed-off-by: Radu Matei <radu.matei@fermyon.com>
2022-04-15 01:55:51 +03:00
Adam Reese 8ab0b38ce8
feat(go/redis): tinygo sdk for outbound redis 2022-04-14 14:11:34 -07:00