diff options
| author | bfredl <bjorn.linse@gmail.com> | 2025-03-11 14:01:55 +0100 |
|---|---|---|
| committer | bfredl <bjorn.linse@gmail.com> | 2025-05-02 09:28:50 +0200 |
| commit | 1f004970f00bd8ef7ad955b52857df136f82185b (patch) | |
| tree | f3714cf7fcb3e8cd9ec20249c2d3ee9aef5b78c6 /src/gen/gen_api_dispatch.lua | |
| parent | 0ab0cdb2dabc551f836851aa85d06e927c42d92a (diff) | |
| download | rneovim-1f004970f00bd8ef7ad955b52857df136f82185b.tar.gz rneovim-1f004970f00bd8ef7ad955b52857df136f82185b.tar.bz2 rneovim-1f004970f00bd8ef7ad955b52857df136f82185b.zip | |
feat(build): build.zig MVP: build and run functionaltests on linux
NEW BUILD SYSTEM!
This is a MVP implementation which supports building the "nvim" binary,
including cross-compilation for some targets.
As an example, you can build a aarch64-macos binary from
an x86-64-linux-gnu host, or vice versa
Add CI target for build.zig currently for functionaltests on linux
x86_64 only
Follow up items:
- praxis for version and dependency bumping
- windows 💀
- full integration of libintl and gettext (or a desicion not to)
- update help and API metadata files
- installation into a $PREFIX
- more tests and linters
Diffstat (limited to 'src/gen/gen_api_dispatch.lua')
| -rw-r--r-- | src/gen/gen_api_dispatch.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gen/gen_api_dispatch.lua b/src/gen/gen_api_dispatch.lua index b5433527bc..6480e66489 100644 --- a/src/gen/gen_api_dispatch.lua +++ b/src/gen/gen_api_dispatch.lua @@ -11,8 +11,6 @@ local mpack = vim.mpack local hashy = require 'gen.hashy' -local pre_args = 7 -assert(#arg >= pre_args) -- output h file with generated dispatch functions (dispatch_wrappers.generated.h) local dispatch_outputf = arg[1] -- output h file with packed metadata (api_metadata.generated.h) @@ -23,6 +21,11 @@ local lua_c_bindings_outputf = arg[4] -- lua_api_c_bindings.generated.c local keysets_outputf = arg[5] -- keysets_defs.generated.h local ui_metadata_inputf = arg[6] -- ui events metadata local git_version_inputf = arg[7] -- git version header +local nvim_version_inputf = arg[8] -- nvim version +local dump_bin_array_inputf = arg[9] +local dispatch_deprecated_inputf = arg[10] +local pre_args = 10 +assert(#arg >= pre_args) local functions = {} @@ -152,7 +155,7 @@ end -- Export functions under older deprecated names. -- These will be removed eventually. -local deprecated_aliases = require('nvim.api.dispatch_deprecated') +local deprecated_aliases = loadfile(dispatch_deprecated_inputf)() for _, f in ipairs(shallowcopy(functions)) do local ismethod = false if startswith(f.name, 'nvim_') then @@ -244,7 +247,7 @@ for x in string.gmatch(ui_options_text, '"([a-z][a-z_]+)"') do table.insert(ui_options, x) end -local version = require 'nvim_version' -- `build/nvim_version.lua` file. +local version = loadfile(nvim_version_inputf)() local git_version = io.open(git_version_inputf):read '*a' local version_build = string.match(git_version, '#define NVIM_VERSION_BUILD "([^"]+)"') or vim.NIL @@ -302,7 +305,7 @@ for i, item in ipairs(types) do end local packed = table.concat(pieces) -local dump_bin_array = require('gen.dump_bin_array') +local dump_bin_array = loadfile(dump_bin_array_inputf)() dump_bin_array(api_metadata_output, 'packed_api_metadata', packed) api_metadata_output:close() |