Skip to content

Commit

Permalink
feat: switch from find-process to rust alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
cyperdark authored and KotRikD committed Feb 15, 2024
1 parent b660967 commit a98279b
Show file tree
Hide file tree
Showing 9 changed files with 443 additions and 41 deletions.
5 changes: 5 additions & 0 deletions packages/find-process/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
find-process.node
**/node_modules
**/.DS_Store
npm-debug.log*
326 changes: 326 additions & 0 deletions packages/find-process/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions packages/find-process/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "find-process"
version = "0.0.1"
authors = ["ck"]
license = "ISC"
edition = "2018"
exclude = ["find-process.node"]

[lib]
crate-type = ["cdylib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sysinfo = "0.30.5"

[dependencies.neon]
version = "0.10"
default-features = false
features = ["napi-6"]
3 changes: 3 additions & 0 deletions packages/find-process/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { process_by_name } = require('./find-process.node');

module.exports = { process_by_name };
20 changes: 20 additions & 0 deletions packages/find-process/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@tosu/find-process",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"build-artifact": "cargo-cp-artifact -nc find-process.node -- cargo build --message-format=json-render-diagnostics",
"build-debug": "npm run build --",
"build-release": "npm run build-artifact -- --release",
"prepare": "npm run build-release",
"build": "tsc",
"test": "cargo test"
},
"keywords": [],
"author": "cyperdark",
"license": "ISC",
"devDependencies": {
"cargo-cp-artifact": "^0.1"
}
}
Loading

0 comments on commit a98279b

Please sign in to comment.