Skip to content

Commit

Permalink
RUST-1635 Document WASM support (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
abr-egn committed Apr 25, 2023
1 parent 3cc6dd3 commit 70b49c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Encoding and decoding support for BSON in Rust
- [Modeling BSON with strongly typed data structures](#modeling-bson-with-strongly-typed-data-structures)
- [Working with datetimes](#working-with-datetimes)
- [Working with UUIDs](#working-with-uuids)
- [WASM support](#wasm-support)
- [Contributing](#contributing)
- [Running the Tests](#running-the-tests)
- [Continuous Integration](#continuous-integration)
Expand Down Expand Up @@ -250,6 +251,10 @@ let query = doc! {

See the module-level documentation for the [`bson::uuid` module](https://docs.rs/bson/latest/bson/uuid).

### WASM support

This crate compiles to the `wasm32-unknown-unknown` target; when doing so, the `js-sys` crate is used for the current timestamp component of `ObjectId` generation.

## Minimum supported Rust version (MSRV)

The MSRV for this crate is currently 1.48.0. This will be rarely be increased, and if it ever is,
Expand Down
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@
//!
//! See the module level documentation for the [`uuid`] module.
//!
//! ## WASM support
//!
//! This crate compiles to the `wasm32-unknown-unknown` target; when doing so, the `js-sys` crate is
//! used for the current timestamp component of `ObjectId` generation.
//!
//! ## Minimum supported Rust version (MSRV)
//!
//! The MSRV for this crate is currently 1.56.0. This will be rarely be increased, and if it ever is,
Expand All @@ -271,9 +276,9 @@

#[doc(inline)]
pub use self::{
binary::Binary,
bson::{Array, Bson, DbPointer, Document, JavaScriptCodeWithScope, Regex, Timestamp},
datetime::DateTime,
binary::Binary,
de::{
from_bson, from_bson_with_options, from_document, from_document_with_options, from_reader,
from_reader_utf8_lossy, from_slice, from_slice_utf8_lossy, Deserializer,
Expand All @@ -293,8 +298,8 @@ pub use self::{

#[macro_use]
mod macros;
mod bson;
pub mod binary;
mod bson;
pub mod datetime;
pub mod de;
pub mod decimal128;
Expand Down

0 comments on commit 70b49c5

Please sign in to comment.