High-level wrapper around Flecs, a powerful ECS (Entity Component System) library, written in Zig language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

const std = @import("std");
const os_api = @import("./os_api.zig");
// Meant for internal use, but exposed since flecs-zig-ble
// doesn't wrap nearly enough of Flecs' available features.
pub const errors = @import("./errors.zig");
pub const c = @import("./c.zig");
// Allows access to types built into Flecs, useful for type lookups.
pub const flecs = @import("./builtin/flecs.zig");
pub const FlecsError = errors.FlecsError;
pub const Path = @import("./path.zig");
pub usingnamespace @import("./context.zig");
pub usingnamespace @import("./entity.zig");
pub usingnamespace @import("./id.zig");
pub usingnamespace @import("./iter.zig");
pub usingnamespace @import("./pair.zig");
pub usingnamespace @import("./world.zig");
/// Ensures that some global settings are set up to interface with Flecs.
/// Must be called before creating a `World`. Subsequent calls are a no-op,
/// but the same allocator must be used.
pub fn init(allocator: std.mem.Allocator) void {
if (!os_api.is_setup)
os_api.setup(allocator)
else if (allocator.ptr != os_api.allocator.ptr)
std.debug.panic("init called multiple times, but allocator does not match", .{});
}
test {
std.testing.refAllDecls(@This());
_ = @import("./test/main.zig");
}