File tree 5 files changed +29
-58
lines changed
5 files changed +29
-58
lines changed Original file line number Diff line number Diff line change 1
1
[build ]
2
- target = " wasm32-wasi"
2
+ target = " wasm32-wasip1"
3
+
4
+ [term ]
5
+ color = " always"
Original file line number Diff line number Diff line change 1
- on : pull_request
2
1
name : Test
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - ' Cargo.toml'
7
+ - ' rust-toolchain.toml'
8
+ - ' .cargo/config.toml'
9
+ - ' .github/workflows/test.yml'
10
+ - ' src/**'
11
+
3
12
jobs :
4
13
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
-
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
14
+ uses : fastly/devex-reusable-workflows/.github/workflows/compute-starter-kit-rust-v1.yml@main
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " fastly-compute-project"
3
3
version = " 0.1.0"
4
+ authors = []
4
5
edition = " 2021"
5
- # Remove this line if you want to be able to publish this crate as open source on crates.io.
6
+ # Remove this line if you want to be able to publish this crate on crates.io.
6
7
# Otherwise, `publish = false` prevents an accidental `cargo publish` from revealing private source.
7
8
publish = false
8
9
9
10
[profile .release ]
10
11
debug = 1
12
+ codegen-units = 1
13
+ lto = " fat"
11
14
12
15
[dependencies ]
13
16
fastly = " 0.11.0"
Original file line number Diff line number Diff line change 1
-
2
- description = " An empty starter kit project template."
1
+ # This file describes a Fastly Compute package. To learn more visit:
2
+ # https://www.fastly.com/documentation/reference/compute/fastly-toml/
3
+
4
+ name = " Empty starter for Rust"
5
+ description = " Starter kit that provides an empty service."
6
+
3
7
language = " rust"
4
8
manifest_version = 3
5
- name = " Empty starter for Rust"
6
9
7
10
[scripts ]
8
- build = " cargo build --bin fastly-compute-project -- release --target wasm32-wasi --color always "
11
+ build = " cargo build --profile release"
Original file line number Diff line number Diff line change 1
1
[toolchain ]
2
- channel = " 1.83.0"
3
- targets = [ " wasm32-wasi" ]
2
+ channel = " stable"
3
+ targets = [ " wasm32-wasip1" ]
4
+ profile = " default"
You can’t perform that action at this time.
0 commit comments