There will be more and more IDL versions as the IDL continues to evolve, but we don't support older specs.
For example, an area where it would be very useful to have backwards compatibility is the new declare_program! macro. Having this support would allow much easier composibility, as the user wouldn't need to think about version/spec conflicts or support.
The simplest way to support various IDL versions is to add support for each of them based on their metadata.spec field. For this, it would be much easier to have the spec version and the IDL crate version the same, so that we can use different versions of the crate to handle each version separately.
Since the new IDL standard can also be used by non-anchor programs, there is no need to tie the release schedule of the IDL crate to the other Anchor crates.
Summary of changes
Set the IDL crate version to 0.1.0
Set the metadata.spec field of the IDL to the IDL crate's version instead of hardcoding it
Problem
There will be more and more IDL versions as the IDL continues to evolve, but we don't support older
spec
s.For example, an area where it would be very useful to have backwards compatibility is the new
declare_program!
macro. Having this support would allow much easier composibility, as the user wouldn't need to think about version/spec conflicts or support.The simplest way to support various IDL versions is to add support for each of them based on their
metadata.spec
field. For this, it would be much easier to have thespec
version and the IDL crate version the same, so that we can use different versions of the crate to handle each version separately.Since the new IDL standard can also be used by non-anchor programs, there is no need to tie the release schedule of the IDL crate to the other Anchor crates.
Summary of changes
0.1.0
metadata.spec
field of the IDL to the IDL crate's version instead of hardcoding it