amazon-ion / ion-schema-rust

Rust implementation of Ion Schema
https://amazon-ion.github.io/ion-schema/sandbox
Apache License 2.0
12 stars 6 forks source link

adds initial implementation to support ISL 2.0 #152

Closed desaikd closed 1 year ago

desaikd commented 1 year ago

Description of changes:

This PR works on adding version configuration changes to allow ISL 2.0 support.

List of changes:

Example construction of ISL model programmatically using the new signature:

Using a single ISL type to construct ISL schema model as below:

// an ISL 1.0 type that contains ISL 1.0 related constraints
let isl_type = isl_type::v_1_0::named_type(
    "my_type",
    [isl_constraint::v_1_0::element(
        isl_type_reference::v_1_0::named_type_ref("int"),
    )],
);
let isl = IslSchema::schema_v_1_0("sample.isl", vec![], vec![isl_type], vec![], vec![]);

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

desaikd commented 1 year ago

Updates with latest changes: