mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Add root-env
This makes images smaller without needing to make sure that no references to the root environment occur in the final image.
This commit is contained in:
parent
7c2ae45809
commit
5b9eda5e87
@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Add `comptime` macro for compile time evaluation.
|
||||
- Run `main` functions in scripts if they exist, just like jpm standalone binaries.
|
||||
- Add `protect` macro.
|
||||
- Add `root-env` to get the root environment table.
|
||||
- Change marshalling protocol with regard to abstract types.
|
||||
- Numerous small bug fixes and usability improvements.
|
||||
|
||||
|
@ -2271,11 +2271,14 @@
|
||||
###
|
||||
###
|
||||
|
||||
(def root-env "The root environment used to create envionments with (make-env)" _env)
|
||||
|
||||
(do
|
||||
(put _env 'boot/opts nil)
|
||||
(put _env '_env nil)
|
||||
(merge-into load-image-dict (env-lookup _env))
|
||||
(merge-into make-image-dict (invert load-image-dict)))
|
||||
(def load-dict (env-lookup _env))
|
||||
(merge-into load-image-dict load-dict)
|
||||
(merge-into make-image-dict (invert load-dict)))
|
||||
|
||||
###
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user