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

Backend guide #5

Merged
merged 13 commits into from
May 21, 2024
Merged

Backend guide #5

merged 13 commits into from
May 21, 2024

Conversation

jcrist1
Copy link
Contributor

@jcrist1 jcrist1 commented May 4, 2024

I feel like I'm getting a little bit annoying now, constantly pushing stuff 😅 but I wanted to get my own thoughts and experiences down building the kotlin backend, before I forget. I created a document which outlines how I would have done it starting again. There are definitely some things that I would have done differently, and I wanted to jot them down. In particular the insta tests, but also a more structured approach to initial development. @Manishearth is something like this useful? If it's not really what you imagine for the backend guide, I'm happy to close, change, or move somewhere else.

@Manishearth
Copy link
Contributor

Oh, thank you very much! I'll probably have some comments but it's great to have something like this, this book needs a lot of work especially in the new HIR world with all the new types.

@jcrist1
Copy link
Contributor Author

jcrist1 commented May 7, 2024

😄 Cool! I got all of my thoughts out already and looks like I've finally configured my GH notifications to see comments on PRs I'm participating in. So if/when you've got some comments I can address them.

Copy link
Contributor

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

seems okay, but could have more. still much better than what we had!

- [Backend developer guide](developer.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: should this file just be the toplevel guide?

src/backend_dev_setup.md Outdated Show resolved Hide resolved
which you can use to pick up your generated code.

## How to Generate the Dylib
Now to actually test native methods you will need to create a dynamically linked library
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: not always, no. say that you will need to compile some kind of library: a staticlib, dylib, or wasm lib. And then say here we'll make a dylib.

- [ ] owned slices should be kotlin arrays
- [ ] slices of strings
- [ ] strings
- [ ] borrows. This is probably one of the trickiest things., as you need to ma
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: this is cut off

@jcrist1
Copy link
Contributor Author

jcrist1 commented May 14, 2024

Thanks for the comments. I replaced the existing backend guide with this, but paraphrased some of the explanation that was there into this document, commented that there are many library options as a compilation target, and fixed the broken comment about borrows.

@jcrist1 jcrist1 requested a review from Manishearth May 14, 2024 20:09
src/developr.md Outdated
@@ -0,0 +1,235 @@
# How to Set up a Minimal Backend
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the file name is wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed. Thanks for the review

@Manishearth Manishearth merged commit 0fc9e7d into rust-diplomat:main May 21, 2024
1 check passed
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.

2 participants