Skip to content

Commit

Permalink
Inference: Initialise crate
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Jan 2, 2025
1 parent 56df110 commit fbf0ff7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/inference/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "pxp-inference"
description = "Performs type inference on PHP code."
version.workspace = true
authors.workspace = true
license-file.workspace = true
rust-version.workspace = true
edition.workspace = true

[dependencies]
14 changes: 14 additions & 0 deletions crates/inference/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit fbf0ff7

Please sign in to comment.