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

Cannot use from Swift Playgrounds #117

Open
shaps80 opened this issue Jul 17, 2022 · 5 comments
Open

Cannot use from Swift Playgrounds #117

shaps80 opened this issue Jul 17, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@shaps80
Copy link

shaps80 commented Jul 17, 2022

Is your feature request related to a problem? Please describe.
Swift Playgrounds (iPad in my case but should be applicable on Mac as well) cannot import packages that have C code included.

Describe the solution you'd like
I haven’t looked deeply into the implementation but I’d hope for either of the following:

  1. A separate package for the editor vs the language parsers
  2. Perhaps the language/C code could be provided via a pre-compiled package instead?

Again, I may be over-simplifying the solution as I’m not familiar enough to understand the problem atm.

Describe alternatives you've considered
Atm, I have to move the project to Xcode if I want to include this package (which I do), but I’m holding off on the editor bits for now because everything else can be built successfully on iPad.

Additional context
Thank you for open sourcing such a high quality editor. I’ve worked on this kind of thing before and its an truly a huge undertaking, you’ve done an incredible job! I’ve bought your Runestone app as well and its become a huge part of my daily workflow 👌

It doesn’t have language support for some things (like XML) but I noticed I can still open it as plain text which is great 👍

@shaps80 shaps80 added the enhancement New feature or request label Jul 17, 2022
@simonbs
Copy link
Owner

simonbs commented Jul 17, 2022

Thanks for the kind words! 🙏

Runestone heavily depends on tree-sitter, a parser generator tool written in C. As far as I know, it isn't provided as a pre-compiled binary that can be included in an iOS project.

At the moment I don't see any way I can add support for Swift Playgrounds to Runestone. If anyone has any ideas on how this can be supported (without sacrificing on the experience when using it in Xcode), I'm all ears 😊

@shaps80
Copy link
Author

shaps80 commented Jul 17, 2022

Yeah I’m aware of its dependency but I guess, wasn’t sure how deep that integration went. I’ll take a look when I have more time cause I’d love to find a working solution for this 👍🏻
Thanks for replying so quickly @simonbs

@shaps80
Copy link
Author

shaps80 commented Jul 20, 2022

@simonbs I wonder if this would be useful? Even as a reference: https://github.com/krzyzanowskim/tree-sitter-xcframework

@simonbs
Copy link
Owner

simonbs commented Jul 30, 2022

@shaps80 Do you know if the xcframeworks can be used with Swift Playgrounds?

@shaps80
Copy link
Author

shaps80 commented Jul 30, 2022

I have used others without issue, but I haven't tested this specifically no.

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