Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 30 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,33 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install -y libsodium-dev libsecp256k1-dev liblz4-dev

- run: cargo fmt --check
- run: cargo build --verbose
- run: cargo test --lib -- --test-threads=1
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
git \
cmake \
ninja-build \
wget \
libsodium-dev \
libsecp256k1-dev \
liblz4-dev
- name: Install clang 21
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21 clang
- run: cargo fmt --check
env:
CC: clang-21
CXX: clang++-21
- run: cargo build --verbose
env:
CC: clang-21
CXX: clang++-21
- run: cargo test --lib -- --test-threads=1
env:
CC: clang-21
CXX: clang++-21
28 changes: 25 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,36 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install libraries
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsodium-dev libsecp256k1-dev liblz4-dev
sudo apt-get install -y \
build-essential \
git \
cmake \
ninja-build \
wget \
libsodium-dev \
libsecp256k1-dev \
liblz4-dev
- name: Install clang 21
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 21 clang
- run: cargo fmt --check
env:
CC: clang-21
CXX: clang++-21
- run: cargo build --verbose
env:
CC: clang-21
CXX: clang++-21
- run: cargo test --lib -- --test-threads=1
env:
CC: clang-21
CXX: clang++-21
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CRATES_IO_REGISTRY_TOKEN }}
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tonlib-sys"
version = "2026.2.1"
version = "2026.4.0"
edition = "2021"
description = "Rust bindings for tonlibjson library"
license = "MIT"
Expand All @@ -21,3 +21,6 @@ with_debug_info = []

[build-dependencies]
cmake = { version = "0.1", optional = true }
fs2 = "0.4"
dirs = "6.0"
anyhow = "1.0"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Then, in your Rust code, you can import the library with:
use tonlib_sys;
```

## Build

To speed up the build process, the TON monorepo is cloned only once into the ./cargo/git/db/ directory using an fs-lock.

If the cloned repository becomes inconsistent and causes build issues, you can manually remove the TON folder from ./cargo/git/db/ and retry the build.


## Contributing

Expand Down
Loading
Loading