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

Publish to crates.io #90

Open
chipsenkbeil opened this issue Dec 29, 2022 · 8 comments
Open

Publish to crates.io #90

chipsenkbeil opened this issue Dec 29, 2022 · 8 comments
Labels

Comments

@chipsenkbeil
Copy link

I noticed that this library has official releases with the latest being 1.2.5.

Is publishing the Rust crate planned? This would mirror other established treesitter libraries like tree-sitter-javascript and tree-sitter-md.

Would enable others to build off the library without a cargo git dependency, which is a requirement to publish a crate to crates.io.

@clason
Copy link
Member

clason commented Dec 29, 2022

Who except Neovim is expected to use this parser?

@chipsenkbeil
Copy link
Author

I'm using it right now to build a cli to convert vimdoc to html.

@clason
Copy link
Member

clason commented Dec 29, 2022

@chipsenkbeil
Copy link
Author

chipsenkbeil commented Dec 29, 2022

I want a standalone binary rather than needing to pull in neovim or something else to run lua, and I also need more flexibility in what and how I generate the HTML. For that script, I would need to fork the lua file (to my knowledge) to alter and maintain CSS.

I may also do a conversion to markdown so I can more cleanly integrate it into a pre-existing statically-generated website.

Is there a reason not to publish this crate? I wouldn't think a maintenance burden would be a concern since you already have the Rust support available as part of tree sitter and have releases tagged.

@justinmk
Copy link
Member

For that script, I would need to fork the lua file (to my knowledge) to alter and maintain CSS.

The script outputs a help.css file, which could be replaced as needed. Though of course the HTML structure and css class names are fixed.

Is there a reason not to publish this crate?

No reason except needing to manage another account and upload process. (idk what's involved with publishing to crates)

@chipsenkbeil
Copy link
Author

Is there a reason not to publish this crate?

No reason except needing to manage another account and upload process. (idk what's involved with publishing to crates)

I'm happy to help here including setting up automatic publishing through a Github action, since I have a decent background in Rust library development and crate publishing. The main challenge today with publishing is that you still need to tie crates to an owner. Not sure if neovim has any generic account that the core maintainers have access to.

From discussion about publishing:

On crates.io, crates are owned by individual users who log in directly with their personal GitHub account. Teams don't own crates and "team owners" are just an authorization mechanism that allows other GitHub users (who are part of the GH team, but not necessarily crates.io crate owners) to publish new releases.

In all cases interaction with crates.io is done via personal GitHub accounts, not via team/org account.

@justinmk
Copy link
Member

github workflow to publish a treesitter crate: https://github.com/neovim/tree-sitter-c/blob/nvimc/.github/workflows/publish_crate.yml

@clason
Copy link
Member

clason commented Jul 17, 2023

Upstream is experimenting with release and publish actions (using org secrets for cargo and npm); once all the issues are ironed out, we'll likely add them for all our parsers. No point in doing special things for this parser alone.

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

No branches or pull requests

3 participants