feat: Codegen feature flags (#28920)

This commit adds "deno_features" crate that contains definitions of all
unstable features in Deno.

Based on these definitions, both Rust and JS code is generated ensuring
that the two are always in sync.

In addition some of flag handling was rewritten to use the generated
definitions, instead of hand rolling these flag definitions.

---------

Co-authored-by: snek <snek@deno.com>
This commit is contained in:
Bartek Iwańczuk 2025-04-25 10:33:45 +02:00 committed by GitHub
parent 4924731ac3
commit 189ccffdb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 701 additions and 284 deletions

View file

@ -49,7 +49,7 @@ use deno_resolver::npm::ResolvePkgFolderFromDenoReqError;
use deno_runtime::fmt_errors::format_js_error;
use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics;
use deno_runtime::WorkerExecutionMode;
pub use deno_runtime::UNSTABLE_GRANULAR_FLAGS;
pub use deno_runtime::UNSTABLE_FEATURES;
use deno_telemetry::OtelConfig;
use deno_terminal::colors;
use factory::CliFactory;