diff --git a/native/fastrss/.cargo/config b/native/fastrss/.cargo/config.toml similarity index 100% rename from native/fastrss/.cargo/config rename to native/fastrss/.cargo/config.toml diff --git a/native/fastrss/Cargo.lock b/native/fastrss/Cargo.lock index e56fe1a..d2952da 100644 --- a/native/fastrss/Cargo.lock +++ b/native/fastrss/Cargo.lock @@ -73,7 +73,6 @@ dependencies = [ "serde", "serde-transcode", "serde_json", - "serde_rustler", ] [[package]] @@ -88,12 +87,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "memchr" version = "2.6.3" @@ -184,6 +177,7 @@ checksum = "45d51ae0239c57c3a3e603dd855ace6795078ef33c95c85d397a100ac62ed352" dependencies = [ "rustler_codegen", "rustler_sys", + "serde", ] [[package]] @@ -254,18 +248,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_rustler" -version = "0.1.0" -source = "git+https://github.com/avencera/serde_rustler.git?branch=master#e2cc53cf59ec98ace515697f10fbc6e93659fdc5" -dependencies = [ - "lazy_static", - "rustler", - "rustler_codegen", - "serde", - "thiserror", -] - [[package]] name = "syn" version = "2.0.31" @@ -277,26 +259,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "thiserror" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "unicode-ident" version = "1.0.11" diff --git a/native/fastrss/Cargo.toml b/native/fastrss/Cargo.toml index 616d8e6..fff2592 100644 --- a/native/fastrss/Cargo.toml +++ b/native/fastrss/Cargo.toml @@ -13,9 +13,8 @@ path = "src/lib.rs" rss = {version = "2.0", features = ["serde"], default-features = false } atom_syndication = { version = "0.12", features = ["with-serde"], default-features = false } -rustler = "0.33" +rustler = { version = "0.33", features = ["serde"] } serde = "1.0" serde-transcode = "1.1" serde_json = "1.0" -serde_rustler = { git = "https://github.com/avencera/serde_rustler.git", branch = "master" } diff --git a/native/fastrss/src/lib.rs b/native/fastrss/src/lib.rs index f1f6e6d..e70dbec 100644 --- a/native/fastrss/src/lib.rs +++ b/native/fastrss/src/lib.rs @@ -1,4 +1,4 @@ -use rustler::{Encoder, Env, NifResult, Term}; +use rustler::{Encoder, Env, NifResult, Term, serde::Serializer}; use serde_json::json; mod atoms { @@ -15,7 +15,7 @@ fn parse_rss(env: Env, rss_string: String) -> NifResult { let channel = rss::Channel::read_from(rss_string.as_bytes()) .map_err(|err| format!("Unable to parse RSS - ({:?})", err)); - let ser = serde_rustler::Serializer::from(env); + let ser = Serializer::from(env); let de = json!(channel); let encoded = @@ -32,7 +32,7 @@ fn parse_atom(env: Env, atom_string: String) -> NifResult { let channel = atom_syndication::Feed::read_from(atom_string.as_bytes()) .map_err(|err| format!("Unable to parse Atom - ({:?})", err)); - let ser = serde_rustler::Serializer::from(env); + let ser = Serializer::from(env); let de = json!(channel); let encoded =