chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
use crate::{Component, ComponentSection, ComponentSectionId, Encode};
use alloc::vec::Vec;
/// An encoder for the component section of WebAssembly components.
///
/// # Example
///
/// ```rust
/// use wasm_encoder::{Component, NestedComponentSection};
///
/// let mut nested = Component::new();
/// let mut component = Component::new();
/// component.section(&NestedComponentSection(&nested));
///
/// let bytes = component.finish();
/// ```
#[derive(Clone, Debug)]
pub struct NestedComponentSection<'a>(pub &'a Component);
impl Encode for NestedComponentSection<'_> {
fn encode(&self, sink: &mut Vec<u8>) {
self.0.bytes.encode(sink);
}
}
impl ComponentSection for NestedComponentSection<'_> {
fn id(&self) -> u8 {
ComponentSectionId::Component.into()
}
}