mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
ports/cef: Use the CEF translator tool to generate the full set of CEF
bindings. This replaces hand-implemented CEF bindings with proper Rust wrappers automatically generated from the C++ headers. This means that, whenever CEF's C++ headers change, we can easily generate both the appropriate C API and the appropriate Rust API. It eliminates much of the hand-written unsafe code within the CEF port, because the CEF translator tool now knows how to generate Rust smart pointer wrappers for each class that corrently perform reference counting. Additionally, this commit adds utility macros (located in `macros.rs`) that make it easier to correctly expose Rust objects as CEF objects. They handle the marshaling of objects between Rust and CEF properly. The net result of this is that you can write mostly-natural-looking Rust in the CEF port and interact with it with a natural-looking C++ API on the embedding side. This setup relies on the branch of CEF located here: https://github.com/pcwalton/chromium-embedded-framework To regenerate, follow the instructions in `ports/cef/README.md`. For convenience, and because I don't anticipate the API to change much, I have vendored in all of the appropriate interfaces.
This commit is contained in:
parent
431644bfc8
commit
3bf779cd21
82 changed files with 30917 additions and 1664 deletions
|
@ -44,19 +44,34 @@ extern crate core_graphics;
|
|||
#[cfg(target_os="macos")]
|
||||
extern crate core_text;
|
||||
|
||||
// Must come first.
|
||||
pub mod macros;
|
||||
|
||||
pub mod browser;
|
||||
pub mod command_line;
|
||||
pub mod cookie;
|
||||
pub mod core;
|
||||
pub mod drag_data;
|
||||
pub mod eutil;
|
||||
#[cfg(any(target_os="linux",target_os="macos"))]
|
||||
pub mod mem;
|
||||
pub mod interfaces;
|
||||
pub mod print_settings;
|
||||
pub mod process_message;
|
||||
pub mod request;
|
||||
pub mod request_context;
|
||||
pub mod response;
|
||||
pub mod stream;
|
||||
pub mod string;
|
||||
pub mod string_list;
|
||||
pub mod string_map;
|
||||
pub mod string_multimap;
|
||||
pub mod stubs;
|
||||
pub mod switches;
|
||||
pub mod task;
|
||||
pub mod types;
|
||||
pub mod urlrequest;
|
||||
pub mod values;
|
||||
pub mod v8;
|
||||
pub mod wrappers;
|
||||
pub mod xml_reader;
|
||||
pub mod zip_reader;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue