Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: powturbo/Turbo-Base64
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: opstic/Turbo-Base64
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 5 commits
  • 4 files changed
  • 1 contributor

Commits on Oct 29, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    opstic Opstic
    Copy the full SHA
    0a1fc84 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    opstic Opstic
    Copy the full SHA
    f1ec2fc View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    opstic Opstic
    Copy the full SHA
    279eefa View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    opstic Opstic
    Copy the full SHA
    9c92a64 View commit details
  5. License the bindings as LGPL

    opstic committed Oct 29, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    opstic Opstic
    Copy the full SHA
    24b51e7 View commit details
Showing with 16 additions and 10 deletions.
  1. +6 −1 rust/Cargo.toml
  2. +7 −7 rust/README.md
  3. +3 −1 rust/build.rs
  4. +0 −1 rust/src/lib.rs
7 changes: 6 additions & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[package]
authors = ["powturbo <powturbo [AT] gmail [DOT] com>"]
build = "build.rs"
name = "Turbo-Base64"
name = "turbo-base64-sys"
version = "0.60.0"
license = "LGPL-3.0-or-later"

[lib]
crate-type=["dylib"]

[dependencies]
rand = "0.8"

[build-dependencies]
bindgen = "*"
cmake = "0.1"
14 changes: 7 additions & 7 deletions rust/README.md
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@

This is a wrapper for [Turbo-Base64](https://github.com/powturbo/Turbo-Base64).

## Installation
1- Prerequistes: build and install the Turbo-Base64 library libtb64.a into /usr/local/lib

2 - Use the provided src/bindings.rs file or generate a new rust bindings.rs file.
```shell
cargo build
## Usage
Add the git repository url to your Cargo.toml as follows:
```
Turbo-Base64 = { git = "https://github.com/powturbo/turbo-base64" }
```
3 - Test

## Testing
```shell
cargo test
```

## Examples
- see the tests.rs file in the src folder
- a list of public functions are available in the bindings.rs file
4 changes: 3 additions & 1 deletion rust/build.rs
Original file line number Diff line number Diff line change
@@ -5,7 +5,9 @@ use std::env;
use std::path::PathBuf;

fn main() {
println!("cargo:rustc-link-lib=tb64");
let dst = cmake::build("..");
println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-lib=static=base64");

let bindings = bindgen::Builder::default()
.header("wrapper.h")
1 change: 0 additions & 1 deletion rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// prerequisites: Install Turbo-Base64 library tb64lib under /usr/lib or /usr/local/lib
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]