39 releases (12 breaking)
0.13.0 | Jan 31, 2019 |
---|---|
0.11.2 | Dec 8, 2018 |
0.11.1 | Nov 20, 2018 |
0.7.2 | May 19, 2018 |
0.3.11 | Feb 21, 2018 |
#682 in Science
109 downloads per month
Used in xch-ceb
60KB
1K
SLoC
lib_xch
This is crate xch-ceb's official lib.
lib_xch on crates.io
lib_xch's documentation
Goals of this project
Swift, Small, Safe.
Getting Started
First of all, you should pick a version.
At this time (2019.1), add following dependency to your Cargo.toml
:
[dependencies]
lib_xch = "^0.12"
Example
For more information, please read the source code of xch-ceb
use lib_xch::public::{handler::Handler, structs::ChemicalEquation};
use std::io;
fn main() {
print_about_info();
let equ = input();
match Handler::<i32>::new(&equ).handle() {
Ok(s) => println!("{:?}", s),
Err(e) => println!("{}", e),
};
}
fn input() -> String {
println!("[INPUT] Input the equation:");
let mut equ = String::new();
io::stdin()
.read_line(&mut equation)
.expect("[ERROR] Failed to read line!");
equ.pop();
equ
}
License
Licensed under GPL-3.0
Plans
- Uses regex-based parser
- Uses Gaussian-Jordan Elimination
- Provides the set of Basic Solutions
- Uses AST-based parser
Dependencies
~6.5MB
~131K SLoC