6.14 API for Cross-Platform Configuration
(require setup/cross-system) | package: base |
A Racket installation includes a "system.rktd" file in the directory reported by (find-lib-dir). When the information in that file does not match the running Racket’s information, then the setup/cross-system module infers that Racket is being run in cross-installation mode.
For example, if an in-place Racket installation for a different platform resides at ‹cross-dir›, then
racket -G ‹cross-dir›/etc -X ‹cross-dir›/collects -l- raco pkg
runs raco pkg using the current platform’s racket executable, but using the collections and other configuration information of ‹cross-dir›, as well as modifying the packages of ‹cross-dir›. That can work as long as no platform-specific libraries need to run to perform the requested raco pkg action (e.g., when installing built packages).
Added in version 6.3 of package base.
procedure
(cross-system-type [mode])
→ (or/c symbol? string? bytes? exact-positive-integer? vector?)
mode :
(or/c 'os 'word 'gc 'link 'machine 'so-suffix 'so-mode 'fs-change) = 'os
procedure
(cross-system-library-subpath [mode]) → path-for-some-system?
mode : (or/c 'cgc '3m #f) = (system-type 'gc)
In cross-installation mode, the target platform may have a different path convention than the current platform, so the result is path-for-some-system? instead of path?.
procedure