Spydr06 / CSpydr

A static typed low-level compiled programming language inspired by Rust and C
MIT License
84 stars 2 forks source link

TCP/UDP library bindings? #5

Open voxaloo opened 2 years ago

voxaloo commented 2 years ago

it would be fun!

Spydr06 commented 2 years ago

Which library are you thinking of? All the basic networking functions are already implemented via linux syscalls.

voxaloo commented 2 years ago

maybe this? https://github.com/starwing/znet

Spydr06 commented 2 years ago

That would be a way to do it. The only problem is that this library is not installed on linux systems by default (maybe precompile?). I'd rather use the builtin library from glibc/musl, but they use structs with bitfields, which CSpydr doesn't support. Finally there would be the option to just write it from scratch, which I'll probably do someday, but currently the stdlib is too minimal for something like that...

voxaloo commented 2 years ago

i think i might attempt to use that library in cspydr (i assume i do [link("the compiled library here")] right? )

Spydr06 commented 2 years ago

yes, exactly. But that could lead to errors when the path is not correct, try using absolute paths or install the libraray in /usr/lib. I'm really happy to see someone use my language btw! :) Let me know how it's going

Spydr06 commented 2 years ago

So, how‘s it going? Any news?

Spydr06 commented 2 years ago

Closing this because of lack of activity. Reopen when any progress is made.

voxaloo commented 2 years ago

hey Spydr, i have started working on them at here

voxaloo commented 2 years ago

the "binding" stuff is in the namespace internal, and the stuff the developer is gonna use is outside it

Spydr06 commented 2 years ago

That's good, that's also how I do it since CSpydr lacks private functions

voxaloo commented 2 years ago

ah, yeah; the test will be updated soon!

also, i plan on either making a minecraft server (using the tcp stuff) or something else