mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
feat(harper-lib): create new crate harper-lib
This commit is contained in:
parent
e05d2eed58
commit
d5b485f0fd
3 changed files with 21 additions and 1 deletions
|
|
@ -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
6
harper-lib/Cargo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "harper-lib"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
14
harper-lib/src/lib.rs
Normal file
14
harper-lib/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue