Skip to content

Commit 9ac0d60

Browse files
authored
Merge branch 'cardano-chain-follower-api-design' into cardano-chain-follower-impl
2 parents b4d42c8 + 29ccdb9 commit 9ac0d60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+7187
-7
lines changed

.github/workflows/flitter-mobile-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
timeout-minutes: 30
2323
steps:
2424
- name: ⬇️ Checkout repository
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626

2727
- name: ⤵️ Authenticate with Google Cloud Platform
28-
uses: "google-github-actions/auth@v1"
28+
uses: "google-github-actions/auth@v2"
2929
with:
3030
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS_INTEGRATION_TESTS }}"
3131

3232
- name: ⚙️ Setup Google Cloud SDK
3333
uses: google-github-actions/setup-gcloud@v1
3434

3535
- name: ⚙️ Setup Java
36-
uses: actions/setup-java@v1
36+
uses: actions/setup-java@v4
3737
with:
3838
java-version: "12.x"
3939

.github/workflows/flitter-web-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
timeout-minutes: 30
3131
steps:
3232
- name: ⬇️ Checkout repository
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

3535
- name: ⚙️ Setup Flutter
3636
uses: subosito/flutter-action@v2

.github/workflows/stale-branches.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Stale Branches
16-
uses: crs-k/stale-branches@v3.0.1
16+
uses: crs-k/stale-branches@v3.1.3
1717
with:
1818
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1919
days-before-stale: 30

.markdownlint-cli2.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
],
1010
"ignores": [
1111
".config/dictionaries/**",
12-
"hermes/target/**"
12+
"**/target/**",
13+
"hermes/wasm/*/**"
1314
],
1415
// Set standard config options in `/.markdownlint.jsonc`
1516
"config": {

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
".git/**",
225225
"**/.gitignore",
226226
".vscode/**",
227-
"**/.idea/**"
227+
"**/.idea/**",
228+
"hermes/wasm/*/**"
228229
]
229230
}

hermes/wasm/.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build]
2+
3+
target = "wasm32-unknown-unknown"
4+
5+
rustflags = ["--cap-lints", "warn"]

hermes/wasm/Cargo.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#cspell: words Apisit Ritreungroj wasmparser wasi bindgen
2+
3+
[workspace]
4+
resolver = "2"
5+
members = [
6+
"crates/wasi-component-adapter",
7+
"crates/wasi-component-adapter/verify",
8+
]
9+
10+
[workspace.package]
11+
edition = "2021"
12+
version = "0.0.1"
13+
authors = [
14+
"Apisit Ritreungroj <apisit.ritreungroj@iohk.io>",
15+
"Steven Johnson <steven.johnson@iohk.io>"
16+
]
17+
rust-version = "1.73"
18+
homepage = "https://input-output-hk.github.io/hermes"
19+
repository = "https://github.com/input-output-hk/hermes"
20+
license = "MIT OR Apache-2.0"
21+
22+
[workspace.dependencies]
23+
24+
# for `wasi-preview1-component-adapter`
25+
wit-bindgen = "0.16.0"
26+
byte-array-literals = { path = "./crates/wasi-component-adapter/byte-array-literals", version = "0.0.1" }
27+
wasm-encoder = "0.38.1"
28+
object = "0.32.1"
29+
30+
# for `wasi-preview1-component-adapter/verify`
31+
wasmparser = "0.118.1"
32+
wat = "1.0.82"
33+
anyhow = "1.0.76"
34+
35+
[workspace.lints]

hermes/wasm/Earthfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
VERSION 0.7
2+
3+
#cspell: words fmtchk rustfmt toolsets wasi wasmtime Earthfile
4+
5+
# Fork the repo `wasmtime` and extract only the `wasi-preview1-component-adapter` crate from it.
6+
fork-wasi-component-adapter:
7+
LOCALLY
8+
9+
# The local directory to store `wasi/wit`.
10+
# This needs to include along with `wasi-preview1-component-adapter`.
11+
ARG wit_local_dir=crates/wasi
12+
# The local directory to place the extracted `wasi` crate.
13+
ARG wasi_local_dir=crates/wasi-component-adapter
14+
# The location after the `wasmtime` repo was cloned.
15+
ARG wasi_git_dir=wasmtime/crates/wasi-preview1-component-adapter
16+
17+
# Remove the existing local one. Clone and extract it from the repo.
18+
RUN rm -rf $wasi_local_dir/ || true && \
19+
rm -rf $wit_local_dir/ || true && \
20+
git clone --depth 1 https://github.com/bytecodealliance/wasmtime.git && \
21+
mv $wasi_git_dir $wasi_local_dir && \
22+
mkdir $wit_local_dir && \
23+
mv wasmtime/crates/wasi/wit $wit_local_dir/wit && \
24+
rm -rf wasmtime/
25+
26+
# Set up our target toolchains, and copy our files.
27+
builder:
28+
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+rust-base
29+
30+
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SETUP --toolchain=rust-toolchain.toml
31+
32+
COPY --dir .cargo Cargo.* clippy.toml deny.toml rustfmt.toml crates .
33+
34+
# Run quality checks.
35+
check:
36+
FROM +builder
37+
38+
RUN cargo machete && \
39+
# cargo +nightly fmtchk && \
40+
cargo deny check
41+
42+
# DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+CHECK
43+
44+
build:
45+
FROM +builder
46+
47+
RUN cargo build --release
48+
49+
SAVE ARTIFACT target/wasm32-unknown-unknown/release/wasi_snapshot_preview1.wasm wasi-component-adapter.wasm

hermes/wasm/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Hermes - WASM
2+
3+
<!-- cspell: words wasmtime wasi -->
4+
5+
This directory contains standalone Rust code that is not used as a project dependency.
6+
The primary purpose of these Rust files and packages is to compile into WebAssembly (Wasm).
7+
This code contains the forked code from
8+
[wasmtime](https://github.com/bytecodealliance/wasmtime/tree/main/crates/wasi-preview1-component-adapter),
9+
located in `crates/wasi-component-adapter` and `crates/wasi`.
10+
11+
## Configuration
12+
13+
The Rust configuration file locates in `.cargo/config.toml`.
14+
It already specified the build target to `wasm32-unknown-unknown`.
15+
16+
To compile all the packages, simply run the command:
17+
18+
```bash
19+
cargo build --release
20+
```
21+
22+
To build the WebAssembly binary output `.wasm`.

hermes/wasm/clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
allow-unwrap-in-tests = true

0 commit comments

Comments
 (0)