Package: Rtinycc 0.1.11.9000

Rtinycc: Builds the 'TinyCC' Command-Line Interface and Library for 'C' Scripting in 'R'

Builds the 'TinyCC' (Tiny 'C' Compiler) command-line interface and library for package use in 'R'. The package compiles 'TinyCC' from source and provides R functions to interact with the compiler. 'TinyCC' can be used for header preprocessing, just-in-time compilation of 'C' code in 'R', and lightweight 'C' scripting workflows.

Authors:Sounkou Mahamane Toure [aut, cre], Mike Cheng [cph], Adam Dunkels [cph], Fabrice Bellard and tinycc Authors [ctb]

Rtinycc_0.1.11.9000.tar.gz
Rtinycc_0.1.11.9000.zip(r-4.7)Rtinycc_0.1.11.9000.zip(r-4.6)Rtinycc_0.1.11.9000.zip(r-4.5)
Rtinycc_0.1.11.9000.tgz(r-4.6-x86_64)Rtinycc_0.1.11.9000.tgz(r-4.6-arm64)Rtinycc_0.1.11.9000.tgz(r-4.5-x86_64)Rtinycc_0.1.11.9000.tgz(r-4.5-arm64)
Rtinycc_0.1.11.9000.tar.gz(r-4.7-arm64)Rtinycc_0.1.11.9000.tar.gz(r-4.7-x86_64)Rtinycc_0.1.11.9000.tar.gz(r-4.6-arm64)Rtinycc_0.1.11.9000.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
Rtinycc/json (API)

# Install 'Rtinycc' in R:
install.packages('Rtinycc', repos = c('https://sounkou-bioinfo.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sounkou-bioinfo/rtinycc/issues

Pkgdown/docs site:https://sounkou-bioinfo.github.io

On CRAN:

Conda:

cffitinycc

7.69 score 10 stars 1 packages 33 scripts 460 downloads 106 exports 2 dependencies

Last updated from:b79e789a60. Checks:12 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK177
linux-devel-x86_64OK204
source / vignettesOK218
linux-release-arm64OK174
linux-release-x86_64OK212
macos-release-arm64OK153
macos-release-x86_64OK310
macos-oldrel-arm64OK183
macos-oldrel-x86_64OK372
windows-develOK168
windows-releaseOK155
windows-oldrelOK213
wasm-releaseFAIL106

Exports:blas_lapack_infoget_external_ptr_addrtcc_add_filetcc_add_include_pathtcc_add_librarytcc_add_library_pathtcc_add_symboltcc_add_sysinclude_pathtcc_bin_pathtcc_bindtcc_call_symboltcc_callbacktcc_callback_async_draintcc_callback_async_scheduletcc_callback_closetcc_callback_ptrtcc_callback_validtcc_clitcc_compiletcc_compile_stringtcc_container_oftcc_cstringtcc_cstring_objecttcc_data_ptrtcc_enumtcc_ffitcc_field_addrtcc_freetcc_generate_bindingstcc_get_symboltcc_globaltcc_headertcc_includetcc_include_pathtcc_include_pathstcc_introspecttcc_lib_pathtcc_lib_pathstcc_librarytcc_library_pathtcc_linktcc_list_symbolstcc_malloctcc_map_c_type_to_ffitcc_null_ptrtcc_optionstcc_outputtcc_pathtcc_prefixtcc_ptr_addrtcc_ptr_free_set_nulltcc_ptr_is_nulltcc_ptr_is_ownedtcc_ptr_settcc_read_bytestcc_read_cstringtcc_read_f32tcc_read_f64tcc_read_i16tcc_read_i32tcc_read_i64tcc_read_i8tcc_read_ptrtcc_read_u16tcc_read_u32tcc_read_u64tcc_read_u8tcc_recompiletcc_relocatetcc_run_clitcc_set_optionstcc_sourcetcc_statetcc_structtcc_struct_raw_accesstcc_symbol_is_validtcc_sysinclude_pathstcc_treesitter_bindingstcc_treesitter_definestcc_treesitter_enum_bindingstcc_treesitter_enum_memberstcc_treesitter_enumstcc_treesitter_functionstcc_treesitter_global_typestcc_treesitter_globalstcc_treesitter_struct_accessorstcc_treesitter_struct_bindingstcc_treesitter_struct_memberstcc_treesitter_structstcc_treesitter_union_accessorstcc_treesitter_union_bindingstcc_treesitter_union_memberstcc_treesitter_unionstcc_uniontcc_write_bytestcc_write_f32tcc_write_f64tcc_write_i16tcc_write_i32tcc_write_i64tcc_write_i8tcc_write_ptrtcc_write_u16tcc_write_u32tcc_write_u64tcc_write_u8

Dependencies:formatRlambda.r

FFI Boundary Semantics
Scalar Inputs Are Converted | Vector Inputs Are Usually Borrowed | tcc_call_symbol() Uses .C()-Style Copy-In/Copy-Out | cstring_array Is Rebuilt Per Call | Returned Arrays Are Copied into Fresh R Vectors | Returned cstring Values Are Copied | Returned ptr Values Stay as Pointers | sexp Passes Through Directly | Owned vs Borrowed Helper Pointers | Bitfields Are Scalar Helpers, Not Addressable Views | Serialization Boundary

Last update: 2026-06-03
Started: 2026-04-16

Compilation and Call Overhead
Three Minimal Cases | Availability | Compilation Latency | Generated Wrapper Code | noop() Call Overhead | fill_rand(out, n) And Zero-Copy Arrays | rand_unif(n) And Copy Cost | What These Numbers Mean

Last update: 2026-05-24
Started: 2026-04-16

Internals
The tcc_ffi Object Is a Recipe | Code Generation Is Central | How Values Move Between R, The Wrapper, And C | Copying Versus Borrowing Happens In The Wrapper | Why lambda.r Is Used | Wrapper Builders Work at the SEXP Boundary | Protection And Lifetime Rules Matter | Ownership And Lifetime Semantics In The Main Cases | Call-scoped borrows from R objects | Owned native allocations | Borrowed native views | Returned R objects | Callback registry lifetime | Compiled object lifetime | Host Symbol Injection Happens Before Relocation | Callback Round-Trips Cross The Boundary Twice | State Creation Is Separate from Compilation | The Compiled Object Is an Environment of Closures | Serialization Works by Recompiling the Recipe | Where To Read Next

Last update: 2026-05-24
Started: 2026-04-16

Linking External Libraries
What tcc_link() Is For | A Minimal Linking Example | Adding Helper Code Beside External Symbols | Linking by Name or by Path | Relationship to tcc_compile()

Last update: 2026-04-25
Started: 2026-04-16

FFI Types
Scalar Types | A Minimal Example | String and Pointer Types | Array Types | Direct R Objects with sexp

Last update: 2026-04-22
Started: 2026-04-16

Advanced FFI Types
Array Returns | Callbacks | Globals | Struct Helpers

Last update: 2026-04-22
Started: 2026-04-16

FFI Helper APIs
Allocation and Ownership | Reading and Writing Raw Bytes | Typed Reads and Writes | Pointer-to-Pointer Helpers | C String Helpers

Last update: 2026-04-22
Started: 2026-04-16

FFI Objects, Structs, and Callbacks
Working with Struct Helpers | Registering Callbacks | Async Callback Caveats | Soundness Notes

Last update: 2026-04-22
Started: 2026-04-16

Getting Started with Rtinycc
Toolchain Paths | A Minimal FFI Example | Managing Globals | When to Use tcc_link()

Last update: 2026-04-22
Started: 2026-04-16

Header Parsing with treesitter.c
Availability | Start from a Header Snippet | Inspect Parsed Functions | Generate a Working FFI Object | Struct Helpers | Conservative Type Mapping

Last update: 2026-04-22
Started: 2026-04-16

Readme and manuals

Help Manual

Help pageTopics
Access a compiled FFI symbol$.tcc_compiled
Convert a 'tcc_cstring' object to an R stringas.character.tcc_cstring
Report active BLAS/LAPACK runtime information from Rblas_lapack_info
Generate trampoline code for a callback argumentgenerate_trampoline
Get the address of an external pointerget_external_ptr_addr
Check if a type represents a callbackis_callback_type
Parse callback type specificationparse_callback_type
Print tcc_callback objectprint.tcc_callback
Print tcc_compiled objectprint.tcc_compiled
Print a 'tcc_cstring' objectprint.tcc_cstring
Print tcc_ffi objectprint.tcc_ffi
Add a source file to a libtcc statetcc_add_file
Add an include path to a libtcc statetcc_add_include_path
Add a library to a libtcc statetcc_add_library
Add a library path to a libtcc statetcc_add_library_path
Add a symbol to a libtcc statetcc_add_symbol
Add a system include path to a libtcc statetcc_add_sysinclude_path
Bind symbols with type specificationstcc_bind
Call a symbol from a TinyCC statetcc_call_symbol
Register an R function as a callbacktcc_callback
Drain the async callback queuetcc_callback_async_drain
Schedule a callback to run on the main threadtcc_callback_async_schedule
Close/unregister a callbacktcc_callback_close
Get the C-compatible function pointertcc_callback_ptr
Check if callback is still validtcc_callback_valid
Compile FFI bindingstcc_compile
Compile C code from a character stringtcc_compile_string
Generate container_of helper for struct membertcc_container_of
Create a C-style string pointertcc_cstring
CString S3 Classtcc_cstring_object
Dereference a pointer-to-pointertcc_data_ptr
Declare enum for FFI helper generationtcc_enum
Create a new FFI compilation contexttcc_ffi
Generate field address getter helperstcc_field_addr
Free owned memorytcc_free
Generate bindings from header declarationstcc_generate_bindings
Get a symbol pointer from a libtcc statetcc_get_symbol
Declare a global variable gettertcc_global
Add C headerstcc_header
Add include path to FFI contexttcc_include
TinyCC include search pathstcc_include_paths tcc_sysinclude_paths
Enable introspection helperstcc_introspect
Add library to link againsttcc_library
Add library path to FFI contexttcc_library_path
Link an external shared library with Bun-style FFI bindingstcc_link
List symbols known to a libtcc statetcc_list_symbols
Allocate memory buffertcc_malloc
Map a C type string to an Rtinycc FFI typetcc_map_c_type_to_ffi
Create a NULL pointertcc_null_ptr
Add TinyCC compiler options to FFI contexttcc_options
Set output type for FFI compilationtcc_output
Locate the TinyCC executabletcc_path
TinyCC pathstcc_bin_path tcc_cli tcc_include_path tcc_lib_path tcc_lib_paths tcc_prefix
Get pointer address as integertcc_ptr_addr
Free the pointed memory and set to NULLtcc_ptr_free_set_null
Check whether an external pointer is NULLtcc_ptr_is_null
Check for the '"rtinycc_owned"' tagtcc_ptr_is_owned
Set a pointer-to-pointer valuetcc_ptr_set
Pointer and Buffer Utilities for FFItcc_ptr_utils
Read raw bytes from a pointertcc_read_bytes
Read C-style string from pointertcc_read_cstring
Read 32-bit floattcc_read_f32
Read 64-bit doubles from a pointertcc_read_f64
Read signed 16-bit integertcc_read_i16
Read signed 32-bit integers from a pointertcc_read_i32
Read signed 64-bit integertcc_read_i64
Read signed 8-bit integertcc_read_i8
Read a pointer at byte offsettcc_read_ptr
Read unsigned 16-bit integertcc_read_u16
Read unsigned 32-bit integertcc_read_u32
Read unsigned 64-bit integertcc_read_u64
Read unsigned 8-bit values from a pointertcc_read_u8
Recompile a tcc_compiled objecttcc_recompile
Relocate compiled codetcc_relocate
Run the tinycc CLItcc_run_cli
Apply raw TinyCC options to a libtcc statetcc_set_options
Add C source codetcc_source
Create a libtcc statetcc_state
Declare struct for FFI helper generationtcc_struct
Enable raw byte access for structtcc_struct_raw_access
Check if a tcc_symbol external pointer is validtcc_symbol_is_valid
Generate bindings from a headertcc_treesitter_bindings
Extract macro defines from a header filetcc_treesitter_defines
Apply tcc_enum() bindings from a headertcc_treesitter_enum_bindings
Parse enum members with treesitter.ctcc_treesitter_enum_members
Parse enum declarations with treesitter.ctcc_treesitter_enums
Parse function declarations with treesitter.ctcc_treesitter_functions
Parse global declarations with types using treesitter.ctcc_treesitter_global_types
Parse global declarations with treesitter.ctcc_treesitter_globals
Generate tcc_struct() accessors from header structstcc_treesitter_struct_accessors
Apply tcc_struct() bindings from a headertcc_treesitter_struct_bindings
Parse struct members (including bitfields) with treesitter.ctcc_treesitter_struct_members
Parse struct declarations with treesitter.ctcc_treesitter_structs
Generate tcc_union() accessors from header unionstcc_treesitter_union_accessors
Apply tcc_union() bindings from a headertcc_treesitter_union_bindings
Parse union members with treesitter.ctcc_treesitter_union_members
Parse union declarations with treesitter.ctcc_treesitter_unions
Declare union for FFI helper generationtcc_union
Write raw bytes to a pointertcc_write_bytes
Write a 32-bit floattcc_write_f32
Write a 64-bit doubletcc_write_f64
Write a signed 16-bit integertcc_write_i16
Write a signed 32-bit integertcc_write_i32
Write a signed 64-bit integertcc_write_i64
Write a signed 8-bit integertcc_write_i8
Write a pointer at byte offsettcc_write_ptr
Write an unsigned 16-bit integertcc_write_u16
Write an unsigned 32-bit integertcc_write_u32
Write an unsigned 64-bit integertcc_write_u64
Write an unsigned 8-bit integertcc_write_u8