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

Bundle binary in extension #60

Closed
Tiwalun opened this issue Jun 12, 2023 · 9 comments
Closed

Bundle binary in extension #60

Tiwalun opened this issue Jun 12, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@Tiwalun
Copy link
Member

Tiwalun commented Jun 12, 2023

It's possible to bundle binaries in a vscode extension, and this can be done in a platform specific way. See https://code.visualstudio.com/api/working-with-extensions/publishing-extension#platformspecific-extensions

It would be nice to bundle the debugger binary, so that users don't have to install a separate tool.

@Tiwalun Tiwalun added the enhancement New feature or request label Jun 12, 2023
@Tiwalun
Copy link
Member Author

Tiwalun commented Jun 12, 2023

See also https://github.com/microsoft/vscode-platform-specific-sample for an example.

@noppej
Copy link
Contributor

noppej commented Jan 22, 2024

@Tiwalun Quite a few people I know of, use this extension with probe-rs from the master branch (usually a few fixes and features ahead of the published).

By bundling the binary, would we add complications for those use cases?

@Tiwalun
Copy link
Member Author

Tiwalun commented Jan 22, 2024

Not really, we can just have a configurable setting where you can choose the bundled binary or a different one.

Or you use the existing mode where you connect over tcp.

@noppej
Copy link
Contributor

noppej commented Jan 22, 2024

Fair. We have existing config settings in launch.json to overwrite the binary. I think we can re-use that with some adjustment.

@noppej
Copy link
Contributor

noppej commented Jan 23, 2024

I had a look at the examples included above, and cannot see how to get from their 'dependency' on a node package that includes the platform executables, to our own cargo release of the binaries. For now, I will leave this enhancement for someone else to attempt, with this final note:

The extension currently supports the runtimeExecutable property in the launch.json config. It will be nice if we can leverage that to toggle between the "packaged" versus "locally installed" version of probe-rs, rather than introduce a new property.

@Tiwalun
Copy link
Member Author

Tiwalun commented May 9, 2024

I had a look at the examples included above, and cannot see how to get from their 'dependency' on a node package that includes the platform executables, to our own cargo release of the binaries. For now, I will leave this enhancement for someone else to attempt, with this final note:

cargo dist supports npm packages, so it might be quite easy to get this:

https://opensource.axo.dev/cargo-dist/book/installers/npm.html

@Tiwalun
Copy link
Member Author

Tiwalun commented May 9, 2024

But it seems we could also place a binary in the extension directory, and then bundle it. That might be easier than using a complete other package.

@noppej
Copy link
Contributor

noppej commented May 9, 2024

I'm guessing it is safe to assume we have a binary for each of the VSCode supported platforms?

@noppej
Copy link
Contributor

noppej commented May 22, 2024

@Tiwalun Can we close this as fixed by #93?

@Tiwalun Tiwalun closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants