feat(harper-lib): create new crate harper-lib

This commit is contained in:
Grant Lemons 2024-11-05 08:49:25 -07:00
parent e05d2eed58
commit d5b485f0fd
No known key found for this signature in database
GPG key ID: 43E9BFDA09A6D96A
3 changed files with 21 additions and 1 deletions

View file

@ -1,5 +1,5 @@
[workspace]
members = [ "harper-cli", "harper-core", "harper-dictionary-parsing", "harper-ls", "harper-comments", "harper-wasm", "harper-tree-sitter", "harper-html"]
members = [ "harper-cli", "harper-core", "harper-dictionary-parsing", "harper-ls", "harper-comments", "harper-wasm", "harper-tree-sitter", "harper-html", "harper-lib"]
resolver = "2"
[profile.release]

6
harper-lib/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "harper-lib"
version = "0.1.0"
edition = "2021"
[dependencies]

14
harper-lib/src/lib.rs Normal file
View file

@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}