Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
Remove Fermyon Platform tests
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
Test that cloud plugin is installed during a spin login
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
Syntactical nits
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
This updates to Rust 1.68 and adds the `wasm32-unknown-unknown` target, both of which are needed to build `spin-componentize`.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* implement component support
This updates Spin to use [the Component
Model](https://github.com/WebAssembly/component-model/tree/main/design/high-level)
natively instead of core Wasm modules (except for WAGI -- see below).
Core modules are still supported transparently via
[`spin-componentize`](https://github.com/fermyon/spin-componentize).
For now, the SDKs will continue to produce core modules (which the
developer can convert to components ahead of time via
`spin-componentize` if desired). Eventually, we'll want the SDKs to
target the Component Model directly as language toolchain support
matures. For the time being, though, we'll consider Component support
experimental.
WAGI is stuck on Preview 1 and modules because there's no reliable way
to wrap an arbitrary Preview 1 command in a component -- the Preview 1
-> 2 adapter only works with modules that either export
`canonical_abi_realloc` (e.g. native Spin apps) or use a recent
version of `wasi-sdk`, which contains patches to allow the adapter to
safely allocate memory via `memory.grow`.
In theory, someone could build a WAGI app using a new-enough version
of `wasi-sdk` and wrap it in a component using the adapter, but that
wouldn't add any value beyond leaving it as a module, and any
toolchain capable of natively producing components will be capable
enough to produce native Spin apps, so we probably won't ever support
WAGI components.
Note that I've moved the `spin-abi-conformance` project from this repo
to `spin-componentize` since it seems more relevant (and more likely
to be kept up-to-date) there. We can move it back later if that
changes.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
add `rustup target add wasm32-unknown-unknown` to CI
This is needed to build `spin-componentize`.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
update `spin-componentize` dep
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
install `rust-wasm` deps for lint job
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
update to Rust 1.68 to help CI build component adapter
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
update `spin-componentize` dep (again)
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
update Dockerfiles so they can build `spin-componentize`
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
switch back to fermyon/wit-bindgen-backport repo
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* change `spin_core::Wasi` from a struct to an enum
This helps us detect and raise errors earlier if code tries to
initialize a Preview 1 store in a way only supported by Preview 2, or
vice versa. The duplication is still pretty ugly, but will go away
once the upstream WASI implementations are merged together.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
* use newfangled refutable-let-or-diverge syntax
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
---------
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
This script semi-automates the process of backporting a PR from one
branch to another. Ex: `gh-backport.sh 123 v1.0`
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
* export SDK version and language functions per SIP 011
Per
https://github.com/fermyon/spin/blob/main/docs/content/sips/011-component-versioning.md,
this commit adds `spin-sdk-version-$VERSION`,
`spin-sdk-language-$LANGUAGE`, and `spin-sdk-commit-$COMMIT` exports
to any module using the Rust or Go SDKs.
Regarding the version, we'll want to update it before and after every
Spin release _and_ each time the ABI or API changes. See the SIP for
details.
Note that the `spin-sdk-language-$LANGUAGE` export is gated on a
default-enabled feature for the Rust SDK, since the JS and Python SDKs
will want to override it.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
Committer: Rajat Jindal <rajatjindal@gmail.com>
update documentation for aarch64
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
* 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>
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
use reusable actions in build flow
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
use reusable actions in code coverage flow
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
windows sdk is disabled in main due to intermittent failures
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
The test-rust job doesn't actually require anything from the build-rust job, since it uses debug builds, but the build-rust job builds release ones. Removing this dependency should hopefully improve our wallclock time for CI runs.
Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
Incremental builds aren't useful in CI, because there will never be additional builds in the same environment with only slight changes to code. At the same time, they impose a certain amount of time overhead, and consume lots of disk space. Since we sometimes run out of disk space on GH Actions Windows runners, in particular that latter aspect is relevant here.
Signed-off-by: Till Schneidereit <till@tillschneidereit.net>