diff --git a/README.md b/README.md index 3c42ff6..7c679a7 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,19 @@ 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 use activitystreams_ext::{Ext1, UnparsedExtension}; use activitystreams_new::{ diff --git a/src/lib.rs b/src/lib.rs index 5b003ab..f82b0c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 //! -//! 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 //! use activitystreams_ext::{Ext1, UnparsedExtension}; //! use activitystreams_new::{