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

Self-hosted cargo-cp-artifact #971

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

dherman
Copy link
Collaborator

@dherman dherman commented Feb 28, 2023

Implements #966. Implementation notes:

  • Core functionality implemented in crates/cargo-cp-artifact as a regular crate
  • crates/cargo-cp-artifact also has a bin so it can be used to build the self-hosted JS package
  • pkgs/cargo-cp-artifact has a Neon implementation that depends on crates/cargo-cp-artifact
  • pkgs/cargo-cp-artifact/package.json uses cargo run -p cargo-cp-artifact to build itself from the monorepo

- Core functionality implemented in crates/cargo-cp-artifact as a regular crate
- crates/cargo-cp-artifact also has a bin so it can be used to build the self-hosted JS package
- pkgs/cargo-cp-artifact has a Neon implementation that depends on crates/cargo-cp-artifact
- pkgs/cargo-cp-artifact/package.json uses `cargo run -p cargo-cp-artifact` to build itself from the monorepo
@dherman dherman force-pushed the self-hosted-cargo-cp-artifact branch from 9a59f28 to 436c872 Compare February 28, 2023 04:37
- Wrap HashMap in a custom CopyMap type
- Move push_artifact into CopyMap::insert
- Move some of CargoCommand::exec into CopyMap::copy
- Move copy_artifact into Artifact::copy
],
"bin": {
"cargo-cp-artifact": "bin/cargo-cp-artifact.js"
},
"scripts": {
"test": "mocha test"
"build": "cargo run -p cargo-cp-artifact -- -ac cargo-cp-artifact-adapter index.node -- cargo build --message-format=json-render-diagnostics",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works in tree, but won't work when installed from npm. The next step is now to implement pre-builds.

@kjvalencik
Copy link
Member

@dherman Before publishing, we'll need to check to see if the Rust port is impacted by #972 as well.

@dherman dherman force-pushed the self-hosted-cargo-cp-artifact branch from 2b399a4 to 1abff5c Compare April 1, 2023 23:46
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

Successfully merging this pull request may close these issues.

None yet

2 participants