Feature: use a runtime for Janet instead of embedding the core #4
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Priority/Undefined
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NTBBloodbath/koa#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Embedding the core is against koa's philosophy of being extensible and flexible. Following a runtime approach like (Neo)vim would better fit its design philosophy and principles.
There will be key differences with the regular way editors bundle their runtime. Editors such as Neovim will install runtime files at
/usr/share/nvim/runtimeon Linux systems, and while this is fine, Koa wants to go beyond what we are used to. Instead of being bundled during the installation stage into a directory the user shouldn't touch at all (because/usr/shareis for system-wide programs data), Koa will most probably embed the core runtime files during compilation time.Yes, embedding them is against the core philosophy. However, instead of embedding and running it directly from the embedded file contents as we are doing now, koa will write these files in the following cases into the
~/.local/share/koa/runtimedirectory:~/.local/share/koa/runtimeif it does not exist, obviously).~/.local/share/koa/runtimedirectory does not exist.That way, we still use embedded Janet scripts but we use them only for the boostrapping process, being able to just ship the binary when making a new release. Less overhead, less work for the build system, less work for the package maintainers.
For development purposes, another environment variable will be available,
KOA_DEV. This one is meant to be used by contributors and maintainers while developing koa. It will completely skip the embedded files and work directly from runtime, that way we won't need to rebuild if we change any Janet file to test the changes.NB: The
KOA_DEVidea has been dropped, as using the Zig builtin module has a compilation mode enum. That said, Koa will automatically pick up the development runtime automatically when compiled as a debug build (the default).