dusk_wasmtime_runtime/gc/disabled.rs
1//! Dummy GC types for when the `gc` cargo feature is disabled.
2//!
3//! To reduce `#[cfg(...)]`s, this provides all the same methods as the real
4//! `VMExternRef` except for constructors.
5
6#![allow(missing_docs)]
7
8use crate::{GcHeap, GcRuntime};
9use anyhow::Result;
10
11pub fn default_gc_runtime() -> impl GcRuntime {
12 DisabledCollector
13}
14
15struct DisabledCollector;
16
17unsafe impl GcRuntime for DisabledCollector {
18 fn new_gc_heap(&self) -> Result<Box<dyn GcHeap>> {
19 unreachable!()
20 }
21}
22
23pub enum VMExternRef {}