Make v8 dependecy optional
Open 💬 10 comments Opened Mar 27, 2026 by catap
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
Rust CLI
What feature would you like to see?
Allow to build codex-rs without v8 integration. Why? Because v8 blob isn't available for all platfroms and building v8 from scratch is quite a tricky.
Additional information
_No response_
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Perhaps, they will not make v8 optional due to Code Mode feature depending on it (unless they make it optional).
In e4eedd6170580d5b06fb539635a78f261a6b7369 they switched to v8 based Code Mode deleting the old implementation (with external Node runtime).
But, they had
v8-poc135047715054b7cefaa9a474cd5135dafe9482fc implementation to demonstrate "_that we can successfully link and use v8 on all platforms that we want to target_."@vt-alt and
v8-prowas never delivered as dedicated release to ask fort who take care of codex in different distributives to actually test it :)And as part of update for OpenBSD ports I had disabled Code Mode completley, see: https://github.com/openbsd/ports/commit/a19ee8af2748dfcaad25be0367008ac25f95e6d4 because otherwise it is blocked.
And, frankly, add v8 build into codex build is complicated and very tricky.
...well, update for 0.118.0 is also quite a work.
I hope they adds it as feature flag.
@bolinfest, @etraut-openai are you willing to consider to accept a PR which makes code-mode optional via feature?
@catap I would say, "not at this time."
Admittedly, getting v8 into the build has been quite a bit of work for us. Maintaining two build paths would be additional work as we try to ramp up Code Mode (and also as we get the Bazel build working on all three platforms, which is another dimension to the build situation).
It is early days for Code Mode, so I can see where it appears low-value and therefore easy to dismiss. Certainly we wouldn't have done the work on our side to get v8 working as part of the build if we didn't think there was promise there, so if Code Mode pans out, a BSD port without Code Mode would be a degraded experience.
@bolinfest well, you haven't got pre-build version of v8 for non Linux, and, frankly, building v8 is quite tricky and will complicate port a lot.
So, here two options: degradated expirence without Code Mode, or no codex at all. Why? I've tried to cut v8 off from the code mode, and it much larger work which at some points lead to conclusion that it ends with parallel code mode, and simple disable it seems to be easy.
I willing to prepare PR and more or less test it and keep "no code mode" feature, if you willing accept it.
@bolinfest v8 basically kills the portability of app-server. We can't really build this for iOS at all (no JIT), android and linux is a massive pain.
I'm hacking it away with a patch right now
#[cfg(not(any(target_os = "ios", target_os = "android", target_os = "linux")))]and have to stub out the code-mode stuff but I'd think longer-term this is going to be a bigger issue.@dnakov, please understand that making the change that you're suggesting would interfere with some of our top development priorities at the moment. Porting the app server to other platforms like iOS and Android is not a priority for us right now. If and when it becomes a priority, we'll look at how to address this. In the meantime, if you want to explore porting to other platforms, you're welcome to make any required changes on a fork.
@etraut-openai i understand, just flagging it as an external user of app-server.
codex is one of the very few compiled-language apps in its class (everything else is typescript) that supports these specific use cases and it's sad to see it lose that.