#![warn(clippy::all)]
// We need to allow these to use !declare_types
#![allow(clippy::unnecessary_wraps)]
#![allow(clippy::upper_case_acronyms)]

extern crate neon;
extern crate neon_serde;
#[macro_use]
extern crate serde;
extern crate tokenizers as tk;

mod decoders;
mod encoding;
mod extraction;
mod models;
mod normalizers;
mod pre_tokenizers;
mod processors;
mod tasks;
mod tokenizer;
mod trainers;
mod utils;

use neon::prelude::*;

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

register_module!(mut m, {
    // Tokenizer
    tokenizer::register(&mut m, "tokenizer")?;
    // Models
    models::register(&mut m, "models")?;
    // Decoders
    decoders::register(&mut m, "decoders")?;
    // Processors
    processors::register(&mut m, "processors")?;
    // Normalizers
    normalizers::register(&mut m, "normalizers")?;
    // PreTokenizers
    pre_tokenizers::register(&mut m, "pre_tokenizers")?;
    // Trainers
    trainers::register(&mut m, "trainers")?;
    // Utils
    utils::register(&mut m, "utils")?;

    Ok(())
});
