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

Invoke compiler for other targets #1856

Closed
daurnimator opened this issue Dec 24, 2018 · 3 comments
Closed

Invoke compiler for other targets #1856

daurnimator opened this issue Dec 24, 2018 · 3 comments
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@daurnimator
Copy link
Collaborator

It would be interesting if you could e.g. invoke the compiler with the bpf target (passing a function) while compiling a linux x86 application. The output would be returned as a slice, which you could pass to the kernel with BPF_PROG_LOAD.

This would have other interesting applications, e.g. you could embed a program inside of an emulator.

@andrewrk andrewrk added this to the 0.5.0 milestone Dec 24, 2018
@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Dec 24, 2018
@daurnimator
Copy link
Collaborator Author

Another more mainstream use-case: embedding wasm output.

@shawnl
Copy link
Contributor

shawnl commented Apr 21, 2019

Also, you might want to be able to call the LLVM bindings during comptime. This would require co-routines or blocks to be implemented, so you pass arond LLVM BasicBlock and annonymous functions, and then attach them to zig code.

@andrewrk
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

3 participants