For now the JS sdk coupled on the Bun runtime.
but most of the runtime of JS is nodejs. Bun is trying to be compatible with nodejs. So it is better to use nodejs's interface.
Activity
10we could use napi-rs to generate the SDK
we could use napi-rs to generate the SDK
for background, the issues for previous js sdk:
- it coupled on the bun
- it requries the cli to be installed, which might be issue for non-unix like platform like windows.
so i believe it is better to include the node binary along with package.
here is how the other project did: https://github.com/apache/opendal/tree/main/bindings/nodejs
@harshdoesdev please kindly give some suggestions.
with this approach we could scale to other progamming language quickly, like python
for background, the issues for previous js sdk:
- it coupled on the bun
- it requries the cli to be installed, which might be issue for non-unix like platform like windows.
so i believe it is better to include the node binary along with package.
here is how the other project did: https://github.com/apache/opendal/tree/main/bindings/nodejs
@harshdoesdev please kindly give some suggestions.
with this approach we could scale to other progamming language quickly, like python
I think the npm package should work just fine with node. I don't think we are using any bun-specific dependencies.
Edit: Bun is just being used as the build tool for the package. Also, the CLI should work with any programming language which is able to spawn a shuru process and communicate with it in JSON-RPC 2.0. Also, we don't plan to support non-unix like platforms like Windows.
I think the npm package should work just fine with node. I don't think we are using any bun-specific dependencies.
Edit: Bun is just being used as the build tool for the package. Also, the CLI should work with any programming language which is able to spawn a shuru process and communicate with it in JSON-RPC 2.0. Also, we don't plan to support non-unix like platforms like Windows.
I think the npm package should work just fine with node. I don't think we are using any bun-specific dependencies.
Edit: Bun is just being used as the build tool for the package. Also, the CLI should work with any programming language which is able to spawn a
shuruprocess and communicate with it in JSON-RPC 2.0. Also, we don't plan to support non-unix like platforms like Windows.
hi @harshdoesdev i believe the current implementation coupled on the bun you could find from: https://github.com/superhq-ai/shuru/blob/a10c0d823ff39fb7275f50844583e45dd6752f9f/packages/sdk/src/process.ts#L1
and
I think the npm package should work just fine with node. I don't think we are using any bun-specific dependencies.
Edit: Bun is just being used as the build tool for the package. Also, the CLI should work with any programming language which is able to spawn a
shuruprocess and communicate with it in JSON-RPC 2.0. Also, we don't plan to support non-unix like platforms like Windows.
hi @harshdoesdev i believe the current implementation coupled on the bun you could find from: https://github.com/superhq-ai/shuru/blob/a10c0d823ff39fb7275f50844583e45dd6752f9f/packages/sdk/src/process.ts#L1
and
@Gnosnay thanks for pointing this out, had missed this, but the thing is - we don't want to do napi either. let's keep it simple and create a simple wrapper which uses Node.js' child_process instead of Bun.spawn if the environment is a Node.js environment.
we could use napi-rs to generate the SDK