import toml


def load_features(path):
    """
    Loads a Cargo.toml file and extracts all features from it.
    :param path: The path to the Cargo.toml
    :return: A list of features this package has
    """

    with open(path, 'r') as f:
        config = toml.load(f)
        if 'features' not in config:
            return []

        return list(config['features'].keys())