Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .fastly/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ toolchain_constraint_tinygo = ">= 1.18" # Go toolchain constraint for use wit
toolchain_constraint = ">= 1.78 != 1.91.0 != 1.93.0"
wasm_wasi_target = "wasm32-wasip1"

[language.cpp]
toolchain_constraint = ">= 14.0.0"
wasm_wasi_target = "wasm32-wasip1"

[wasm-tools]
ttl = "24h"

Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ permissions:
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
env:
GO_VERSION: 1.25.x
GOLANGCI_LINT_VERSION: v2.4
WASI_SDK_VERSION: 25
WASI_SDK_FULL_VERSION: "25.0"
jobs:
changelog:
if: github.actor != 'dependabot[bot]'
Expand Down Expand Up @@ -47,7 +52,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
go-version: ${{ env.GO_VERSION }}
- name: "Install dependencies"
run: make mod-download
shell: bash
Expand All @@ -60,7 +65,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.4
version: ${{ env.GOLANGCI_LINT_VERSION }}
only-new-issues: true
test:
needs: [config]
Expand Down Expand Up @@ -94,6 +99,27 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: "Install WASI SDK (Ubuntu)"
if: matrix.platform == 'ubuntu-latest'
run: |
wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-x86_64-linux.tar.gz
tar xzf wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-x86_64-linux.tar.gz
echo "$(pwd)/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-x86_64-linux/bin" >> $GITHUB_PATH
shell: bash
- name: "Install WASI SDK (macOS)"
if: matrix.platform == 'macos-latest'
run: |
wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-arm64-macos.tar.gz
tar xzf wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-arm64-macos.tar.gz
echo "$(pwd)/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-arm64-macos/bin" >> $GITHUB_PATH
shell: bash
- name: "Install WASI SDK (Windows)"
if: matrix.platform == 'windows-latest'
run: |
Invoke-WebRequest -Uri "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${{ env.WASI_SDK_VERSION }}/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-x86_64-windows.tar.gz" -OutFile "wasi-sdk.tar.gz"
tar -xzf wasi-sdk.tar.gz
echo "$PWD/wasi-sdk-${{ env.WASI_SDK_FULL_VERSION }}-x86_64-windows/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
Comment thread
anthony-gomez-fastly marked this conversation as resolved.
- name: "Config Artifact"
uses: actions/download-artifact@v8
with:
Expand Down Expand Up @@ -168,7 +194,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.25.x
go-version: ${{ env.GO_VERSION }}
- name: Run golangci-lint@latest
id: lint
uses: golangci/golangci-lint-action@v9
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

### Enhancements:

- feat(compute): add support for cpp for compute ([#1773](https://github.com/fastly/cli/pull/1773))

### Dependencies:
- build(deps): `golang.org/x/term` from 0.41.0 to 0.42.0 ([#1726](https://github.com/fastly/cli/pull/1726))
- build(deps): `golang.org/x/crypto` from 0.49.0 to 0.50.0 ([#1726](https://github.com/fastly/cli/pull/1726))
Expand Down
6 changes: 6 additions & 0 deletions pkg/commands/compute/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,12 @@ func identifyToolchain(c *BuildCommand) (string, error) {
func language(toolchain, manifestFilename string, c *BuildCommand, in io.Reader, out io.Writer, spinner text.Spinner) (*Language, error) {
var language *Language
switch toolchain {
case "cpp":
language = NewLanguage(&LanguageOptions{
Name: "cpp",
SourceDirectory: CPPSourceDirectory,
Toolchain: NewCPP(c, in, manifestFilename, out, spinner),
})
case "go":
language = NewLanguage(&LanguageOptions{
Name: "go",
Expand Down
Loading
Loading