
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Describe C function prototypes in JSON.
const char* get_name(int id) {
// ...
}
=>
{
"get_name": {
"returns": "const char*",
"arguments": [
{
"name": "id",
"type": "int"
}
]
}
}
$ npm install cdefs -g
$ cdefs [-o output_file] [file1, [file2, [...]]]
Inspect ex1.c
and ex2.c
and print prototypes to stdout
.
$ cdefs example/ex1.c example/ex2.c
{
"ex1.c": {
"main": {
"returns": "int",
"arguments": [
{
"name": "argc",
"type": "int"
},
{
"name": "argv",
"type": "char**"
}
]
}
},
"ex2.c": {
"test": {
"returns": "float",
"arguments": []
},
"print": {
"returns": "void",
"arguments": [
{
"name": " str",
"type": "char*"
}
]
}
}
}
Inspect ex2.c
and save prototypes to ex2.json
:
$ cdefs example/ex2.c -o ex2.json
var cdefs = require('cdefs');
Get the prototypes for ex1.c
:
var fs = require('fs'),
src = fs.readFileSync('./example/ex1.c', 'utf8'),
prototypes = cdefs(src);
Contributions are welcome.
FAQs
describe c function prototypes in JSON.
We found that cdefs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.