Skip to content

Commit 8cd642e

Browse files
committed
WIP
1 parent 2ffbbda commit 8cd642e

File tree

5 files changed

+14
-55
lines changed

5 files changed

+14
-55
lines changed

Diff for: .cargo/config.toml

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[build]
22
target = "wasm32-wasi"
3+
4+
[term]
5+
color = "always"

Diff for: .github/workflows/test.yml

+5-50
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,8 @@
1-
on: pull_request
21
name: Test
2+
3+
on:
4+
pull_request:
5+
36
jobs:
47
test:
5-
strategy:
6-
matrix:
7-
rust-toolchain: [1.83.0]
8-
platform: [ubuntu-latest]
9-
runs-on: ${{ matrix.platform }}
10-
environment: test
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v3
14-
- name: Install Rust
15-
uses: dtolnay/[email protected]
16-
- name: Add wasm32-wasi Rust target
17-
run: rustup target add wasm32-wasi --toolchain ${{ matrix.rust-toolchain }}
18-
- name: Cache cargo registry
19-
uses: actions/cache@v3
20-
with:
21-
path: ~/.cargo/registry
22-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
23-
- name: Cache cargo index
24-
uses: actions/cache@v3
25-
with:
26-
path: ~/.cargo/git
27-
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
28-
- name: Cache cargo build
29-
uses: actions/cache@v3
30-
with:
31-
path: target
32-
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
33-
- name: Install fmt
34-
run: rustup component add rustfmt
35-
shell: bash
36-
- name: Install clippy
37-
run: rustup component add clippy
38-
shell: bash
39-
- name: Install audit
40-
run: cargo install cargo-audit
41-
shell: bash
42-
- name: Check binaries and format
43-
run: RUSTFLAGS="--deny warnings" cargo check --bins --target wasm32-wasi && cargo fmt -- --check
44-
shell: bash
45-
- name: clippy
46-
run: cargo clippy
47-
shell: bash
48-
- name: audit
49-
run: cargo audit
50-
shell: bash
51-
- name: build
52-
run: cargo build
53-
shell: bash
8+
uses: fastly/devex-reusable-workflows/.github/workflows/compute-starter-kit-rust-test.yml@initial-rust-starter-workflow

Diff for: Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
name = "fastly-compute-project"
33
version = "0.1.0"
44
authors = []
5-
edition = "2018"
6-
# Remove this line if you want to be able to publish this crate as open source on crates.io.
5+
edition = "2021"
6+
# Remove this line if you want to be able to publish this crate on crates.io.
77
# Otherwise, `publish = false` prevents an accidental `cargo publish` from revealing private source.
88
publish = false
99

Diff for: fastly.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# This file describes a Fastly Compute package. To learn more visit:
2-
# https://developer.fastly.com/reference/fastly-toml/
2+
# https://www.fastly.com/documentation/reference/compute/fastly-toml/
33

4-
authors = ["<oss@fastly.com>"]
4+
authors = ["<devrel@fastly.com>"]
55
description = "A basic starter kit that demonstrates routing, simple synthetic responses and overriding caching rules."
66
language = "rust"
77
manifest_version = 3
88
name = "Default starter for Rust"
99

1010
[scripts]
11-
build = "cargo build --bin fastly-compute-project --release --target wasm32-wasi --color always"
11+
build = "cargo build --profile release"

Diff for: rust-toolchain.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[toolchain]
22
channel = "1.83.0"
33
targets = [ "wasm32-wasi" ]
4+
profile = "default"

0 commit comments

Comments
 (0)