lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit c6e7c084bbd4ad279c7232ba3fc37b04bf6a6e3b
parent 81fce43cda89b3a2089d1bdd45edcb43fb1c9553
Author: triesap <tyson@radroots.org>
Date:   Wed, 24 Jun 2026 09:08:33 +0000

sdk: remove binding model crate

Delete crates/binding_model and remove it from the workspace, lockfile, and xtask dependencies.

Drop the final TsSource::Module path and keep output tests on raw and DTO-registry sources.

Remove binding_model from coverage exclusions so the obsolete crate is no longer part of SDK policy.

Validate with cargo fmt/check/test, xtask generate/check, pnpm -r build/typecheck, and a zero-hit forbidden-reference search.

Diffstat:
Mtools/sdk_xtask_import/Cargo.toml | 1-
Mtools/sdk_xtask_import/src/output.rs | 20++++----------------
2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/tools/sdk_xtask_import/Cargo.toml b/tools/sdk_xtask_import/Cargo.toml @@ -15,7 +15,6 @@ path = "src/main.rs" [dependencies] dto_bindgen_core = { workspace = true } -radroots_sdk_binding_model = { path = "../../crates/binding_model" } radroots_core = { workspace = true, features = ["dto-bindgen"] } radroots_events = { workspace = true, features = ["dto-bindgen"] } radroots_events_bindings = { path = "../../crates/events_bindings" } diff --git a/tools/sdk_xtask_import/src/output.rs b/tools/sdk_xtask_import/src/output.rs @@ -6,7 +6,6 @@ use crate::{ package_matrix::{PackageSpec, package_specs}, ts::{generated_constants_file, generated_header, generated_kinds_file, generated_types_file}, }; -use radroots_sdk_binding_model::TsModule; pub struct PackageOutput { pub spec: PackageSpec, @@ -21,10 +20,8 @@ pub struct GeneratedFile { pub contents: String, } -#[allow(dead_code)] pub enum TsSource { DtoRegistry(DtoTypesModule), - Module(TsModule), Raw(String), } @@ -32,7 +29,6 @@ impl TsSource { fn render(&self) -> String { match self { Self::DtoRegistry(module) => module.body_ts().to_owned(), - Self::Module(module) => module.render(), Self::Raw(body) => body.clone(), } } @@ -40,7 +36,6 @@ impl TsSource { fn imports(&self) -> Option<&str> { match self { Self::DtoRegistry(module) => module.imports_ts(), - Self::Module(_) => None, Self::Raw(_) => None, } } @@ -203,7 +198,6 @@ fn render_index(output: &PackageOutput) -> String { mod tests { use super::{PackageOutput, TsSource, package_outputs, render_ts}; use crate::{dto_render::DtoTypesModule, package_matrix::package_specs}; - use radroots_sdk_binding_model::{module, string, type_alias}; const TRADE_BINDINGS_TYPES_TS: &str = include_str!("../../../packages/trade-bindings/src/generated/types.ts"); @@ -212,10 +206,7 @@ mod tests { #[test] fn renders_sdk_header() { - let output = render_ts( - &TsSource::Module(module(vec![type_alias("A", string())])), - None, - ); + let output = render_ts(&TsSource::Raw("export type A = string;".to_owned()), None); assert!(output.starts_with("// @generated by cargo xtask generate ts")); assert!(output.contains("export type A = string;")); } @@ -223,7 +214,7 @@ mod tests { #[test] fn renders_import_prelude_after_header() { let output = render_ts( - &TsSource::Module(module(vec![type_alias("A", string())])), + &TsSource::Raw("export type A = string;".to_owned()), Some("import type { B } from \"b\";\n\n"), ); assert!(output.starts_with( @@ -233,11 +224,8 @@ mod tests { } #[test] - fn renders_model_sources() { - let output = render_ts( - &TsSource::Module(module(vec![type_alias("A", string())])), - None, - ); + fn renders_raw_sources() { + let output = render_ts(&TsSource::Raw("export type A = string;".to_owned()), None); assert_eq!( output, "// @generated by cargo xtask generate ts\n// Do not edit by hand.\nexport type A = string;\n"