chore: cleanup after workspace consolidation

* clean up github actions #537 #536
* Improved README.md (clang + openssl-dev) #536 
+ removed stale build script #537 
* chore: add build script for tlsn-wasm #536

#549
This commit is contained in:
Hendrik Eeckhaut
2024-08-01 14:40:59 +02:00
committed by GitHub
parent 2d44cc4b60
commit 6031254963
7 changed files with 29 additions and 20 deletions

View File

@@ -27,7 +27,7 @@ jobs:
wait-interval: 60 wait-interval: 60
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@v2 uses: docker/login-action@v2

View File

@@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Install stable rust toolchain - name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
@@ -87,9 +87,7 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Use caching - name: Use caching
uses: Swatinem/rust-cache@v2.5.0 uses: Swatinem/rust-cache@v2.7.3
with:
workspaces: crates/wasm-test-runner -> ../target
- name: Run tests - name: Run tests
run: | run: |

View File

@@ -14,7 +14,7 @@ jobs:
rustdoc: rustdoc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install Rust Toolchain (Stable) - name: Install Rust Toolchain (Stable)
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable

View File

@@ -52,6 +52,25 @@ at your option.
This repository contains the source code for the Rust implementation of the TLSNotary protocol. For additional tools and implementations related to TLSNotary, visit <https://github.com/tlsnotary>. This includes repositories such as [`tlsn-js`](https://github.com/tlsnotary/tlsn-js), [`tlsn-extension`](https://github.com/tlsnotary/tlsn-extension), [`explorer`](https://github.com/tlsnotary/explorer), among others. This repository contains the source code for the Rust implementation of the TLSNotary protocol. For additional tools and implementations related to TLSNotary, visit <https://github.com/tlsnotary>. This includes repositories such as [`tlsn-js`](https://github.com/tlsnotary/tlsn-js), [`tlsn-extension`](https://github.com/tlsnotary/tlsn-extension), [`explorer`](https://github.com/tlsnotary/explorer), among others.
## Development
> [!IMPORTANT]
> **Note on Rust-to-WASM Compilation**: This project requires compiling Rust into WASM, which needs [`clang`](https://clang.llvm.org/) version 16.0.0 or newer. MacOS users, be aware that Xcode's default `clang` might be older. If you encounter the error `No available targets are compatible with triple "wasm32-unknown-unknown"`, it's likely due to an outdated `clang`. Updating `clang` to a newer version should resolve this issue.
>
> For MacOS aarch64 users, if Apple's default `clang` isn't working, try installing `llvm` via Homebrew (`brew install llvm`). You can then prioritize the Homebrew `clang` over the default macOS version by modifying your `PATH`. Add the following line to your shell configuration file (e.g., `.bashrc`, `.zshrc`):
> ```sh
> export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
> ```
If you run into this error:
```
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
compilation process.
```
Make sure you have the development packages of OpenSSL installed (`libssl-dev` on Ubuntu or `openssl-devel` on Fedora).
## Contribution ## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted Unless you explicitly state otherwise, any contribution intentionally submitted

View File

@@ -1,11 +0,0 @@
#!/bin/bash
for package in components/tls components/cipher components/universal-hash components/aead components/key-exchange components/prf tlsn notary; do
pushd $package
# cargo update
cargo clean
cargo clippy --all-features -- -D warnings || exit
cargo build || exit
cargo test || exit
popd
done

View File

@@ -5,9 +5,9 @@
This crate must be built using the nightly rust compiler with the following flags: This crate must be built using the nightly rust compiler with the following flags:
```bash ```bash
RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals" \ RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
rustup run nightly \ rustup run nightly \
wasm-pack build --target web . -Z build-std=panic_abort,std wasm-pack build --target web . -- -Zbuild-std=panic_abort,std
``` ```

3
crates/wasm/build.sh Executable file
View File

@@ -0,0 +1,3 @@
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
rustup run nightly \
wasm-pack build --target web . -- -Zbuild-std=panic_abort,std