5 releases

new 0.2.2 Nov 12, 2024
0.2.1 Sep 9, 2024
0.2.0 Sep 9, 2024
0.1.1 Apr 2, 2024
0.1.0 Dec 10, 2023

#322 in Finance

Download history 188/week @ 2024-09-03 101/week @ 2024-09-10 19/week @ 2024-09-17 25/week @ 2024-09-24 11/week @ 2024-10-01

377 downloads per month

MIT license

305KB
6.5K SLoC

Isosphere

Rust Crate version CI Docs License

The Isosphere crate is a library of ISO standard data types, helpers, and related utilities for Rust projects.

This crate was created with the intention of being a comprehensive, accurate, and fully-featured source of ISO and similar standard data in intuitive and easy-to-use form. Although there are a number of other crates already in existence that perform a similar role, they were all found to be lacking in some way: either features, approach, accuracy, or consistency. Additionally, those crates that do exist are isolated, do not interact with each other, and for the most part are not maintained. This crate aims to address all of these issues.

The name "Isosphere" is a portmanteau of "ISO" and "sphere", and is intended to convey the idea of an all-encompassing sphere of ISO data. As in, "everything in the ISO sphere".

There is a roadmap for the project, which sets out the planned releases and their associated functionality, and indicates current status according to the intended goals.

There is full support for (de)serialisation via Serde, and OpenAPI via Utoipa.

Currently, the following modules are provided:

country

The country module provides ISO 3166-1 countries with alpha2/alpha3/numeric codes and basic names. The countries are related to the currencies and languages that are officially used by them, according to the ISO and Wikipedia.

  • Country - This enum represents a country, and provides access to its properties. It is the central means of interaction with country data.

  • CountryCode - This enum represents a country code, in alpha2/alpha3/numeric form, suitable for (de)serialisation.

currency

The currency module provides ISO 4217 currencies with alpha3/numeric codes and basic names. The currencies are related to the countries that officially use them, according to the ISO and Wikipedia.

  • Currency - This enum represents a currency, and provides access to its properties. It is the central means of interaction with currency data.

  • CurrencyCode - This enum represents a currency code, in alpha3/numeric form, suitable for (de)serialisation.

language

The language module provides ISO 639-1 languages with alpha2 codes and basic names. The languages are related to the countries that officially use them, according to Wikipedia (the ISO does not provide this information).

  • Language - This enum represents a language, and provides access to its properties. It is the central means of interaction with language data.

  • LanguageCode - This enum represents a language code, in alpha2 form, suitable for (de)serialisation.

Dependencies

~1.6–2.7MB
~52K SLoC