Skip to content

Commit

Permalink
WIP: Serde
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvalencik committed Dec 21, 2022
1 parent d84bf34 commit 3338414
Show file tree
Hide file tree
Showing 16 changed files with 2,978 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[alias]
# Neon defines mutually exclusive feature flags which prevents using `cargo clippy --all-features`
# The following aliases simplify linting the entire workspace
neon-check = " check --all --all-targets --features napi-experimental,futures,external-buffers"
neon-clippy = "clippy --all --all-targets --features napi-experimental,futures,external-buffers -- -A clippy::missing_safety_doc"
neon-test = " test --all --features=doc-comment,napi-experimental,futures,external-buffers"
neon-doc = " rustdoc -p neon --features=doc-dependencies,napi-experimental,futures,external-buffers -- --cfg docsrs"
neon-check = " check --all --all-targets --features napi-experimental,futures,external-buffers,serde"
neon-clippy = "clippy --all --all-targets --features napi-experimental,futures,external-buffers,serde -- -A clippy::missing_safety_doc"
neon-test = " test --all --features=doc-comment,napi-experimental,futures,external-buffers,serde"
neon-doc = " rustdoc -p neon --features=doc-dependencies,napi-experimental,futures,external-buffers,serde -- --cfg docsrs"
56 changes: 56 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/neon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ once_cell = "1.10.0"
neon-macros = { version = "=1.0.0-alpha.2", path = "../neon-macros" }
aquamarine = { version = "0.1.11", optional = true }
doc-comment = { version = "0.3.3", optional = true }
serde = { version = "1", optional = true }

[dependencies.tokio]
version = "1.18.2"
Expand Down
5 changes: 5 additions & 0 deletions crates/neon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ pub mod object;
pub mod prelude;
pub mod reflect;
pub mod result;
#[cfg(feature = "serde")]
mod serde;
mod sys;
#[cfg(feature = "napi-6")]
pub mod thread;
Expand All @@ -97,6 +99,9 @@ mod types_impl;

pub use types_docs::exports as types;

#[cfg(feature = "serde")]
pub use crate::serde::{deserialize, serialize};

#[doc(hidden)]
pub mod macro_internal;

Expand Down
Loading

0 comments on commit 3338414

Please sign in to comment.