-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Cargo to install rust deps into //third_party/rust_crates #366
Comments
I was under the assumption that |
Edit: |
This functionality doesn't seem to exist in one place, one tool more specifically. |
The third-party cargo subcommand |
Following from the discussions in #370:
cargo download-deps --download_path=third_party/rust_crates/ --config=./Cargo.toml and call it in |
Fixed in d93bd4b |
This commit adds "ext:core/mod.js" built-in ES module that reexports "core", "internals" and "primordials" properties of the "globalThis.__bootstrap" namespace. This is very convenient for embedders that author runtime code using ES modules instead of scripts, because it allows to import these props directly instead of capturing "globalThis.__bootstrap" namespace. To achieve that a new "ModuleMap::lazy_load_es_module_from_code" method was added that accepts a specifier and source code; instantiates and evaluates the provided code as ES module. This will be very useful for denoland/deno_core#263 and denoland#21422.
Currently we are using gclient to mange rust deps:
https://github.com/ry/deno/blob/ad4f335847daffcc5556008aebebaf2d1eecac67/gclient_config.py#L42-L65
These get installed by
tools/build_third_party.py
https://github.com/ry/deno/blob/ad4f335847daffcc5556008aebebaf2d1eecac67/tools/build_third_party.py#L30
This task would instead call
cargo install
to put that source code into//third_party/rust_crates
.I still want to define the build and linking manually in
//build_extra/rust/BUILD.gn
:https://github.com/ry/deno/blob/master/build_extra/rust/BUILD.gn#L24-L57
This task is only about how to fetch the source code. Deno does not aim to build like a normal rust package at this point. "cargo build" in the root project directory will fail - that's ok.
Part of this task will be creating a
Cargo.toml
file for the project. There are only two third party deps so far: "url" and "libc".The text was updated successfully, but these errors were encountered: