numcodecs-wasm-guest 0.3.1

Export numcodecs API compressors from wasm components
Documentation
package numcodecs:abc@0.1.1;

@unstable(feature = registry)
interface registry {
    @unstable(feature = registry)
    use types.{
        any-array, any-array-prototype, any-array-data, any-array-dtype, error,
        json, json-schema, usize,
    };

    @unstable(feature = registry)
    resource external-codec {
        encode: func(data: any-array) -> result<any-array, error>;

        decode: func(encoded: any-array) -> result<any-array, error>;

        decode-into: func(encoded: any-array, decoded: any-array-prototype) -> result<any-array, error>;

        clone: func() -> external-codec;

        get-config: func() -> result<json, error>;

        ty: func() -> external-codec-type;
    }

    @unstable(feature = registry)
    resource external-codec-type {
        codec-id: func() -> string;

        codec-config-schema: func() -> json-schema;

        codec-from-config: func(config: json) -> result<external-codec, error>;
    }

    @unstable(feature = registry)
    get-external-codec: func(config: json) -> result<external-codec, error>;
}