Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to call other clis #53

Open
oovm opened this issue Jan 29, 2025 · 2 comments
Open

How to call other clis #53

oovm opened this issue Jan 29, 2025 · 2 comments

Comments

@oovm
Copy link

oovm commented Jan 29, 2025

How to call other command line tools in the shell? Similar to execSync.

For example, I want to perform some git operations.

Does this mean I need a pure wasm git client?

@sunfishcode
Copy link
Member

At this time, there is no way to do this within wasi-cli. Someone would need to make a proposal for an addition to the API.

@oovm
Copy link
Author

oovm commented Jan 30, 2025

It should be possible to add such an interface:

@since(version = 0.3.0)
interface exec {
    @since(version = 0.3.0)
    @unstable(feature = cli-child-process)
    exec: func(command: string) -> result;

    @since(version = 0.3.0)
    @unstable(feature = cli-child-process)
    record exec-options {

    }

    @since(version = 0.3.0)
    @unstable(feature = cli-child-process)
    exec-with-options: func(command: string, options: exec-options) -> result;
}

I'm not familiar with cross-platform, what options are common to all platforms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants