Skip to content

WIP: Serde support #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ gcc = "0.3"
[dependencies]
bitflags = "0.1"
libc = "0.2.13"
serde = { version="1.0.0", optional=true }
quick-error = "1.2.0"

[dev-dependencies]
serde_json = "1.0.0"

[features]
default = ["serialize"]
serialize = ["serde"]
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
pub extern crate libc;
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate quick_error;
#[cfg(feature="serialize")]
extern crate serde;

pub use wrapper::state::{
State,
Expand Down Expand Up @@ -56,6 +60,9 @@ pub use wrapper::convert::{
FromLua
};

#[cfg(feature="serialize")]
pub use wrapper::serde::Serde;

pub use ffi::lua_Number as Number;
pub use ffi::lua_Integer as Integer;
pub use ffi::lua_CFunction as Function;
Expand Down
2 changes: 2 additions & 0 deletions src/wrapper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@

pub mod convert;
pub mod state;
#[cfg(feature="serialize")]
pub mod serde;

Loading