-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from G-Core/update_wasmtime
Update wasmtime to 20.0.2
- Loading branch information
Showing
31 changed files
with
4,068 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
output-type: html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
name: Continuous Integration | ||
|
||
on: [ push ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
|
||
- name: Release build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-features | ||
|
||
- name: Install cargo-audit binary crate | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-audit | ||
version: latest | ||
use-tool-cache: true | ||
|
||
- name: Annotate commit with clippy warnings | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
|
||
- name: Security audit | ||
uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
coverage: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: actions-rs/cargo@v1 | ||
name: Run test with code coverage report | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' | ||
|
||
- id: coverage | ||
name: Collect code coverage | ||
uses: actions-rs/[email protected] | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: ${{ steps.coverage.outputs.report }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
needs: coverage | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-wasi | ||
|
||
- name: Run Release PR | ||
uses: MarcoIeni/[email protected] | ||
with: | ||
command: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
|
||
build-cli: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
needs: coverage | ||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
|
||
- name: Release build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --bin cli | ||
|
||
- name: Upload target binary | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cli-${{ matrix.os }} | ||
path: target/release/cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "sdk"] | ||
path = sdk | ||
url = [email protected]:G-Core/FastEdge-sdk-rust.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[workspace] | ||
members = ["crates/*"] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
version = "0.3.7" | ||
edition = "2021" | ||
publish = false | ||
authors = ["FastEdge Development Team"] | ||
|
||
[workspace.dependencies] | ||
tokio = { version = "1", features = ["full"] } | ||
tokio-util = { version = "0.7", features = ["codec"] } | ||
tracing = "0.1" | ||
hyper = { version = "0.14", features = ["full"] } | ||
http = "0.2.9" | ||
async-trait = "0.1" | ||
wasmtime = { version = "20.0" } | ||
wasmtime-wasi = { version = "20.0" } | ||
wasi-common = { version = "20.0" } | ||
wasmtime-wasi-nn = { version = "20.0" } | ||
clap = { version = "4", features = ["derive"] } | ||
moka = { version = "0.12", features = ["sync"] } | ||
smol_str = "0.2.1" | ||
anyhow = "1.0" | ||
|
||
|
||
[workspace.lints.rust] | ||
unused_extern_crates = 'warn' | ||
trivial_numeric_casts = 'warn' | ||
unstable_features = 'warn' | ||
unused_import_braces = 'warn' | ||
|
||
[workspace.lints.clippy] | ||
all = 'allow' | ||
|
||
[package] | ||
name = "cli" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
authors.workspace = true | ||
|
||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
hyper = { workspace = true } | ||
http = { workspace = true } | ||
tokio = { workspace = true } | ||
tokio-util = { workspace = true } | ||
wasmtime = { workspace = true } | ||
wasmtime-wasi = { workspace = true } | ||
smol_str = { workspace = true } | ||
clap = { version = "4.5.0", features = ["derive"] } | ||
pretty_env_logger = "0.5.0" | ||
runtime = { path = "crates/runtime", default-features = false } | ||
http-service = { path = "crates/http-service" } | ||
http-backend = { path = "crates/http-backend" } | ||
hyper-tls = "0.5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "candle-wasi-nn" | ||
version.workspace = true | ||
edition.workspace = true | ||
publish.workspace = true | ||
authors.workspace = true | ||
|
||
[dependencies] | ||
wasmtime-wasi-nn = { workspace = true } | ||
tracing = { workspace = true } | ||
candle-nn = "0.3" | ||
|
||
[target.'cfg(target_os = "macos")'.dependencies] | ||
candle-core = { version = "0.3", features = ["accelerate"] } | ||
candle-transformers = { version = "0.3", features = ["accelerate"] } | ||
|
||
[target.'cfg(not(target_os = "macos"))'.dependencies] | ||
candle-core = { version = "0.3" } | ||
candle-transformers = { version = "0.3" } |
Oops, something went wrong.