Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High level Rust API for Golem's transactional host functions #9

Merged
merged 20 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 31 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down Expand Up @@ -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
61 changes: 61 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 11 additions & 14 deletions Cargo.toml
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"] }
Loading
Loading