Skip to content

Commit

Permalink
Add options.use_nanobind() + doc / gotcha nanobind & mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Nov 15, 2024
1 parent be6e992 commit 3fc39f0
Show file tree
Hide file tree
Showing 22 changed files with 1,887 additions and 1,853 deletions.
64 changes: 32 additions & 32 deletions docs/litgen_book/01_05_05_online.html
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</style>

<script>
function copy_code_1731705705359_8499() {
function copy_code_1731710853841_8591() {
let code = `#################### <generated_from:BoxedTypes> ####################
class BoxedBool:
value: bool
Expand Down Expand Up @@ -633,10 +633,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
navigator.clipboard.writeText(code);
}
</script>
<button class="collapsible_header" id="btn_1731705705359_8499_0" >Corresponding python decls (stub)</button>
<div class="collapsible_content" id="content_1731705705359_8499_0">
<button class="collapsible_header" id="btn_1731710853841_8591_0" >Corresponding python decls (stub)</button>
<div class="collapsible_content" id="content_1731710853841_8591_0">
<div>
<button onclick="copy_code_1731705705359_8499()" align="right">copy &#x270d;</button>
<button onclick="copy_code_1731710853841_8591()" align="right">copy &#x270d;</button>
</div>
<style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
Expand Down Expand Up @@ -778,10 +778,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</div>

<script>
var button = document.getElementById("btn_1731705705359_8499_0");
var button = document.getElementById("btn_1731710853841_8591_0");
button.addEventListener("click", function() {
this.classList.toggle("collapsible_header_opened");
var content = document.getElementById("content_1731705705359_8499_0");
var content = document.getElementById("content_1731710853841_8591_0");
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
Expand All @@ -791,9 +791,9 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</script>

<script>
var collapsible_header = document.getElementById("btn_1731705705359_8499_0");
var collapsible_header = document.getElementById("btn_1731710853841_8591_0");
collapsible_header.classList.toggle("collapsible_header_opened");
var collapsible_content = document.getElementById("content_1731705705359_8499_0");
var collapsible_content = document.getElementById("content_1731710853841_8591_0");
collapsible_content.style.maxHeight = "80em";
</script>
<br/>
Expand Down Expand Up @@ -842,7 +842,7 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</style>

<script>
function copy_code_1731705705367_1958() {
function copy_code_1731710853848_7493() {
let code = `//////////////////// <generated_from:BoxedTypes> ////////////////////
auto pyClassBoxedBool =
py::class_<BoxedBool>
Expand Down Expand Up @@ -920,10 +920,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
navigator.clipboard.writeText(code);
}
</script>
<button class="collapsible_header" id="btn_1731705705367_1958_1" >pybind11 C++ binding code</button>
<div class="collapsible_content" id="content_1731705705367_1958_1">
<button class="collapsible_header" id="btn_1731710853848_7493_1" >pybind11 C++ binding code</button>
<div class="collapsible_content" id="content_1731710853848_7493_1">
<div>
<button onclick="copy_code_1731705705367_1958()" align="right">copy &#x270d;</button>
<button onclick="copy_code_1731710853848_7493()" align="right">copy &#x270d;</button>
</div>
<style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
Expand Down Expand Up @@ -1073,10 +1073,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</div>

<script>
var button = document.getElementById("btn_1731705705367_1958_1");
var button = document.getElementById("btn_1731710853848_7493_1");
button.addEventListener("click", function() {
this.classList.toggle("collapsible_header_opened");
var content = document.getElementById("content_1731705705367_1958_1");
var content = document.getElementById("content_1731710853848_7493_1");
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
Expand All @@ -1086,9 +1086,9 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</script>

<script>
var collapsible_header = document.getElementById("btn_1731705705367_1958_1");
var collapsible_header = document.getElementById("btn_1731710853848_7493_1");
collapsible_header.classList.toggle("collapsible_header_opened");
var collapsible_content = document.getElementById("content_1731705705367_1958_1");
var collapsible_content = document.getElementById("content_1731710853848_7493_1");
collapsible_content.style.maxHeight = "80em";
</script>

Expand Down Expand Up @@ -1137,7 +1137,7 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</style>

<script>
function copy_code_1731705705369_8472() {
function copy_code_1731710853851_404() {
let code = `//////////////////// <generated_from:BoxedTypes> ////////////////////
auto pyClassBoxedBool =
nb::class_<BoxedBool>
Expand Down Expand Up @@ -1214,10 +1214,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
navigator.clipboard.writeText(code);
}
</script>
<button class="collapsible_header" id="btn_1731705705369_8472_2" >nanobind C++ binding code</button>
<div class="collapsible_content" id="content_1731705705369_8472_2">
<button class="collapsible_header" id="btn_1731710853851_404_2" >nanobind C++ binding code</button>
<div class="collapsible_content" id="content_1731710853851_404_2">
<div>
<button onclick="copy_code_1731705705369_8472()" align="right">copy &#x270d;</button>
<button onclick="copy_code_1731710853851_404()" align="right">copy &#x270d;</button>
</div>
<style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
Expand Down Expand Up @@ -1366,10 +1366,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</div>

<script>
var button = document.getElementById("btn_1731705705369_8472_2");
var button = document.getElementById("btn_1731710853851_404_2");
button.addEventListener("click", function() {
this.classList.toggle("collapsible_header_opened");
var content = document.getElementById("content_1731705705369_8472_2");
var content = document.getElementById("content_1731710853851_404_2");
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
Expand All @@ -1379,9 +1379,9 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</script>

<script>
var collapsible_header = document.getElementById("btn_1731705705369_8472_2");
var collapsible_header = document.getElementById("btn_1731710853851_404_2");
collapsible_header.classList.toggle("collapsible_header_opened");
var collapsible_content = document.getElementById("content_1731705705369_8472_2");
var collapsible_content = document.getElementById("content_1731710853851_404_2");
collapsible_content.style.maxHeight = "80em";
</script>
<br/>
Expand Down Expand Up @@ -1430,7 +1430,7 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</style>

<script>
function copy_code_1731705705370_441() {
function copy_code_1731710853852_0032() {
let code = `struct BoxedBool
{
bool value;
Expand All @@ -1441,10 +1441,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
navigator.clipboard.writeText(code);
}
</script>
<button class="collapsible_header" id="btn_1731705705370_441_3" >C++ glue code</button>
<div class="collapsible_content" id="content_1731705705370_441_3">
<button class="collapsible_header" id="btn_1731710853852_0032_3" >C++ glue code</button>
<div class="collapsible_content" id="content_1731710853852_0032_3">
<div>
<button onclick="copy_code_1731705705370_441()" align="right">copy &#x270d;</button>
<button onclick="copy_code_1731710853852_0032()" align="right">copy &#x270d;</button>
</div>
<style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
Expand Down Expand Up @@ -1527,10 +1527,10 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</div>

<script>
var button = document.getElementById("btn_1731705705370_441_3");
var button = document.getElementById("btn_1731710853852_0032_3");
button.addEventListener("click", function() {
this.classList.toggle("collapsible_header_opened");
var content = document.getElementById("content_1731705705370_441_3");
var content = document.getElementById("content_1731710853852_0032_3");
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
Expand All @@ -1540,9 +1540,9 @@ <h1>Use litgen online<a class="headerlink" href="#use-litgen-online" title="Perm
</script>

<script>
var collapsible_header = document.getElementById("btn_1731705705370_441_3");
var collapsible_header = document.getElementById("btn_1731710853852_0032_3");
collapsible_header.classList.toggle("collapsible_header_opened");
var collapsible_content = document.getElementById("content_1731705705370_441_3");
var collapsible_content = document.getElementById("content_1731710853852_0032_3");
collapsible_content.style.maxHeight = "80em";
</script>
</div></div>
Expand Down
Loading

0 comments on commit 3fc39f0

Please sign in to comment.