Support simd_json (#105)

This PR adds support for the simd-json library whenever decoding or encoding JSON responses. This may be enabled independently of serenity and twilight support for SIMD acceleration.

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
This commit is contained in:
Victoria Casasampere Fernandez
2022-07-25 15:18:45 +02:00
committed by Kyle Simpson
parent 8cc7a22b0b
commit cb0a74f511
13 changed files with 60 additions and 17 deletions

View File

@@ -107,6 +107,12 @@ pub use serenity_voice_model as model;
#[cfg(feature = "driver")]
pub use typemap_rev as typemap;
// Re-export serde-json APIs locally to minimise conditional config elsewhere.
#[cfg(not(feature = "simd-json"))]
pub(crate) use serde_json as json;
#[cfg(feature = "simd-json")]
pub(crate) use simd_json::serde as json;
#[cfg(feature = "driver")]
pub use crate::{
driver::Driver,