Skip to content

Commit 69ee6d1

Browse files
committed
refactor!: removing Rust loader generator
It is incomplete and it's not something I'll actually be using in my own projects. I don't have anything Rust-y that uses OpenGL, Vulkan, EGL, or anything like that. So for now, let's stick to just doing what we're best at: making a C loader. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
1 parent 8fe1670 commit 69ee6d1

7 files changed

Lines changed: 3 additions & 300 deletions

File tree

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[crates.io]: https://crates.io/crates/gloam
77

88
A loader generator for Vulkan, OpenGL, OpenGL ES, EGL, GLX, and WGL.
9-
Reads Khronos XML spec files and generates C or Rust dispatch code.
9+
Reads Khronos XML spec files and generates C dispatch code.
1010

1111
gloam is a clean-room rewrite of [GLAD](https://github.com/Dav1dde/glad) in Rust,
1212
with first-class support for ANGLE extension supplementals, Vulkan command-scope
@@ -27,9 +27,6 @@ cargo build --release
2727
# 3. Generate a C loader for OpenGL 3.3 core + all extensions.
2828
./target/release/gloam --api gl:core=3.3 c --loader
2929

30-
# 4. Generate a Rust loader for Vulkan 1.3.
31-
./target/release/gloam --api vk=1.3 rust
32-
3330
# 5. Generate a combined GL 3.3 + GLES 2.0 + Vulkan + EGL loader.
3431
./target/release/gloam --api gl:core,gles2,vulkan,egl --merge c --alias --loader
3532
```
@@ -83,8 +80,6 @@ Commands:
8380
was loaded by the driver (or vice versa), the pointer
8481
is propagated to both slots.
8582
--loader Include a built-in dlopen/LoadLibrary convenience layer.
86-
rust Generate a Rust loader.
87-
--alias Enable bijective function-pointer alias resolution.
8883
```
8984

9085
### Extension selection flags
@@ -282,4 +277,4 @@ cargo build --release # release
282277
cargo test
283278
```
284279

285-
Requires Rust 1.75 or later.
280+
Requires Rust 1.87 or later.

src/cli.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ pub struct Cli {
6565
pub enum Generator {
6666
/// Generate a C loader.
6767
C(CArgs),
68-
/// Generate a Rust loader.
69-
Rust(RustArgs),
7068
}
7169

7270
#[derive(Args, Debug)]
@@ -80,13 +78,6 @@ pub struct CArgs {
8078
pub loader: bool,
8179
}
8280

83-
#[derive(Args, Debug)]
84-
pub struct RustArgs {
85-
/// Enable bijective function-pointer alias resolution.
86-
#[arg(long)]
87-
pub alias: bool,
88-
}
89-
9081
impl Cli {
9182
pub fn api_requests(&self) -> Result<Vec<ApiRequest>> {
9283
self.api

src/generator/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Code generation. Sub-modules render minijinja templates against a
2-
//! resolved `FeatureSet` to produce C and Rust loader files.
2+
//! resolved `FeatureSet` to produce C loader files.
33
44
pub mod c;
5-
pub mod rust;

src/generator/rust/mod.rs

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/generator/rust/templates/mod.rs.j2

Lines changed: 0 additions & 188 deletions
This file was deleted.

src/main.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ fn run() -> Result<()> {
5252
generator::c::generate(fs, c_args, out, cli.fetch, &command_line)?;
5353
}
5454
}
55-
Generator::Rust(r_args) => {
56-
if !cli.quiet {
57-
eprintln!("gloam: generating Rust loader...");
58-
}
59-
for fs in &feature_sets {
60-
generator::rust::generate(fs, r_args, out)?;
61-
}
62-
}
6355
}
6456

6557
if !cli.quiet {

src/resolve.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ pub fn build_feature_sets(cli: &Cli) -> Result<Vec<FeatureSet>> {
267267

268268
let alias = match &cli.generator {
269269
crate::cli::Generator::C(c) => c.alias,
270-
crate::cli::Generator::Rust(r) => r.alias,
271270
};
272271

273272
// Group requests by spec family only for merged builds.

0 commit comments

Comments
 (0)