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.
 
 

34 lines
904 B

using System.Runtime.InteropServices;
using gaemstone;
using gaemstone.ECS;
using gaemstone.ECS.Utility;
using static flecs_hub.flecs;
namespace flecs;
[BuiltIn, Module, Path("/flecs/rest")]
[DependsOn<flecs.pipeline>]
#pragma warning disable IDE1006 // Naming rule violation
#pragma warning disable CS8981 // Only contains lower-cased ascii characters
public unsafe partial class rest
: IModuleImport
{
static Entity<T> IModuleImport.Import<T>(World<T> world)
{
using var alloc = TempAllocator.Use();
var module = Entity<T>.GetOrThrow(world, new(ecs_import_c(world,
new() { Data = new() { Pointer = &RestImport } },
alloc.AllocateCString("FlecsRest"))));
module.NewChild("Rest").Build()
.CreateLookup<EcsRest>()
.Set(new EcsRest { port = 27750 });
return module;
}
[UnmanagedCallersOnly]
private static void RestImport(ecs_world_t* world)
=> FlecsRestImport(world);
}