Introduced dylib extension format, cleared up shutdown sequence
This commit is contained in:
@@ -4,11 +4,12 @@ version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
name = "orchid-std"
|
||||
name = "orchid-std-dbg"
|
||||
path = "src/main.rs"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "lib"]
|
||||
name = "orchid_std"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -11,12 +11,11 @@ pub use std::tuple::{HomoTpl, Tpl, Tuple, UntypedTuple};
|
||||
pub use macros::macro_system::MacroSystem;
|
||||
pub use macros::mactree::{MacTok, MacTree};
|
||||
use orchid_api as api;
|
||||
use orchid_extension::binary::orchid_extension_main_body;
|
||||
use orchid_extension::dylib_main;
|
||||
use orchid_extension::entrypoint::ExtensionBuilder;
|
||||
|
||||
pub extern "C" fn orchid_extension_main(cx: api::binary::ExtensionContext) {
|
||||
orchid_extension_main_body(
|
||||
cx,
|
||||
ExtensionBuilder::new("orchid-std::main").system(StdSystem).system(MacroSystem),
|
||||
);
|
||||
pub fn builder() -> ExtensionBuilder {
|
||||
ExtensionBuilder::new("orchid-std::main").system(StdSystem).system(MacroSystem)
|
||||
}
|
||||
|
||||
dylib_main! { builder() }
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
use orchid_extension::entrypoint::ExtensionBuilder;
|
||||
use orchid_extension::tokio::tokio_main;
|
||||
use orchid_std::{MacroSystem, StdSystem};
|
||||
use orchid_extension::tokio_main;
|
||||
use orchid_std::builder;
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub async fn main() {
|
||||
tokio_main(ExtensionBuilder::new("orchid-std::main").system(StdSystem).system(MacroSystem)).await
|
||||
tokio_main! {
|
||||
builder()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user