You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this is easy to accomplish in GN, Cargo is a woefully naive build system that has not foreseen such situations (other than giving the ability to call arbitrary code in build.rs - I am working on a general way to call into GN from Cargo's build.rs in cargo_gn - that effort is related and necessary but would still be aided by this issue). Nevertheless we would like Deno to be more Rust-y than Chrome-y, and use cargo as the build frontend - #2608.
In the Rust, there is a mechanism of running code at compile time which does not involve creating a separate executable: procedural macros. It seems possible that we could generate the snapshot at compile time using this functionality. If possible, this could drastically simplify our build setup, and allow Deno to act like a normal Rust project.
The text was updated successfully, but these errors were encountered:
ry
added
the
build
build system or continuous integration related
label
Aug 2, 2019
Currently we build an executable in core called snapshot_creator, which is then run with the bundled TypeScript code (
gen/cli/bundle/main.js
) as input to produce the snapshot binary (target/debug/gen/cli/snapshot_deno.bin
). This binary file is included into the final executable usinginclude_bytes!()
.While this is easy to accomplish in GN, Cargo is a woefully naive build system that has not foreseen such situations (other than giving the ability to call arbitrary code in build.rs - I am working on a general way to call into GN from Cargo's build.rs in cargo_gn - that effort is related and necessary but would still be aided by this issue). Nevertheless we would like Deno to be more Rust-y than Chrome-y, and use cargo as the build frontend - #2608.
In the Rust, there is a mechanism of running code at compile time which does not involve creating a separate executable: procedural macros. It seems possible that we could generate the snapshot at compile time using this functionality. If possible, this could drastically simplify our build setup, and allow Deno to act like a normal Rust project.
The text was updated successfully, but these errors were encountered: