-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Feature Request]: Support Resource Dir through CppInterOp #417
Comments
IIRC some discussion was done on discord for the same but not sure we had a concrete way forward. Opening an issue to keep track of the same. |
@anutosh491 @vgvassilev If we build the resource directory as part of the build process then we can mount it the virtual file system of the Jupyter lite build. When mounting we can pick the exact location of the resource dir. Its one of the options of the Jupyter lite build, so would be simple to implement. |
@anutosh491 @vgvassilev
So, this is what I think we should do:
Please correct me if I'm wrong anywhere in my understanding or proposed approach. |
@kr-2003 You do not need stage 2. Emscripten has a virtual file system, which is accessed through an API (see https://emscripten.org/docs/api_reference/Filesystem-API.html ). What you would need to do is use this API to populate the virtual file system Emscripten builds with the resource directory. Once you have devised how to use Emscriptens API to populate the virtual file system, you can then use the Emscripten API to access the headers (making some CppInterOp API which accesses the virtual file system through the code you write to access the virutal file system using Emscriptens API make sense to me). |
The emscripten use case is for the future. First we need to focus on supporting resource dir through cppinterop for the native cases. |
@anutosh491 My understanding is that we already support detecting the resource directory for native platforms to a certain extent (see
|
Hmmm, I don't think so. The feature for detecting the resource dir and providing a resource dir are different things isn't it. For eg
So basically these locations aren't coming out of cppinterop but if you fetch |
I have a doubt. |
@kr-2003 You don't actually need to build the clang compiler to pass any of the other tests, you just need libclang to be built (which is built as part of the clang target when building llvm). You need the clang project to be enabled to build CppInterOp, but don't actually need the clang compiler for any other test other than DetectResourceDir. You can see this by following the build instructions in this repo, by changing the clang target for libclang. It would be nice in my opinion if we could have a way to detect the resource directory directly from libclang, but have no idea if that can actually be done. |
@mcbarton
|
@kr-2003 The truth is that I don't know. My intuition says no, since it says |
Description of new feature
Two main reasons why this would be helpful is that
kernel.json
Currently we do provide a location
"/Users/anutosh491/micromamba/envs/xeus-cpp/lib/clang/19"
but this is just a placeholder right now and such a location doesn't exist during the setup.--preload-file
or--embed-file
Once we have a resource dir through cppinterop, we just move these files to dedicated location that also has contains emscripten's sysroot and then we preload all of these files together.
The text was updated successfully, but these errors were encountered: