Skip to content

Commit

Permalink
Merge pull request #9 from golemcloud/golem-rust-api-1
Browse files Browse the repository at this point in the history
High level Rust API for Golem's transactional host functions
  • Loading branch information
jdegoes authored Apr 12, 2024
2 parents 813d490 + baffd04 commit 93cbc82
Show file tree
Hide file tree
Showing 65 changed files with 7,738 additions and 330 deletions.
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
83 changes: 76 additions & 7 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

0 comments on commit 93cbc82

Please sign in to comment.