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

Add extra documentation around glue #7174

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

jwoudenberg
Copy link
Contributor

Adding some documentation around Glue following a conversation in Zulip:
https://roc.zulipchat.com/#narrow/channel/304641-ideas/topic/Platform.20Cookbook

Please don't hesitate to correct me where I'm wrong. I'm very new to this, so probably made a couple of mistakes!

Copy link
Collaborator

@lukewilliamboswell lukewilliamboswell left a comment

Choose a reason for hiding this comment

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

This is helpful. Thank you

@jwoudenberg
Copy link
Contributor Author

I think the failing test might be f flake? It runs for me locally, and I don't think it's related to these changes.

@lukewilliamboswell lukewilliamboswell merged commit fe029c8 into roc-lang:main Oct 21, 2024
18 checks passed
Copy link

@tannerntannern tannerntannern left a comment

Choose a reason for hiding this comment

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

Just noting a few typos. Sorry I didn't have a chance to comment before merging

@@ -0,0 +1,33 @@
# Glue

Glue is a bit of tooling built into Roc to help with platform development. Roc platforms are written in a different language than Roc, and some it requires some finesse to let other languages to read and write Roc types like records and unions in a way compatible with how Roc uses those types.

Choose a reason for hiding this comment

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

The second sentence had a few typos. In the rewording below, I dropped the first "some" and added a "that's", which hopefully still has the meaning that you intended:

Roc platforms are written in a different language than Roc, and it requires some finesse to let other languages to read and write Roc types like records and unions in a way that's compatible with how Roc uses those types.

Copy link

@lishaduck lishaduck Oct 22, 2024

Choose a reason for hiding this comment

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

You missed another typo :)
The second "to" in "to let other languages to read" should be dropped.


The `roc glue` command generates code in other languages for interacting with the Roc types used by your platform. It takes three arguments:

1. A 'glue spec', this is a Roc file specifying how to output type helpers fora particular language. You can find some examples in the src/ subdirectory:

Choose a reason for hiding this comment

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

"fora" typo

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.

4 participants