upvote
It's an odd stance for a C library. In my experience, odd platforms are the main place that C is used in 2026. If you're writing a new Windows or Linux or MacOS or WASM program, it's not likely to be in C. But lots of new microcontroller software is still being written in C.

And he's already hit the hard targets. Many obscure OS's are generally UNIX like and should be easy ports. Many obscure arch's usually are running Linux and should be easy ports.

reply
I have no philosophical complaints with supporting odd architectures in general. I agree that most obscure targets are probably not that much code, since the library is factored with this in mind (e.g. basic WASM support took an afternoon).

It's stated as a non-goal simply because it's not the most valuable thing I can do with my time. My fundamental stance is that writing new Windows or Linux or macOS or WASM programs in C is a good idea, and those are the programs that I write, so that's where my focus is. But if someone would like to come along and write the ~30 syscalls needed to port the library to a new platform, or even register any interest in such, I'd be happy to look into it at that point.

reply
Aren't these MCUs predominantly ARM-based, with some RISC-V thrown in?

I see no contradiction in the desire to support x64 (because it would be ridiculous not to), ARM, and likely RISC-V, but not the venerable but now-fringe architectures like MIPS or Sparc or 68040 or even x86.

reply
Portability across compilers is orthogonal to portability across target architectures.
reply
There are very few C libraries which compile, stock, against the matrix of toolchains, ABIs, and operating systems that this library does. For the subset of machines which run, I don't know, 99.9% of all instructions (i.e. x86_64 + aarch64, Linux + Darwin + Windows), the library just works. This is a definition of portability. Why would portability be a binary of supporting every possible system or being hard tied to a single one?
reply
The natural comparisons are libraries like glibc and newlib, which do support lots of architectures and more importantly make porting to new architectures or taking advantage of platform features pretty straightforward.
reply
I’m not as experienced as some people here, but in ~10 years, I’ve never needed to write code for anything other than x86 or arm. So I agree with the author on their priorities.
reply
Not all ARM systems are created equally. For example many of the 32bit ARM processor didn’t even support floating point ops. So they’d have to be calculated in software.

Aside from various different variations of ARM, I’ve worked several variations of x86 and AMD64, SPARC, PowerPC, MIPS and others I’ve likely forgotten. Not to mention a few 8-bit CPUs too, but those there more than 20 years ago and not really fair to discuss here.

reply
in just the past ten years i’ve had to write asm for x86, arm, mips, riscv, 8051 and something else i can’t even remember. generalizing rules
reply
This debate reminds me of way back in the day when Java first became popular. I excitedly started writing things in Java because it would be portable! I quickly learned, of course, that Java was not portable at all, for values of ‘portable’ equal to ‘my friends can run it without installing the JRE and using the command line’, which is the actual definition in practice. Those friends all ran Wintel boxes. A Win32 i386 binary was (and probably still is) the most universally runnable native code.
reply
Exactly. This shows that "extremely portable" is actually marketing for "It supports a number of platforms. In my opinion, this number is big".
reply
We support extreme portability for sufficiently large values of two.
reply
> This shows that "extremely portable" is actually marketing for "It supports a number of platforms. In my opinion, this number is big".

The number might just be zero - did anyone check if this compiles? I am trying to track down where the function `sp_mem_allocator_alloc_type` is defined (used in 3x places) but it doesn't appear in the GH search results.

I'm not going to clone and build this (too dangerous).

reply
> I am trying to track down where the function `sp_mem_allocator_alloc_type` is defined

A quick glance at the source on github and here you go: https://github.com/tspader/sp/blob/e64697aa649907ce3357a7dd0...

`sp_mem_allocator_alloc_type ` is going through a couple of macro resolutions which ends up at `sp_mem_allocator_alloc`

> I'm not going to clone and build this (too dangerous).

Your computer won't explode just from downloading and compiling some C code, don't worry ;)

The github repo builds and the examples run just fine on macOS by just running `make` in the project directory, although with one warning:

   warning: 'posix_spawn_file_actions_addchdir_np' is deprecated: first deprecated in macOS 26.0
reply
It looks like I need to update my macOS machine! Thanks for the sanity, and thanks for reading.
reply
Only if you want to move from MacOS Sequoia to Tahoe. Tahoe has the Liquid Glass stuff that people don't like as well as other UX changes that have been controversial.

Apple still do security updates on Sequoia.

reply
> Your computer won't explode just from downloading and compiling some C code, don't worry ;)

This is the first time I ever saw anyone dismissing the risk of downloading and running stuff off the internet.

"Don't worry".

reply
Did you never install anything on your computing device? It's the same risk, or even worse if it was closed source software installed via an app store
reply
Compiling
reply
Depends how compiling actually happens in practice, what executables and scripts are called.
reply
"I have no idea how that rm -rf $HOME ended up in the Makefile"
reply
deleted
reply
> Your computer won't explode just from downloading and compiling some C code, don't worry ;)

I have no idea what's in the Makefile, and I'm not going to review it just so to try and figure out where a function is defined :-/

reply
I found the function body in about 30 seconds by browsing the code on github via plain old text search. Is that also to dangerous? ;)
reply
Use better tooling, then. Cscope is your friend.
reply
> I'm not going to clone and build this (too dangerous).

Just create a disposable isolated environment, like VM or container, and do it inside? And, yes, does compile.

reply
For C-based projects, use cscope. It found it pretty fast.
reply
You can be portable, without supporting obscure platforms.

Supporting obscure platforms is what makes portability "extreme", though.

reply
“Portable”, in the context of how it was used, generally refers to software using platform agnostic idioms.

If you have to write extensive patches to actually port the software, then it’s only “portable” in the same sense that any software can be ported with enough effort. Ie “Foo is portable. You just have to write a write a whole new kernel to port it”

reply
Is the Foo kernel 75% of the code base, 5% or 0.01%?
reply
deleted
reply
Yeah he doesn't even try to support major platforms like RISC-V. I know there is fragmentation, but best effort attempts at portability would show some sign of goodwill.
reply
That’s a lot of text to say “well ackshually”.
reply
I could not even find a mention what platform it supports. There is a Linux example on the bottom. Have never seem a libc implementation that does not even mention for which platforms it is meant.
reply
It...is not a libc implementation. That's an impressive level of misunderstanding!
reply
> sp.h is written in C99, and it compiles against any compiler and libc imaginable. It works on Linux, on Windows, on macOS. It works under a WASM host. It works in the browser. It works with MSVC, and MinGW, it works with or without libc, or with weird ones like Cosmopolitan. It works with the big compilers and it works with TCC.
reply
You could, of course, spend 30 seconds look at the code on Github which you would have to do if you were interested in using it anyway?

  TRIPLES = \
    x86_64-linux-none x86_64-linux-gnu x86_64-linux-musl \
    aarch64-linux-none aarch64-linux-gnu aarch64-linux-musl \
    aarch64-macos \
    x86_64-windows-gnu \
    wasm32-freestanding wasm32-wasi
Or you could actually try the compliance suite on an architecture and report back to us if it works?
reply
You've rejected a user. You can't complain that he has no interest in your project at that point. The bridge is burned.
reply
I don't know how the author would feel. But, honestly, for a libc replacement, I'd personally be okay with that ...

If you can't be bothered to look at a Makefile (or ask an AI to look at the Makefile), you are almost certain to be more trouble than any possible benefit you will bring.

Especially in the realm of open source, I'm becoming increasingly comfortable with "If you can't be bothered to jump through even the most minimal of hoops, please get lost."

reply
People are very silly and very entitled. I'd bend over backward to help anyone contribute to or use the library in any way. In response, all I ask is for some common courtesy and friendliness. Spending more than exactly zero seconds on people who won't give you that is a waste of time.

In other words, you hit the nail on the head. Anyone who acts this way can get fucked! We'll be having a good time and making friends without them

reply