Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "non-standard" directive syntax: Inline crates #26

Open
fmease opened this issue Dec 3, 2024 · 1 comment
Open

Support for "non-standard" directive syntax: Inline crates #26

fmease opened this issue Dec 3, 2024 · 1 comment
Labels
C-medium Technical complexity: Medium K-feature-request Kind: Feature request P-medium Priority: Medium S-in-progress Status: In progress

Comments

@fmease
Copy link
Owner

fmease commented Dec 3, 2024

Examples:

//@ edition: 2021

fn main() {
    alpha::f();
    beta::g();
    h();
}

//@ crate alpha {
//@ edition: 2015
    pub fn f() {}
//@ }

//@ crate beta {
    pub fn g() {}
//@ }

fn h() {}

They can nest arbitrarily. We probably create tempfiles for inline crates (in /tmp/). However, if we ever add support for "--out-dir", we can also dump them there if applicable.

//@ crate crate_name "file_name" {
//@ }

//@ crate _ "test_name" {
//@ }
//@ raw-crate name {
//  Doesn't get added as a dependency of the "containing"/"super" crate.
//  Use `aux-build`, `aux-crate`, `compile-flags`, `proc-macro` for that.
//  Allows for more fine-grained control.
//@ }
@fmease fmease added K-feature-request Kind: Feature request C-medium Technical complexity: Medium P-medium Priority: Medium S-actionable Status: Actionable labels Dec 4, 2024
@fmease
Copy link
Owner Author

fmease commented Jan 7, 2025

Paving the way: 1d9951e

@fmease fmease added S-in-progress Status: In progress and removed S-actionable Status: Actionable labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-medium Technical complexity: Medium K-feature-request Kind: Feature request P-medium Priority: Medium S-in-progress Status: In progress
Projects
None yet
Development

No branches or pull requests

1 participant