{"id":17185568,"url":"https://github.com/jscheid/capnproto-js","last_synced_at":"2025-04-13T18:15:08.810Z","repository":{"id":11913504,"uuid":"14478593","full_name":"jscheid/capnproto-js","owner":"jscheid","description":"Cap'n Proto for JavaScript","archived":false,"fork":false,"pushed_at":"2013-11-18T00:32:23.000Z","size":184,"stargazers_count":29,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T18:15:02.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jscheid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-18T00:31:41.000Z","updated_at":"2023-09-28T00:28:41.000Z","dependencies_parsed_at":"2022-09-18T04:40:59.312Z","dependency_job_id":null,"html_url":"https://github.com/jscheid/capnproto-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscheid%2Fcapnproto-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscheid%2Fcapnproto-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscheid%2Fcapnproto-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jscheid%2Fcapnproto-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jscheid","download_url":"https://codeload.github.com/jscheid/capnproto-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758418,"owners_count":21156957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T00:47:09.654Z","updated_at":"2025-04-13T18:15:08.778Z","avatar_url":"https://github.com/jscheid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"capnproto-js\n============\n\nA port of the [Cap'n Proto](http://kentonv.github.io/capnproto/) runtime to\nJavaScript. Includes a schema compiler that generates JavaScript.\n\nStatus\n------\n\nThis is work in progress.  It is currently based on an [outdated\nversion](https://github.com/kentonv/capnproto/commit/798ff87b1b7e0a2da96355a34fa6e0aa10aaae85)\nof Cap'n Proto, which means it doesn't include the recent object capability and\nRPC additions or any recent bugfixes.  Also, dynamic access (at runtime, based\non schemas) is not implemented and probably will never be, as JavaScript is\nitself a dynamic language.\n\nIt includes a mostly complete port of the Cap'n Proto test suite with over 100\ntest cases passing.\n\nThere are a number of open issues, including the following:\n\n* This isn't very optimized yet and might be terribly slow.\n\n* Currently you need to use Google Closure Compiler to link your code.\n\n* Functions are distributed over nested namespaces, which makes client code\n  (pre-link) somewhat verbose.\n\n* Functions don't check their argument types and are mostly lacking Google\n  Closure parameter annotations, which means it's pretty easy to shoot yourself\n  in the foot.\n\n* Generated code is overly verbose and in places uses inconsistent naming.\n\n* Some of the code is a bit messy and redundant, in particular primitive\n  getter/setters and capnp_list.js.\n\n* No support for Mozilla's int64 datatype or any of the common JavaScript bignum\n  libraries.  int64 are currently represented as an array of two int32s.\n\nGetting Started\n---------------\n\nThe build isn't very straighforward at the moment.  You will need:\n\n* The capnproto source code, to be safe checkout the correct version (798ff87b1b7e0a2da96355a34fa6e0aa10aaae85)\n* A corresponding capnproto installation or build tree\n* [Google Closure Compiler](https://developers.google.com/closure/compiler/)\n* [Google Closure Library](https://developers.google.com/closure/library/)\n\nYou need to edit the following files and adjust paths manually:\n\n* javascript/build-tests.sh\n* javascript/tests/all_tests.html\n\nThen try this:\n\n```\ncapnproto_js=/path/to/capnproto-js\ncapnproto=/path/to/capnproto\ncapnproto_build=/path/to/capnproto-build\n$capnproto_js/c++/configure \\\n    --with-capnp-source=$capnproto/c++ \\\n    --with-capnp=$capnproto_build/capnp \\\n    --with-capnp-libdir=$capnproto_build/.libs\nmake\n$capnproto_js/javascript/build-tests.sh\nopen test/all_tests.html # in your browser\n```\n\nCompatibility\n-------------\n\nAll tests pass in current versions of Chrome (31), Firefox (25) and Safari (7).\nOther browsers have not been tested yet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscheid%2Fcapnproto-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjscheid%2Fcapnproto-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjscheid%2Fcapnproto-js/lists"}