Comments (8)
Maybe not that much work for a basic subset of the POSIX socket features, which can be realized using Circle. Circle does support the AF_INET address family only and only a subset of functions and only very few socket options. But this could be extended in some way, if there is some need for it.
Providing POSIX sockets makes probably only sense with a C standard library implementation available. @smuehlst is currently working on porting newlib onto Circle. With the right toolchain his very interesting project will allow to use the features of the C++ standard library too. This will make porting applications onto Circle much easier.
I thought about, if this POSIX socket support could be implemented as a separate library project to be included as a sub-module into the project of @smuehlst. But because the file functions in newlib and the socket functions use the same file descriptor pool and because there are functions which are used in both domains (e.g. close()) this might be not doable.
I have seen that there is some socket support in newlib (e.g. for Linux targets). I don't know how difficult it is, to port this to Circle. Perhaps @smuehlst is reading this and can answer this question.
from circle.
For a c standard library in circle this comes to my mind: https://www.fefe.de/dietlibc/
I don't really know anything about that, but from my basic understanding it might be a very good choice for circle?
EDIT: thinking about it its probably useless, because it uses syscalls and we don't have any system it could call?
from circle.
Using newlib is a very good choice. It is well documented and it is available with most Linux distributions. For the latter, there is no need to build your own toolchain with newlib support. Of course when you are eager to build newlib with the special flags for the Raspberry Pi ARM version, then you can build your own environment -> http://www.raspberrypi-dmx.org/raspberry-pi-dmx512-rdm/development-environment
from circle.
newlib has system call stubs too, which have to be implemented to use the full features. @smuehlst has already done this to some degree. Many functions are already working, including features of the C++ standard library. I'm sure he will get this running and there is no need for a different code base.
from circle.
newlib indeed has support for socket() for some platforms, so I agree with @rsta2 that it could be feasible to expose Circle's networking features through the POSIX networking interface. I will need to do more research on how that could be implemented.
from circle.
Ah. i didn't really know about newlib and misunderstood it. (I thought this was a working title for something you were working on 😅) Sounds like its probably a much better choice than dietlibc - especially if you already started on making it work.
Sticking to existing/ancient interfaces could make it a lot easier to use code with circle - but i don't know if that is a real requirement at all, so POSIX-sockets was just a random thought i had.
from circle.
Using the C and/or C++ standard libraries can make bare metal programming and especially porting existing applications much easier. That's why I'm supporting this project with Circle. Adding POSIX sockets to this is a good idea. So thanks for that!
from circle.
I think, this is discussed in smuehlst/circle-stdlib#31 now. So this can be closed.
from circle.
Related Issues (20)
- USB CDC/ACM gadget HOT 19
- GetClockTicks without wrap HOT 3
- GPU support on Raspi 4 HOT 4
- Circle linker failure with softfp HOT 2
- Make USB gadget vendor and device strings configurable HOT 2
- Support for touchscreens with additional reports in HID descriptor HOT 7
- Question about log when testing with Qemu HOT 2
- Help with setting PREFIX HOT 4
- Question: Waveshare 5'' DSI display support? HOT 2
- Waveshare 15.6inch Capacitive Touch Screen HOT 2
- Can I run OpenCV? HOT 2
- Sample "07-usbstorage" fails with Pi5 HOT 8
- Unsuportted USB touch screen driver - Big Tree Tech HDMI7 HOT 10
- How to do GPIOPin button Interrupt correctly HOT 23
- FIQ support on RPI Zero 2 HOT 3
- How to remove all text not from own CSerialDevice HOT 11
- Ability to set HDMI output refresh rate HOT 3
- About memory management on CM4 HOT 2
- Building circle-stdlib w/Circle: This header is not available in freestanding mode. HOT 6
- I2S simultaneous input+output HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circle.