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

Enchanced support #2

Closed
1 of 3 tasks
kassane opened this issue May 16, 2022 · 3 comments
Closed
1 of 3 tasks

Enchanced support #2

kassane opened this issue May 16, 2022 · 3 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@kassane
Copy link
Owner

kassane commented May 16, 2022

Acceptable Criteria

  • Fix comptime support - generic arg_type (requires review)
  • Functors members
  • Nested union and struct support - zig does not support anonymous union | struct, only anonymous literals (requires review)

@kassane kassane added enhancement New feature or request bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels May 16, 2022
@kassane kassane self-assigned this May 16, 2022
@kassane kassane removed the good first issue Good for newcomers label May 16, 2022
@kassane
Copy link
Owner Author

kassane commented Jun 17, 2022

Investigate interoperability between generic functions with comptime.

Ref: https://github.com/nekodjin/rusty-ziguanas

@kassane kassane removed their assignment Nov 22, 2022
@kassane
Copy link
Owner Author

kassane commented Nov 27, 2022

New issue

I don't get reviews and my time is short during the weeks (full time job + undergraduate university).
There will be a short time to fix this new problem.

However, I' m not convinced if this modification will be mergeable or not.
It' s not in Mozilla's interest (cbindgen maintainers).

Perhaps this conversion may not be very useful for the majority (rust devel), but it doesn't mean that it is unfeasible since they have the interest to abstain from the C language as much as possible to make their applications secure (theoretically).
I also intend, if possible, to make the reverse (zig to rust). But besides the time I will also need to improve my parsing and transpiling skills. I have never worked with compilers or anything like that.

I am curious about some alternatives to cbindgen, e.g. diplomat(cc: @Manishearth) seems to be simpler. I can't tell if you would be interested in this possible journey. (I need help! 😅 )

@Manishearth
Copy link

From Diplomat's POV: We're very happy to support more backends. Note that Diplomat itself does not have the bandwidth to maintain backends we haven't decided to staff, so a Zig backend would be in a similar situation as .NET: We can have the source be in tree and fix it for small changes but we won't actively maintain it and may disable it if we make major changes. In the long run we'd like to not have to do that.

Diplomat is designed to not require backends to be built in-tree, however: you can use the HIR output of the diplomat_core module to build your own that you just maintain based on public Diplomat releases, and we're happy to cut releases whenever ya'll need.

If building a new one I would recommend using the new HIR stuff, the AST infrastructure is deprecated for writing backends. The C2 (i.e. "C but newer") backend is an example of one written on the HIR infrastructure and we plan to work on a C++-HIR one in December, hopefully leading to a lot more improvements there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants