Experimental single-file-script version. Not working yet.
This commit is contained in:
parent
e2b8490b6e
commit
c8782d8eae
|
@ -1 +0,0 @@
|
|||
/target
|
File diff suppressed because it is too large
Load Diff
25
Cargo.toml
25
Cargo.toml
|
@ -1,25 +0,0 @@
|
|||
[package]
|
||||
name = "syndicate-pty-driver"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "1.4.0"
|
||||
libc = "0.2.150"
|
||||
preserves-schema = "4.992.0"
|
||||
pty = "0.2.2"
|
||||
|
||||
# syndicate = { path = "../syndicate-rs/syndicate", version = "0.30"}
|
||||
syndicate = "0.30"
|
||||
|
||||
syndicate-macros = "0.25"
|
||||
|
||||
tokio = { version = "1.34.0", features = ["io-std", "fs"] }
|
||||
tracing = "0.1.40"
|
||||
|
||||
[build-dependencies]
|
||||
preserves-schema = "4.992.0"
|
||||
syndicate-schema-plugin = "0.2.0"
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
15
build.rs
15
build.rs
|
@ -1,15 +0,0 @@
|
|||
use preserves_schema::compiler::*;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let buildroot = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
|
||||
|
||||
let mut gen_dir = buildroot.clone();
|
||||
gen_dir.push("src/schemas");
|
||||
|
||||
let mut c = CompilerConfig::new(gen_dir, "crate::schemas".to_owned());
|
||||
c.plugins.push(Box::new(syndicate_schema_plugin::PatternPlugin));
|
||||
|
||||
let inputs = expand_inputs(&vec!["protocols/schema-bundle.bin".to_owned()])?;
|
||||
c.load_schemas_and_bundles(&inputs, &vec![])?;
|
||||
compile(&c)
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
nightly
|
|
@ -1,3 +1,23 @@
|
|||
#!/usr/bin/env -S cargo +nightly -Zscript
|
||||
```cargo
|
||||
[package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "1.4.0"
|
||||
libc = "0.2.150"
|
||||
preserves-schema = "5.992.0"
|
||||
preserves-schema-macros = "0.992"
|
||||
pty = "0.2.2"
|
||||
|
||||
syndicate = "0.30"
|
||||
syndicate-macros = "0.25"
|
||||
|
||||
tokio = { version = "1.34.0", features = ["io-std", "fs"] }
|
||||
tracing = "0.1.40"
|
||||
```
|
||||
|
||||
use std::io::Write;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::unix::io::FromRawFd;
|
||||
|
@ -24,9 +44,10 @@ use syndicate_macros::on_message;
|
|||
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
mod schemas {
|
||||
include!(concat!(env!("OUT_DIR"), "/src/schemas/mod.rs"));
|
||||
}
|
||||
preserves_schema_macros::compile_preserves_schemas!(
|
||||
crate::schemas,
|
||||
load("<CARGO_MANIFEST_DIR>/protocols/schema-bundle.bin"),
|
||||
);
|
||||
|
||||
preserves_schema::define_language!(language(): Language<AnyValue> {
|
||||
syndicate: syndicate::schemas::Language,
|
Loading…
Reference in New Issue