Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
libr
crate for dynamic runtime symbol resolution (#205)
* POC of `libr` crate for dynamic runtime symbol resolution * Temp support for globals * Better initialization routine * Use `libr::has::` module * Add mutable global support * Pull default up into attribute * Try a Windows specific function * Expose individual initialization functions * Update unix startup code to use libr * Get tests working again with libr setup * Remove hard coded shared library path * Add windows specific types file for `Rstart` * Fix up cfg passthrough * Expose `Rgraphapp` as a 2nd order export * Fix thinkos * Needlessly complicating things * Rename * Remove remaining `extern "C" {` usages * Start `extern "C" {` removal from shim * Move all globals over * Start chipping away at list of libR-sys imports * Another chunk of function exports * `R_CStackLimit` is a mutable global * More functions * Power through last easy functions * Move over `SEXPTYPE`s * Move over `Rboolean` * Move over `R_xlen_t` * Move over `Rbyte` * Move over `Rcomplex` * Move over `SEXP` * Account for awkward variadic function signatures * Remove windows usage of `libR_shim` * Move types to their own file * Expose graphics device types and functions Using an opaque pointer trick * Tweak import for windows * Rip out `libR-sys` and `libR-shim` * Remove `-undefined dynamic_lookup`, yay safety! * No longer need `post-install.sh` * Remove `install_name_tool` usage in CI * Remove unsetting of `DYLD_INSERT_LIBRARIES` We don't actually set this particular env var anyways, so this didn't do anything, but we definitely don't need it now! * Remove comment about testing ark * Add note about how CI works * No longer need R or `dll2lib.R` in build steps * No longer need `dll2lib.R` * Don't need this panic import * Use `libr::*` in the most annoying places * Fiddle with test imports * Preemptively open and leak the 4 R DLLs on Windows So other R packages like stats can find and use them without needing the DLL folder on the PATH * Add `RLibraries` struct to reduce duplication * Tweak unused library field names * Use `get()` and `set()` for mutable globals * Allow unused imports on unix, where we don't use this file yet * Open on unix with `RTLD_GLOBAL` * Source `ldpaths` to set appropriate library path env var * Simpler approach with `bash -c` * Use `sh` and `printf` for simplicity and portability
- Loading branch information