allfeat-midds

Crates.ioallfeat-midds
lib.rsallfeat-midds
version0.1.9
created_at2025-07-27 00:02:28.406882+00
updated_at2025-08-08 15:43:46.308674+00
descriptionSubstrate/JS compatible MIDDS main crate.
homepagehttps://allfeat.org
repositoryhttps://github.com/Allfeat/allfeat-sdk
max_upload_size
id1769544
size224,681
Loรฏs (SailorSnoW)

documentation

README

๐ŸŽผ Allfeat MIDDS

Music Industry Decentralized Data Structures (MIDDS) for the Allfeat blockchain ecosystem.

Overview

MIDDS provides standardized, type-safe data structures for music industry entities with full Substrate runtime compatibility.

Core Entities

Entity Description Standard ID
Musical Works Compositions and songs ISWC
Party Identifiers Artists, labels, publishers IPI/ISNI
Releases Albums, EPs, compilations EAN/UPC
Tracks Individual recordings ISRC

Quick Start

use allfeat_midds::{
    party_identifier::Ipi,
    musical_work::Iswc,
    shared::conversion::Validatable,
};
use std::str::FromStr;

// Create identifiers
let ipi: Ipi = 123456789;
let iswc = Iswc::from_str("T1234567890").unwrap();

// Validate (std feature required)
#[cfg(feature = "std")]
{
    assert!(iswc.validate().is_ok());
}

Features

  • ๐Ÿ”’ Type Safety: Strong typing with validation
  • โšก Performance: Optimized for on-chain storage
  • ๐ŸŒ Dual Types: SDK and Runtime type separation
  • ๐Ÿ“ Standards Compliant: Music industry standards
  • ๐Ÿงช Benchmarking: Built-in benchmark helpers

Architecture

midds/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ musical_work/     # Musical work data structures
โ”‚   โ”œโ”€โ”€ party_identifier/ # Artist/entity identification
โ”‚   โ”œโ”€โ”€ release/          # Music release structures
โ”‚   โ”œโ”€โ”€ track/            # Track/recording structures
โ”‚   โ””โ”€โ”€ shared/           # Common utilities
โ””โ”€โ”€ midds-types-codegen/  # Procedural macros

Feature Flags

Feature Description Default
std SDK types and validation โœ…
js WebAssembly bindings โŒ
runtime-benchmarks Benchmark utilities โŒ
try-runtime Try-runtime support โŒ

Benchmarking

use allfeat_midds::{benchmarking::BenchmarkHelperT, track::Track, Midds};

// Generate test data with varying complexity
let track = <Track as Midds>::BenchmarkHelper::variable_size(0.5);
let min_track = <Track as Midds>::BenchmarkHelper::min_size();
let max_track = <Track as Midds>::BenchmarkHelper::max_size();

Dependencies

Commit count: 44

cargo fmt