Move denali client to separate lib.

This commit is contained in:
Drew Galbraith 2025-02-07 18:24:48 -08:00
parent c8f84ec352
commit 59efb1659a
10 changed files with 56 additions and 18 deletions

View file

@ -0,0 +1,11 @@
[package]
name = "denali_client"
version = "0.1.0"
edition = "2024"
[dependencies]
mammoth = { path = "../../mammoth" }
yunq = { path = "../../yunq" }
[build-dependencies]
yunqc = { path = "../../../../yunq/rust" }

View file

@ -0,0 +1,14 @@
use std::fs;
fn main() {
let input_file = "../../../../sys/denali/lib/denali/denali.yunq";
println!("cargo::rerun-if-changed={input_file}");
let input = fs::read_to_string(input_file).expect("Failed to read input file");
let code = yunqc::codegen(&input).expect("Failed to generate yunq code.");
let out = std::env::var("OUT_DIR").unwrap() + "/yunq.rs";
fs::write(out, code).expect("Failed to write generated code.");
}

View file

@ -0,0 +1,5 @@
#![no_std]
use core::include;
include!(concat!(env!("OUT_DIR"), "/yunq.rs"));