Add Cargo.toml info

This commit is contained in:
asonix 2020-05-17 19:25:32 -05:00
parent e763aab7f3
commit 9bbd569971
2 changed files with 25 additions and 3 deletions

View file

@ -2,8 +2,19 @@
This crate provides Ext1, Ext2, Ext3, and Ext4 for adding extensions to ActivityStreams types This crate provides Ext1, Ext2, Ext3, and Ext4 for adding extensions to ActivityStreams types
For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1 ## Usage
First, add ActivityStreams to your dependencies
```toml
[dependencies]
activitystreams-new = { version = "0.1.0", git = "https://git.asonix.dog/asonix/activitystreams-sketch" }
activitystreams-ext = { version = "0.1.0", git = "https://git.asonix.dog/asonix/activitystreams-ext" }
[patch.crates-io]
typed-builder = { git = "https://git.asonix.dog/asonix/typed-builder" }
```
For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1
```rust ```rust
use activitystreams_ext::{Ext1, UnparsedExtension}; use activitystreams_ext::{Ext1, UnparsedExtension};
use activitystreams_new::{ use activitystreams_new::{

View file

@ -1,9 +1,20 @@
//! An extension API for activitystreams-new //! # An extension API for activitystreams-new
//! //!
//! This crate provides Ext1, Ext2, Ext3, and Ext4 for adding extensions to ActivityStreams types //! This crate provides Ext1, Ext2, Ext3, and Ext4 for adding extensions to ActivityStreams types
//! //!
//! For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1 //! ## Usage
//! //!
//! First, add ActivityStreams to your dependencies
//! ```toml
//! [dependencies]
//! activitystreams-new = { version = "0.1.0", git = "https://git.asonix.dog/asonix/activitystreams-sketch" }
//! activitystreams-ext = { version = "0.1.0", git = "https://git.asonix.dog/asonix/activitystreams-ext" }
//!
//! [patch.crates-io]
//! typed-builder = { git = "https://git.asonix.dog/asonix/typed-builder" }
//! ```
//!
//! For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1
//! ```rust //! ```rust
//! use activitystreams_ext::{Ext1, UnparsedExtension}; //! use activitystreams_ext::{Ext1, UnparsedExtension};
//! use activitystreams_new::{ //! use activitystreams_new::{