-
Notifications
You must be signed in to change notification settings - Fork 1
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 #9 from golemcloud/golem-rust-api-1
High level Rust API for Golem's transactional host functions
- Loading branch information
Showing
65 changed files
with
7,738 additions
and
330 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 |
---|---|---|
|
@@ -16,27 +16,32 @@ jobs: | |
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
- name: Clippy | ||
run: cargo clippy -- -Dwarnings | ||
- name: Tests | ||
run: cargo test --all-features | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-is | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: cargo-bins/cargo-binstall@main | ||
- name: Install cargo-component | ||
run: cargo binstall --no-confirm [email protected] | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
- name: Clippy | ||
run: cargo clippy -- -Dwarnings | ||
- name: Tests | ||
run: cargo test --all-features | ||
- name: Build golem-rust component | ||
run: cargo component build -p golem-rust | ||
|
||
publish: | ||
needs: [ build ] | ||
|
@@ -64,10 +69,12 @@ jobs: | |
override: true | ||
- id: get_version | ||
uses: battila7/get-version-action@v2 | ||
- name: Publish crate | ||
- name: Publish crates | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
run: | | ||
export VERSION="${{ steps.get_version.outputs.version-without-v }}" | ||
sed -i "s/0.0.0/$VERSION/g" Cargo.toml | ||
cargo publish --all-features --allow-dirty | ||
sed -i "s/0.0.0/$VERSION/g" golem-rust-macro/Cargo.toml | ||
sed -i "s/0.0.0/$VERSION/g" golem-rust/Cargo.toml | ||
cargo publish -p golem-rust-macro --all-features --allow-dirty | ||
cargo publish -p golem-rust --all-features --allow-dirty |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,13 @@ | ||
[package] | ||
name = "golem-rust" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
homepage = "https://golem.cloud" | ||
description = "Golem Rust tooling library that facilitates writing Golem backends in Rust" | ||
[workspace] | ||
resolver = "2" | ||
|
||
[lib] | ||
proc-macro = true | ||
path = "src/lib.rs" | ||
members = [ | ||
"golem-rust-macro", | ||
"golem-rust", | ||
] | ||
|
||
[profile.release] | ||
debug = false | ||
lto = true | ||
opt-level = 's' | ||
|
||
[dependencies] | ||
proc-macro2 = "1.0.70" | ||
quote = "1.0.33" | ||
syn = { version = "2.0.39", features = ["extra-traits", "full", "fold"] } |
Oops, something went wrong.