-
Notifications
You must be signed in to change notification settings - Fork 37
Add smallpt as an example notebook #235
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
Conversation
This reverts commit 7a0d110.
Why was this reverted? |
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS='[\"FS\",\"PATH\",\"LDSO\",\"loadDynamicLibrary\",\"ERRNO_CODES\"]'" | ||
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH}/include@/include" | ||
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH}/@/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, I think I had messed up a tad bit here (I just realized this)
Hey @vgvassilev ,
If you remember we had attempted to add the example notebook for smallpt in our codebase. And then I had made a commit to revert this patch #236
The reason for the revert was this
- As you see I moved a level above
sysroot/include
here to justsysroot
. So obviously we were preloading much more than we wanted in our file system. So our builds had this warning
warning: file packager is creating an asset bundle of 582 MB. this is very large, and browsers might have trouble loading it. see https://hacks.mozilla.org/2015/02/synchronous-execution-and-filesystem-access-in-emscripten/
- So though stuff was running locally pretty smoothly .... our deployment was having trouble loading the xcpp.data file which turned out to be huge as the warning said.
Hence the revert.
What I just realized is all SDL headers also lie inside the sysroot/include
location (not sure if this was changed as we shifted to emscripten 3.1.73 or so)
(base) anutosh491@Anutoshs-MacBook-Air SDL % pwd
/Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/SDL
(base) anutosh491@Anutoshs-MacBook-Air SDL % ls
COPYING SDL_config.h SDL_config_pandora.h SDL_gesture.h SDL_keycode.h SDL_opengl.h SDL_render.h SDL_syswm.h begin_code.h
SDL.h SDL_config.h.in SDL_config_windows.h SDL_gfxPrimitives.h SDL_loadso.h SDL_opengles.h SDL_revision.h SDL_thread.h close_code.h
SDL_assert.h SDL_config_android.h SDL_config_wiz.h SDL_haptic.h SDL_log.h SDL_opengles2.h SDL_rotozoom.h SDL_timer.h
SDL_atomic.h SDL_config_emscripten.h SDL_copying.h SDL_hints.h SDL_main.h SDL_pixels.h SDL_rwops.h SDL_touch.h
SDL_audio.h SDL_config_iphoneos.h SDL_cpuinfo.h SDL_image.h SDL_mixer.h SDL_platform.h SDL_scancode.h SDL_ttf.h
SDL_blendmode.h SDL_config_macosx.h SDL_endian.h SDL_input.h SDL_mouse.h SDL_power.h SDL_shape.h SDL_types.h
SDL_clipboard.h SDL_config_minimal.h SDL_error.h SDL_joystick.h SDL_mutex.h SDL_quit.h SDL_stdinc.h SDL_version.h
SDL_compat.h SDL_config_nintendods.h SDL_events.h SDL_keyboard.h SDL_name.h SDL_rect.h SDL_surface.h SDL_video.h
Which means are already having access to the SDL header right now. We don't need to change nothing with preloading and we should definitely be able to add this example !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Please include a summary of changes, motivation and context for this PR.
Replicating https://www.kevinbeason.com/smallpt/ through xeus-cpp-lite
Type of change
Please tick all options which are relevant.