Embedding V in existing applications?
I commend your efforts! I expect V lang to go far!
I'm searching for a simple yet efficient language that would allow embedding in existing apps as well as ability to do runtime compilation.
Another requirement I have is for compilation/execution to be deterministic across all platforms. By the sound of it, it wouldn't be a problem for V to interface with C/C++ code.
We're currently using LuaJIT, but that is a temporary solution.
Like the home page says, V can be called from any language that can call C.
Embedding it like Lua is not possible, because it's not an interpreted language. But I don't think there's much point, because V covers all the strong points of Lua: it's simple, small, and it supports hot code reloading, so you can tinker with your code while the program is running.
> Embedding it like Lua is not possible, because it's not an interpreted language.
Provide details of what is not possible? use cases.
P.S. take a look: https://github.com/phr34k/vdsl/blob/master/Sample/vpl/main.cpp#L1372
Would it not be possible to embed the compiler? Since x64 machine code is generated directly, it doesn't seem too difficult to generate it in memory rather than as a Mach-O, ELF or PE binary. tcc (https://bellard.org/tcc/) supports this, for example.
The use case for this would be to support writing plugins in V that are then loaded from source, meaning the application does not need recompiled to link the plugins.
Log in via GitHub to comment
, open-source blogging/forum software written in V