Permissions
Container permissions in Atym define what system capabilities your WebAssembly applications can access at runtime.
How Permissions Work
Permissions serve as a validation mechanism in your build.yaml configuration file, allowing you to declare what capabilities your application expects to use. These permissions correspond directly to the available container APIs - when you declare a permission like networking or ocre_gpio, you're validating against the specific API functions your application calls. Currently, permissions function as a verification tool to ensure your application's requirements align with the intended functionality, rather than actively granting or restricting access to system resources. During the build process, Atym validates that your WebAssembly module only calls functions that correspond to the permissions you've declared.
If you need to bypass permission validation during development or testing, you can use the --skip-validation flag with the build command:
atym build --skip-validation
Available Permissions
The following permissions are available for use in your container configuration. Each permission corresponds to a specific module and validates access to a set of related functions.
| Permission | Module | Description |
|---|---|---|
networking | wasi_snapshot_preview1 | Network access and communication |
ocre_gpio | env | Hardware GPIO pin access |
ocre_timers | env | Timer and scheduling functions |
ocre_sensors | env | Sensor data access |
ocre_messaging | env | Inter-container messaging |
networking
Module: wasi_snapshot_preview1
| Function | Description |
|---|---|
sock_bind | Bind socket to address |
sock_listen | Listen for connections |
sock_send_to | Send data to specific address |
sock_recv_from | Receive data from address |
sock_open | Open network socket |
sock_addr_local | Get local socket address |
sock_addr_remote | Get remote socket address |
sock_set_recv_timeout | Set receive timeout |
sock_set_send_timeout | Set send timeout |
sock_set_send_buf_size | Set send buffer size |
sock_set_recv_buf_size | Set receive buffer size |
sock_set_keep_alive | Set keep-alive option |
sock_set_reuse_addr | Set address reuse option |
sock_set_reuse_port | Set port reuse option |
sock_set_linger | Set linger option |
sock_set_broadcast | Set broadcast option |
sock_set_tcp_no_delay | Set TCP no delay option |
sock_set_tcp_keep_idle | Set TCP keep idle time |
sock_set_tcp_keep_intvl | Set TCP keep interval |
sock_set_tcp_fastopen_connect | Set TCP fast open connect |
sock_set_tcp_quick_ack | Set TCP quick ACK |
sock_set_ip_multicast_loop | Set IP multicast loop |
sock_set_ip_add_membership | Add IP multicast membership |
sock_set_ip_drop_membership | Drop IP multicast membership |
sock_set_ip_ttl | Set IP time to live |
sock_set_ip_multicast_ttl | Set IP multicast TTL |
sock_set_ipv6_only | Set IPv6 only option |
clock_time_get | Get current time |
poll_oneoff | Poll for events |
proc_exit | Exit process |
sock_accept | Accept incoming connection |
sock_recv | Receive data from socket |
sock_send | Send data to socket |
ocre_gpio
Module: env
| Function | Description |
|---|---|
ocre_gpio_init | Initialize GPIO subsystem |
ocre_gpio_configure | Configure GPIO pin |
ocre_gpio_pin_set | Set GPIO pin value |
ocre_gpio_pin_get | Get GPIO pin value |
ocre_gpio_pin_toggle | Toggle GPIO pin state |
ocre_gpio_register_callback | Register GPIO interrupt callback |
ocre_gpio_unregister_callback | Unregister GPIO interrupt callback |
ocre_timers
Module: env
| Function | Description |
|---|---|
ocre_timer_create | Create new timer |
ocre_timer_start | Start timer |
ocre_timer_stop | Stop timer |
ocre_timer_delete | Delete timer |
ocre_timer_get_remaining | Get remaining timer time |
ocre_timer_set_dispatcher | Set timer event dispatcher |
ocre_sensors
Module: env
| Function | Description |
|---|---|
ocre_sensors_init | Initialize sensor subsystem |
ocre_sensors_discover | Discover available sensors |
ocre_sensors_open | Open sensor connection |
ocre_sensors_get_handle | Get sensor handle |
ocre_sensors_get_channel_count | Get sensor channel count |
ocre_sensors_get_channel_type | Get sensor channel type |
ocre_sensors_read | Read sensor data |
ocre_messaging
Module: env
| Function | Description |
|---|---|
ocre_msg_system_init | Initialize messaging system |
ocre_publish_message | Publish message to topic |
ocre_subscribe_message | Subscribe to message topic |