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

Features roadmap #59

Open
4 tasks
MasonProtter opened this issue Feb 10, 2022 · 12 comments
Open
4 tasks

Features roadmap #59

MasonProtter opened this issue Feb 10, 2022 · 12 comments
Labels
documentation Improvements or additions to documentation

Comments

@MasonProtter
Copy link
Collaborator

MasonProtter commented Feb 10, 2022

  • Support storing and relocation of global variables
  • Support for linking binaries to julia's runtime
  • Support Windows. (Help wanted!)
  • Interfaces and tests for cross compilation
@tshort
Copy link
Owner

tshort commented Feb 10, 2022

Ambitious! If we're looking at farther-out features, here are some:

  • Support basic globals without Julia's runtime (maybe covered by the next item).
  • C-level deserialization/linking in a shared library to support calling from other languages like Python or R.
  • Cross compiling (I think this is rather hard in general).

@MasonProtter
Copy link
Collaborator Author

I'll add those to the checklist.

@MasonProtter
Copy link
Collaborator Author

MasonProtter commented Feb 10, 2022

I think "Support basic globals without Julia's runtime" technically already works with #58. I got the globals working before I even figured out how to link to the runtime. The only real problem is that the way I relocate the globals is currently happening inside a julia session, so yeah I think it's kinda covered by the deserialization point and the lower startup time point.

Naively, I think actually that cross compilation might not be too bad (famous last words I know). Afterall, GPUCompiler is already doing cross compilation to GPUs.

@vchuravy
Copy link
Contributor

Cross-compilation on the same OS is feasible, e.g. Linux to Linux, but cross-compilation across OS's is tricky since people love to do: @statis if Sys.iswindows()

@AriMKatz
Copy link

AriMKatz commented Feb 10, 2022

out of curiosity, how hard would WASM compilation be? Just flipping a switch in LLVM or something else?

I'd imagine could be straightforward for full static code. Otherwise, we could maybe compile the runtime to wasm- Python does that for the entire interpreter. Or is that better as some sort of plugin system or dependent package?

cc: @fonsp

@MasonProtter
Copy link
Collaborator Author

Yeah, the main issue as far as I understand is that the libjulia runtime is not well supported on WASM. I think LLVM is able to compile to WASM fine from what I understand, but stuff that needs the runtime might be dicey. I'm not an expert at all on this though

@AriMKatz
Copy link

AriMKatz commented Feb 10, 2022

Yea, does seem dicey...on the other hand @Keno got all of Julia to compile to WASM here (with caveats): https://github.com/Keno/julia-wasm and that seems even dicey-er. So maybe it's not as bad as we think (if we just want the slim libjulia and don't need to codegen) and there could be some code or lessons lifted from that effort.

@vchuravy
Copy link
Contributor

vchuravy commented Feb 11, 2022

@rhuffy has been working on compiling libjulia to WASM

@fonsp
Copy link

fonsp commented Feb 14, 2022

@rhuffy has been working on compiling libjulia to WASM

Awesome! How is the progress there?

@davidanthoff
Copy link

Is compiling standalone executable also something that might work with this? We would love to eventually ship the language server as a precompiled binary :)

@Seelengrab
Copy link

Seelengrab commented Apr 22, 2022

Maybe I'm going a little off the deep end here, but is targeting bare-metal (i.e., there is no OS) anything short of infeasible? Particularly in combination with baremodule, so that there's nothing in there that's not required.

@brenhinkeller brenhinkeller added the documentation Improvements or additions to documentation label Nov 2, 2022
@MasonProtter
Copy link
Collaborator Author

Okay, so a lot has changed with version 0.6 (#146) and a lot of stuff on that roadmap is no longer relevant or planned, so I've updated it.

The package is now significantly simpler and more streamlined, so hopefully future work on it will be easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

8 participants