cardano-multiplatform-lib icon indicating copy to clipboard operation
cardano-multiplatform-lib copied to clipboard

Standalone metadata library support

Open SebastienGllmt opened this issue 2 years ago • 1 comments

It's entirely reasonably for people to want to use standalone libraries for handling transaction metadata such as cip25_rs

The problem is that right now the main way to do this would be for cip25_rs to take CML as a dependency. You can imagine if there are many CIP standards that need to be imported in a project that this will lead to a mess with many CML dependencies of potentially different versions.

One way we could tackle this is by splitting up CML into smaller libraries. Notably, some library purely for parsing metadata would only need:

  • error.rs
  • metadata.rs
  • utils.rs

So if we cleverly setup the cargo workspaces, we could have all this cip25_rs, etc. libraries all depend on a fairly slim and stable API.

Probably we don't want to do this until the big code regeneration or we may end up duplicating work to get this properly exported as Rust libraries.

SebastienGllmt avatar May 20 '22 00:05 SebastienGllmt

I think maybe we don't need this in the end since the metadata format is simple enough to just re-inline into specific libraries (see cip25 as an example)

SebastienGllmt avatar Jun 07 '22 22:06 SebastienGllmt

Metadata is in cml-core instead of cml-chain now. I think we can close this.

rooooooooob avatar Aug 24 '23 17:08 rooooooooob