| Crates.io | interoper |
| lib.rs | interoper |
| version | 0.1.3 |
| created_at | 2025-09-30 11:37:45.03049+00 |
| updated_at | 2025-09-30 13:22:48.534734+00 |
| description | Build time tool for using Node.js packages from Rust project |
| homepage | https://github.com/kappa8719/interoper |
| repository | https://github.com/kappa8719/interoper |
| max_upload_size | |
| id | 1861004 |
| size | 21,549 |
A build-time tool for seamlessly integrating Node.js packages into your Rust projects. Interoper automatically resolves and manages JavaScript dependencies using your preferred package manager during the build process.
Add Interoper to your build dependencies:
[build-dependencies]
interoper = "0.1"
Create an Interoper.toml file in your project root:
package-manager = "bun"
[dependencies]
daisyui = "latest"
lodash = "^4.17.21"
Add a build script (build.rs):
fn main() {
interoper::build().expect("Failed to build interoper dependencies");
}
Build your project - Interoper will automatically resolve and install the specified Node.js packages.
All configuration is done through the Interoper.toml file placed in your project root alongside Cargo.toml.
# Interoper.toml
package-manager = "pnpm"
[dependencies]
# UI Framework
daisyui = "latest"
tailwindcss = "^3.3.0"
# Utilities
lodash = "^4.17.21"
date-fns = "^2.30.0"
# Development tools
typescript = "^5.1.0"
Optional | Default: "auto"
Specifies which package manager to use. When set to "auto", Interoper will automatically detect and use the best available package manager on your system.
Supported values:
"auto" - Automatic detection"npm", "pnpm", "yarn", "bun" - Specific package managers"/path/to/executable" - Custom executable pathRequired
Map of Node.js package dependencies in name = "version" format. Supports all standard npm version specifications:
[dependencies]
# Latest version
react = "latest"
# Specific version
lodash = "4.17.21"
# Semver ranges
typescript = "^5.0.0"
next = "~14.0.0"
# Beta/prerelease
vue = "3.4.0-beta.1"
# Interoper.toml
package-manager = "pnpm"
[dependencies]
# UI Framework
daisyui = "latest"
tailwindcss = "^3.3.0"
# Utilities
lodash = "^4.17.21"
date-fns = "^2.30.0"
# Development tools
typescript = "^5.1.0"
// build.rs
fn main() {
// Run interoper to resolve Node.js dependencies
if let Err(e) = interoper::build() {
panic!("Interoper build failed: {}", e);
}
// Continue with other build steps...
println!("cargo:rerun-if-changed=Interoper.toml");
}
This project is licensed under the MIT License.