You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/01/31 13:20:21 UTC
[avro] 01/01: AVRO-3339 Rust: Rename crate from avro-rs to apache-avro
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch avro-3339-rename-crate
in repository https://gitbox.apache.org/repos/asf/avro.git
commit 97a0ed28ee3d73cbbe6abba339457f9a7d0fa380
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Jan 31 15:16:45 2022 +0200
AVRO-3339 Rust: Rename crate from avro-rs to apache-avro
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
lang/rust/Cargo.toml | 4 ++--
lang/rust/README.md | 26 +++++++++++++-------------
lang/rust/README.tpl | 4 ++--
lang/rust/build.sh | 2 +-
lang/rust/src/lib.rs | 12 ++++++------
5 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/lang/rust/Cargo.toml b/lang/rust/Cargo.toml
index 0f230a4..dba7266 100644
--- a/lang/rust/Cargo.toml
+++ b/lang/rust/Cargo.toml
@@ -16,7 +16,7 @@
# under the License.
[package]
-name = "avro-rs"
+name = "apache-avro"
version = "0.14.0"
authors = ["Apache Avro team <de...@avro.apache.org>"]
description = "A library for working with Apache Avro in Rust"
@@ -26,7 +26,7 @@ repository = "https://github.com/apache/avro"
edition = "2018"
keywords = ["avro", "data", "serialization"]
categories = ["encoding"]
-documentation = "https://docs.rs/avro-rs"
+documentation = "https://docs.rs/apache-avro"
[features]
snappy = ["crc32fast", "snap"]
diff --git a/lang/rust/README.md b/lang/rust/README.md
index 0282d51..580ffd8 100644
--- a/lang/rust/README.md
+++ b/lang/rust/README.md
@@ -17,16 +17,16 @@
under the License.
-->
-# avro-rs
+# apache-avro
-[![Latest Version](https://img.shields.io/crates/v/avro-rs.svg)](https://crates.io/crates/avro-rs)
+[![Latest Version](https://img.shields.io/crates/v/apache-avro.svg)](https://crates.io/crates/apache-avro)
[![Rust Continuous Integration](https://github.com/apache/avro/actions/workflows/test-lang-rust-ci.yml/badge.svg)](https://github.com/apache/avro/actions/workflows/test-lang-rust-ci.yml)
-[![Latest Documentation](https://docs.rs/avro-rs/badge.svg)](https://docs.rs/avro-rs)
+[![Latest Documentation](https://docs.rs/apache-avro/badge.svg)](https://docs.rs/apache-avro)
[![Apache License 2.0](https://img.shields.io/badge/license-Apache%202-blue.svg](https://github.com/apache/avro/blob/master/LICENSE.txt)
A library for working with [Apache Avro](https://avro.apache.org/) in Rust.
-Please check our [documentation](https://docs.rs/avro-rs) for examples, tutorials and API reference.
+Please check our [documentation](https://docs.rs/apache-avro) for examples, tutorials and API reference.
**[Apache Avro](https://avro.apache.org/)** is a data serialization system which provides rich
data structures and a compact, fast, binary data format.
@@ -50,7 +50,7 @@ There are basically two ways of handling Avro data in Rust:
* **as generic Rust serde-compatible types** implementing/deriving `Serialize` and
`Deserialize`;
-**avro-rs** provides a way to read and write both these data representations easily and
+**apache-avro** provides a way to read and write both these data representations easily and
efficiently.
## Installing the library
@@ -60,13 +60,13 @@ Add to your `Cargo.toml`:
```toml
[dependencies]
-avro-rs = "x.y"
+apache-avro = "x.y"
```
Or in case you want to leverage the **Snappy** codec:
```toml
-[dependencies.avro-rs]
+[dependencies.apache-avro]
version = "x.y"
features = ["snappy"]
```
@@ -74,7 +74,7 @@ features = ["snappy"]
Or in case you want to leverage the **Zstandard** codec:
```toml
-[dependencies.avro-rs]
+[dependencies.apache-avro]
version = "x.y"
features = ["zstandard"]
```
@@ -82,7 +82,7 @@ features = ["zstandard"]
Or in case you want to leverage the **Bzip2** codec:
```toml
-[dependencies.avro-rs]
+[dependencies.apache-avro]
version = "x.y"
features = ["bzip"]
```
@@ -90,7 +90,7 @@ features = ["bzip"]
Or in case you want to leverage the **Xz** codec:
```toml
-[dependencies.avro-rs]
+[dependencies.apache-avro]
version = "x.y"
features = ["xz"]
```
@@ -431,7 +431,7 @@ fn main() -> Result<(), Error> {
}
```
-`avro-rs` also supports the logical types listed in the [Avro specification](https://avro.apache.org/docs/current/spec.html#Logical+Types):
+`apache-avro` also supports the logical types listed in the [Avro specification](https://avro.apache.org/docs/current/spec.html#Logical+Types):
1. `Decimal` using the [`num_bigint`](https://docs.rs/num-bigint/0.2.6/num_bigint) crate
1. UUID using the [`uuid`](https://docs.rs/uuid/0.8.1/uuid) crate
@@ -590,7 +590,7 @@ If encoded data passed to a `Reader` has been ill-formed, it can happen that
the bytes meant to contain the length of data are bogus and could result
in extravagant memory allocation.
-To shield users from ill-formed data, `avro-rs` sets a limit (default: 512MB)
+To shield users from ill-formed data, `apache-avro` sets a limit (default: 512MB)
to any allocation it will perform when decoding data.
If you expect some of your data fields to be larger than this limit, be sure
@@ -615,7 +615,7 @@ max_allocation_bytes(2 * 1024 * 1024 * 1024); // 2GB
This library supports checking for schemas compatibility.
Note: It does not yet support named schemas (more on
-https://github.com/flavray/avro-rs/pull/76).
+https://github.com/flavray/apache-avro/pull/76).
Examples of checking for compatibility:
diff --git a/lang/rust/README.tpl b/lang/rust/README.tpl
index 88830d1..a1184ac 100644
--- a/lang/rust/README.tpl
+++ b/lang/rust/README.tpl
@@ -1,8 +1,8 @@
# {{crate}}
-[![Latest Version](https://img.shields.io/crates/v/avro-rs.svg)](https://crates.io/crates/avro-rs)
+[![Latest Version](https://img.shields.io/crates/v/apache-avro.svg)](https://crates.io/crates/apache-avro)
[![Rust Continuous Integration](https://github.com/apache/avro/actions/workflows/test-lang-rust-ci.yml/badge.svg)](https://github.com/apache/avro/actions/workflows/test-lang-rust-ci.yml)
-[![Latest Documentation](https://docs.rs/avro-rs/badge.svg)](https://docs.rs/avro-rs)
+[![Latest Documentation](https://docs.rs/apache-avro/badge.svg)](https://docs.rs/apache-avro)
[![Apache License 2.0](https://img.shields.io/badge/license-Apache%202-blue.svg](https://github.com/apache/avro/blob/master/LICENSE.txt)
{{readme}}
diff --git a/lang/rust/build.sh b/lang/rust/build.sh
index 2f0a824..5fa3813 100755
--- a/lang/rust/build.sh
+++ b/lang/rust/build.sh
@@ -53,7 +53,7 @@ do
cargo build --release --lib --all-features
cargo package
mkdir -p ../../dist/rust
- cp target/package/avro-rs-*.crate $dist_dir
+ cp target/package/apache-avro-*.crate $dist_dir
;;
interop-data-generate)
prepare_build
diff --git a/lang/rust/src/lib.rs b/lang/rust/src/lib.rs
index af6e3cf..65cbbc0 100644
--- a/lang/rust/src/lib.rs
+++ b/lang/rust/src/lib.rs
@@ -17,7 +17,7 @@
//! A library for working with [Apache Avro](https://avro.apache.org/) in Rust.
//!
-//! Please check our [documentation](https://docs.rs/avro-rs) for examples, tutorials and API reference.
+//! Please check our [documentation](https://docs.rs/apache-avro) for examples, tutorials and API reference.
//!
//! **[Apache Avro](https://avro.apache.org/)** is a data serialization system which provides rich
//! data structures and a compact, fast, binary data format.
@@ -41,7 +41,7 @@
//! * **as generic Rust serde-compatible types** implementing/deriving `Serialize` and
//! `Deserialize`;
//!
-//! **avro-rs** provides a way to read and write both these data representations easily and
+//! **apache-avro** provides a way to read and write both these data representations easily and
//! efficiently.
//!
//! # Installing the library
@@ -51,13 +51,13 @@
//!
//! ```toml
//! [dependencies]
-//! avro-rs = "x.y"
+//! apache-avro = "x.y"
//! ```
//!
//! Or in case you want to leverage the **Snappy** codec:
//!
//! ```toml
-//! [dependencies.avro-rs]
+//! [dependencies.apache-avro]
//! version = "x.y"
//! features = ["snappy"]
//! ```
@@ -509,7 +509,7 @@
//! }
//! ```
//!
-//! `avro-rs` also supports the logical types listed in the [Avro specification](https://avro.apache.org/docs/current/spec.html#Logical+Types):
+//! `apache-avro` also supports the logical types listed in the [Avro specification](https://avro.apache.org/docs/current/spec.html#Logical+Types):
//!
//! 1. `Decimal` using the [`num_bigint`](https://docs.rs/num-bigint/0.2.6/num_bigint) crate
//! 1. UUID using the [`uuid`](https://docs.rs/uuid/0.8.1/uuid) crate
@@ -668,7 +668,7 @@
//! the bytes meant to contain the length of data are bogus and could result
//! in extravagant memory allocation.
//!
-//! To shield users from ill-formed data, `avro-rs` sets a limit (default: 512MB)
+//! To shield users from ill-formed data, `apache-avro` sets a limit (default: 512MB)
//! to any allocation it will perform when decoding data.
//!
//! If you expect some of your data fields to be larger than this limit, be sure