4 Commits

Author SHA1 Message Date
jkunz d69c336c81 v1.4.0
Default (tags) / security (push) Failing after 1s
Default (tags) / test (push) Failing after 1s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-04-30 08:39:35 +00:00
jkunz f4673c3029 feat(package): improve package metadata and standardize project configuration 2026-04-30 08:39:35 +00:00
jkunz d079f245ef v1.3.2
Default (tags) / security (push) Successful in 27s
Default (tags) / test (push) Failing after 3m56s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-03-14 23:42:26 +00:00
jkunz eb2bf4ba98 fix(rustbinarylocator): support resolving platform-suffixed local Rust binaries 2026-03-14 23:42:26 +00:00
10 changed files with 1905 additions and 1670 deletions
+37
View File
@@ -0,0 +1,37 @@
{
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartrust",
"description": "A type-safe bridge between JavaScript engines and Rust binaries.",
"npmPackagename": "@push.rocks/smartrust",
"license": "MIT",
"projectDomain": "push.rocks",
"keywords": [
"rust",
"typescript",
"ipc",
"bridge",
"stdio",
"socket",
"binary",
"transport"
]
},
"release": {
"accessLevel": "public",
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
]
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.\n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.\n\nUse of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.\n\n### Company Information\n\nTask Venture Capital GmbH\nRegistered at District Court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
},
"@ship.zone/szci": {
"npmGlobalTools": []
}
}
+15
View File
@@ -1,5 +1,20 @@
# Changelog # Changelog
## 2026-04-30 - 1.4.0 - feat(package)
improve package metadata and standardize project configuration
- replace npmextra.json with .smartconfig.json and expand project metadata
- add package publishing metadata including files, keywords, homepage, repository, bugs, and packageManager
- tighten TypeScript configuration with noImplicitAny and explicit node types
- update build tooling dependencies and remove the allowimplicitany build flag
- add a license file and align readme references and install instructions
## 2026-03-14 - 1.3.2 - fix(rustbinarylocator)
support resolving platform-suffixed local Rust binaries
- Checks local Rust build paths for binaries with platform suffixes such as _linux_amd64 in addition to unsuffixed names
- Adds platform and architecture suffix mapping for linux, darwin, windows, x64, and arm64
## 2026-02-26 - 1.3.1 - fix(readme) ## 2026-02-26 - 1.3.1 - fix(readme)
document socket transport and clarify stdio/socket differences in README document socket transport and clarify stdio/socket differences in README
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2014 Task Venture Capital GmbH (hello@task.vc)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-24
View File
@@ -1,24 +0,0 @@
{
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartrust",
"description": "a bridge between JS engines and rust",
"npmPackagename": "@push.rocks/smartrust",
"license": "MIT",
"projectDomain": "push.rocks"
},
"release": {
"accessLevel": "public",
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
]
}
},
"@ship.zone/szci": {
"npmGlobalTools": []
}
}
+38 -8
View File
@@ -1,8 +1,8 @@
{ {
"name": "@push.rocks/smartrust", "name": "@push.rocks/smartrust",
"version": "1.3.1", "version": "1.4.0",
"private": false, "private": false,
"description": "a bridge between JS engines and rust", "description": "A type-safe bridge between JavaScript engines and Rust binaries.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module", "type": "module",
@@ -10,16 +10,46 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/ --verbose --logfile --timeout 60)", "test": "(tstest test/ --verbose --logfile --timeout 60)",
"build": "(tsbuild tsfolders --allowimplicitany)", "build": "(tsbuild tsfolders)",
"buildDocs": "(tsdoc)" "buildDocs": "(tsdoc)"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^4.1.2", "@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsrun": "^2.0.1", "@git.zone/tsrun": "^2.0.2",
"@git.zone/tstest": "^3.1.8", "@git.zone/tstest": "^3.6.3",
"@types/node": "^25.2.0" "@types/node": "^25.6.0"
}, },
"dependencies": { "dependencies": {
"@push.rocks/smartpath": "^6.0.0" "@push.rocks/smartpath": "^6.0.0"
} },
"files": [
"ts/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"assets/**/*",
"cli.js",
".smartconfig.json",
"license",
"readme.md"
],
"keywords": [
"rust",
"typescript",
"ipc",
"bridge",
"stdio",
"socket",
"binary",
"transport"
],
"homepage": "https://code.foss.global/push.rocks/smartrust#readme",
"repository": {
"type": "git",
"url": "https://code.foss.global/push.rocks/smartrust.git"
},
"bugs": {
"url": "https://code.foss.global/push.rocks/smartrust/issues"
},
"packageManager": "pnpm@10.28.2"
} }
+1772 -1631
View File
File diff suppressed because it is too large Load Diff
+2 -4
View File
@@ -9,9 +9,7 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
## Install 📦 ## Install 📦
```bash ```bash
npm install @push.rocks/smartrust pnpm add @push.rocks/smartrust
# or
pnpm install @push.rocks/smartrust
``` ```
## Overview 🔭 ## Overview 🔭
@@ -556,7 +554,7 @@ fn main() {
## License and Legal Information ## License and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file. This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
+2 -2
View File
@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartrust', name: '@push.rocks/smartrust',
version: '1.3.1', version: '1.4.0',
description: 'a bridge between JS engines and rust' description: 'A type-safe bridge between JavaScript engines and Rust binaries.'
} }
+15
View File
@@ -81,11 +81,18 @@ export class RustBinaryLocator {
plugins.path.resolve(process.cwd(), `rust/target/release/${binaryName}`), plugins.path.resolve(process.cwd(), `rust/target/release/${binaryName}`),
plugins.path.resolve(process.cwd(), `rust/target/debug/${binaryName}`), plugins.path.resolve(process.cwd(), `rust/target/debug/${binaryName}`),
]; ];
const platformSuffix = this.getPlatformSuffix();
for (const localPath of localPaths) { for (const localPath of localPaths) {
if (await this.isExecutable(localPath)) { if (await this.isExecutable(localPath)) {
this.logger.log('info', `Binary found at local path: ${localPath}`); this.logger.log('info', `Binary found at local path: ${localPath}`);
return localPath; return localPath;
} }
// Also try with platform suffix (tsrust convention: binaryName_linux_amd64)
const suffixedPath = `${localPath}_${platformSuffix}`;
if (await this.isExecutable(suffixedPath)) {
this.logger.log('info', `Binary found at local path (platform-suffixed): ${suffixedPath}`);
return suffixedPath;
}
} }
// 5. System PATH // 5. System PATH
@@ -137,6 +144,14 @@ export class RustBinaryLocator {
} }
} }
private getPlatformSuffix(): string {
const archMap: Record<string, string> = { x64: 'amd64', arm64: 'arm64' };
const platformMap: Record<string, string> = { linux: 'linux', darwin: 'darwin', win32: 'windows' };
const platform = platformMap[process.platform] || process.platform;
const arch = archMap[process.arch] || process.arch;
return `${platform}_${arch}`;
}
private async findInPath(binaryName: string): Promise<string | null> { private async findInPath(binaryName: string): Promise<string | null> {
const pathDirs = (process.env.PATH || '').split(plugins.path.delimiter); const pathDirs = (process.env.PATH || '').split(plugins.path.delimiter);
for (const dir of pathDirs) { for (const dir of pathDirs) {
+5 -1
View File
@@ -4,7 +4,11 @@
"module": "NodeNext", "module": "NodeNext",
"moduleResolution": "NodeNext", "moduleResolution": "NodeNext",
"esModuleInterop": true, "esModuleInterop": true,
"verbatimModuleSyntax": true "verbatimModuleSyntax": true,
"noImplicitAny": true,
"types": [
"node"
]
}, },
"exclude": [ "exclude": [
"dist_*/**/*.d.ts" "dist_*/**/*.d.ts"