diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs
index 8c580588f..ba58f6d2e 100644
--- a/wgpu-core/src/instance.rs
+++ b/wgpu-core/src/instance.rs
@@ -23,6 +23,7 @@ type HalInstance = ::Instance;
type HalSurface = ::Surface;
#[derive(Clone, Debug, Error)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[error("Limit '{name}' value {requested} is better than allowed {allowed}")]
pub struct FailedLimit {
name: &'static str,
@@ -391,6 +392,8 @@ pub enum GetSurfaceSupportError {
}
#[derive(Clone, Debug, Error)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
+#[cfg_attr(feature = "serde", serde(bound(deserialize = "'de: 'static")))]
/// Error when requesting a device from the adaptor
#[non_exhaustive]
pub enum RequestDeviceError {