3 unstable releases
0.2.0 | Jul 27, 2023 |
---|---|
0.1.1 | Feb 27, 2023 |
0.1.0 | Sep 18, 2020 |
#1895 in Math
585KB
10K
SLoC
Things I've done to make R's nmath library work
- Copied the nmath source
- Set
MATHLIB_STANDALONE
: telling nmath to build for use outside R - Copied R's includes since they are still needed even with
MATHLIB_STANDALONE
. - Copy
Rconfig.h
andconfig.h
from the mingw dir (normally these files would be generated, but I think the math libs use very little of them). - Copy
Rmath.h
fromRmath.h0.in
and replace the build system placeholders (there are only 2). - Manually whitelist the functions to include, otherwise we pull in a lot of stuff, including stuff outside the source tree (and also it doesn't compile for some reason).
Rmath.h
wierdly sets the normal functions as aliases - we have to use the raw function name here e.g.dnorm4
.
I've done some work on rust versions of these functions in the riir
branch. This branch
should be used for testing those functions in future.
R is released as GPLv2 which I interpret as meaning this library must also be released as GPLv2. If all the functions were replaced with native rust ones, then the license could be changed to something more permissive.
No runtime deps
~0–2.2MB
~45K SLoC