#iso #language #codes #country #currency #localization

isosphere

Library of ISO standard data types, helpers, and related utilities

2 releases

0.1.1 Apr 2, 2024
0.1.0 Dec 10, 2023

#234 in Finance

Download history 9/week @ 2024-02-21 9/week @ 2024-02-28 3/week @ 2024-03-13 142/week @ 2024-03-27 70/week @ 2024-04-03

212 downloads per month

MIT license

300KB
6.5K SLoC

Isosphere

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

~10–13MB
~234K SLoC