Remove ffi_init

This commit is contained in:
Fabian Boehm 2024-01-07 14:37:35 +01:00
parent 1e7e6e6379
commit 53f7d1aa11
3 changed files with 0 additions and 29 deletions

View file

@ -98,7 +98,6 @@ fn main() {
// This allows "Rust to be used from C++"
// This must come before autocxx so that cxx can emit its cxx.h header.
let source_files = vec![
"fish-rust/src/ffi_init.rs",
"fish-rust/src/fish_key_reader.rs",
"fish-rust/src/fish_indent.rs",
"fish-rust/src/fish.rs",

View file

@ -1,27 +0,0 @@
/// Bridged functions concerned with initialization.
use crate::locale;
#[cxx::bridge]
mod ffi2 {
extern "Rust" {
fn rust_init();
fn rust_set_flog_file_fd(fd: i32);
fn rust_invalidate_numeric_locale();
}
}
/// Entry point for Rust-specific initialization.
fn rust_init() {
crate::topic_monitor::topic_monitor_init();
crate::threads::init();
}
/// FFI bridge for setting FLOG file descriptor.
fn rust_set_flog_file_fd(fd: i32) {
crate::flog::set_flog_file_fd(fd as libc::c_int);
}
/// FFI bridge to invalidate cached locale bits.
fn rust_invalidate_numeric_locale() {
locale::invalidate_numeric_locale();
}

View file

@ -51,7 +51,6 @@ mod fd_monitor;
mod fd_readable_set;
mod fds;
mod ffi;
mod ffi_init;
mod fish;
mod fish_indent;
mod fish_key_reader;